Wizards: Fix CppLibrary wizards

Fix wrong string evaluation of boolean values which made
in turn the generated files partially wrong.
Introduced with cb63706f83 (but wrong also before for
the no-Qt-dependency case).

Change-Id: I404534d4b21d0d1c496635adfcd8a73716ba13d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2019-06-03 09:12:57 +02:00
parent 08025009a6
commit 884665a0fe
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
@if '%{QtModule}' === 'none'
QT -= core
CONFIG -= qt
@elsif '%{QtModule}' === 'core'
QT -= gui
@else

View File

@@ -23,12 +23,12 @@
{ "key": "PluginInterface", "value": "%{JS: value('BaseClassInfo').PluginInterface }" },
{ "key": "PluginModule", "value": "%{JS: value('BaseClassInfo').PluginModule }" },
{ "key": "PluginMethods", "value": "%{JS: value('BaseClassInfo').PluginMethods }" },
{ "key": "QtModule", "value": "%{JS: value('IsQtPlugin') ? value('PluginModule') : value('LibraryQtModule')}" },
{ "key": "QtModule", "value": "%{JS: value('IsQtPlugin') === 'true' ? value('PluginModule') : value('LibraryQtModule')}" },
{ "key": "QtModuleUpperCase", "value": "%{JS: value('QtModule').charAt(0).toUpperCase() + value('QtModule').slice(1)}" },
{ "key": "LibraryDefine", "value": "%{JS: Cpp.headerGuard(value('ProjectName')) + '_LIBRARY'}" },
{ "key": "LibraryExport", "value": "%{JS: Cpp.headerGuard(value('ProjectName')) + '_EXPORT'}" },
{ "key": "GlobalHdrFileName", "value": "%{JS: Util.fileName(value('ProjectName') + '_global', Util.preferredSuffix('text/x-c++hdr'))}" },
{ "key": "TargetInstallPath", "value": "%{JS: value('IsShared') ? '/usr/lib' : (value('IsQtPlugin') && value('PluginTargetPath') ? '$$[QT_INSTALL_PLUGINS]/' + value('PluginTargetPath') : '')}" },
{ "key": "TargetInstallPath", "value": "%{JS: value('IsShared') === 'true' ? '/usr/lib' : (value('IsQtPlugin') && value('PluginTargetPath') ? '$$[QT_INSTALL_PLUGINS]/' + value('PluginTargetPath') : '')}" },
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" },
{ "key": "GLOBAL_GUARD", "value": "%{JS: Cpp.headerGuard(value('GlobalHdrFileName'))}" }