Add ECMAddQtDesignerPlugin
ClosedPublic

Authored by kossebau on Jul 24 2019, 6:06 PM.

Details

Summary

ECMAddQtDesignerPlugin provides two macros that can be used to
replace the usage of the tool kgendesignerplugin from KDesignerPlugin.
This allows to have ECM-using libraries to create Qt Designer plugins without
the need for another separate tool.

For that purpose option structure & defaults are inspired from that one, to
allow simple porting. Main difference is that ECMAddQtDesignerPlugin
expects the widget metadata definition to be done in CMake code,
using a dedicated function, instead of in a ini-style separate ".widgets" file.

Porting of ".widgets" files basically means:
copy content into cmake, transform ini code into arguments to util method.
Key names need a bit of adaption, current names are open for dicussion.

Porting example:

[KActionSelector]
IncludeFile=kactionselector.h
ToolTip=A widget for selecting and arranging actions/objects
Group=Views (KF5)

gets

ecm_qtdesignerplugin_widget(KActionSelector
    INCLUDE_FILE kactionselector.h
    TOOLTIP "A widget for selecting and arranging actions/objects"
    GROUP "Views (KF5)"
)

Diff Detail

Repository
R240 Extra CMake Modules
Branch
addqtdesignerplugin
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14453
Build 14471: arc lint + arc unit
kossebau created this revision.Jul 24 2019, 6:06 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptJul 24 2019, 6:06 PM
Restricted Application added subscribers: kde-buildsystem, kde-frameworks-devel. · View Herald Transcript
kossebau requested review of this revision.Jul 24 2019, 6:06 PM
kossebau updated this revision to Diff 62618.Jul 26 2019, 4:47 PM
  • API DOX: explain arguments
  • add argument to make it work for Okteta's extra code
  • avoid rebuilding if generated file did not change
  • place generated files in subdir for namespacing
kossebau updated this revision to Diff 62642.Jul 27 2019, 12:26 PM
  • more code comments
  • fix icon file existance check
kossebau updated this revision to Diff 62653.Jul 27 2019, 4:35 PM

add more options: DEFAULT_HEADER_CASE, DEFAULT_HEADER_EXTENSION, DEFAULT_ICON_DIR

kossebau updated this revision to Diff 62676.Jul 28 2019, 12:00 PM
  • escape strings to be used as strings in C++ code
  • use Qt5Core version to decide whether checking only for QtUiPlugin is enough
kossebau retitled this revision from [WIP] Add ECMAddQtDesignerPlugin to Add ECMAddQtDesignerPlugin.Jul 28 2019, 7:53 PM
kossebau edited the summary of this revision. (Show Details)
kossebau added reviewers: Build System, Frameworks.

Seems people so far are fine with this, any comments were rather positive. No changes requested.

So unless someone objects, would then proceed to push soon after KF 5.61 has been branched upcoming WE. Scheduling myself for Tuesday, August 6th currently, so there are some weeks to collect feedback from unreleased master branch experience.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 5 2019, 5:17 PM
This revision was automatically updated to reflect the committed changes.