ECMAddQtDesignerPlugin: pass code sample indirectly via variable name arg
ClosedPublic

Authored by kossebau on Sep 4 2019, 11:05 PM.

Details

Summary

The initial API asked to have custom C++ code to be parsed as string
arguments. As any ";" in such strings would be treated as list separators,
the initial API as workaround required to encode those in the passed
code text with "@SEMICOLON@".

As alternative variant the approach from the GENERATE_EXPORT_HEADER()
macro and its CUSTOM_CONTENT_FROM_VARIABLE is now used, where instead
the name of the variable is passed, from which then the full code could
be fetched and directly used.
As API user one no longer can pass code snippets directly inline as
argument, but no longer needs to use the awkward @SEMICOLON@.

As ECMAddQtDesignerPlugin is not yet part of a released version,
the API can be still changed.

Diff Detail

Repository
R240 Extra CMake Modules
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Sep 4 2019, 11:05 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptSep 4 2019, 11:05 PM
Restricted Application added subscribers: kde-buildsystem, kde-frameworks-devel. · View Herald Transcript
kossebau requested review of this revision.Sep 4 2019, 11:05 PM
kossebau updated this revision to Diff 65514.Sep 6 2019, 3:04 PM

For convenience still enable CONSTRUCTOR_ARGS_CODE, usually simple string
without ";"

Given ECM 5.62 will be tagged this WE and thus the API of the new macro ecm_qtdesignerplugin_widget being frozen, and no-one really gave feedback on the initial API, would take the responsibility and push tonight, unless there is last minute discussion. Only users of the arguments changed here is Okteta (by what lxr.kde.org reports), which are my changes as well and partial motivation for this change.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 6 2019, 8:39 PM
This revision was automatically updated to reflect the committed changes.