Export Wizard values to JavaScript macro

Registers a new function "value('name')", available to the wizard json
files, which returns the value of the variable "name" as a JavaScript
object. So, variables with a string value are actual JavaScript strings,
booleans are booleans, lists are lists, and dictionaries are
dictionaries.

The patch also makes it actually possible to assign JSON lists and
dictionaries to values.

This removes some hacks involving creating complex JavaScript objects
through string substitution.

Change-Id: I4ac6da22bc5bccc9fadee97694c2fa14d44c9307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2019-04-16 16:46:36 +02:00
parent 0c5837a111
commit e0d38ae414
57 changed files with 891 additions and 646 deletions

View File

@@ -98,15 +98,22 @@
\section1 Using Variables in Wizards
You can use variables (\c {%\{<variableName>\}}) in the configuration and
template source files. A set of variables is predefined by the wizards and
their pages. You can introduce new variables as shortcuts to be used later.
Define the variable key names and values in the \c options section in the
You can use variables (\c {%\{<variableName>\}}) in strings in the JSON configuration
file and in template source files.
A set of variables is predefined by the wizards and their pages.
You can introduce new variables as shortcuts to be used later by
defining the variable key names and values in the \c options section in the
\c {wizard.json} file.
The variables always return strings. In places where a boolean value is
expected and a string is given, an empty string as well as the string
\c {"false"} is treated as \c false and anything else as \c true.
There is a special variable \c {%\{JS:<JavaScript expression>\}} which evaluates the given
JavaScript expression and converts the resulting JavaScript value to a string.
In the JavaScript expression you can refer to variables defined by the wizard with
\c {value('<variableName>')}. The returned JavaScript object has the type that the value
of the variable has, which can be a string, list, dictionary or boolean.
In places where a boolean value is expected and a string is given,
an empty string as well as the string \c {"false"} is treated as
\c false and anything else as \c true.
\section1 Localizing Wizards
@@ -221,7 +228,7 @@
"trDisplayName": "C++ Class",
"trDisplayCategory": "C++",
"icon": "../../global/genericfilewizard.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
\endcode
\list
@@ -295,11 +302,11 @@
{ "key": "TargetPath", "value": "%{Path}" },
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
{ "key": "Base", "value": "%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" },
{ "key": "isQObject", "value": "%{JS: ('%{Base}' === 'QObject' || '%{Base}' === 'QWidget' || '%{Base}' === 'QMainWindow' || '%{Base}' === 'QDeclarativeItem' || '%{Base}' === 'QQuickItem' ) ? 'yes' : ''}" },
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" },
{ "key": "SharedDataInit", "value": "%{JS: ('%{IncludeQSharedData}') ? 'data(new %{CN}Data)' : '' }" }
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
{ "key": "Base", "value": "%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" },
{ "key": "isQObject", "value": "%{JS: (value('Base') === 'QObject' || value('Base') === 'QWidget' || value('Base') === 'QMainWindow' || value('Base') === 'QDeclarativeItem' || value('Base') === 'QQuickItem' ) ? 'true' : 'false'}" },
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}" },
{ "key": "SharedDataInit", "value": "%{JS: value('IncludeQSharedData') ? 'data(new %{CN}Data)' : '' }" }
],
\endcode
@@ -712,7 +719,7 @@
{
"checkedValue": "QObject",
"uncheckedValue": "",
"checked": "%{JS: ('%{BaseCB}' === 'QObject' ) ? 'yes' : ''}"
"checked": "%{JS: value('BaseCB') === 'QObject' ? 'true' : 'false'}"
}
},
\endcode
@@ -788,7 +795,7 @@
"name": "LabelQQC_2_0",
"type": "Label",
"span": true,
"visible": "%{( '%{CS}' === 'QQC_2_0' )}",
"visible": "%{JS: value('CS') === 'QQC_2_0'}",
"data":
{
"wordWrap": true,
@@ -819,7 +826,7 @@
{
"name": "BaseEdit",
"type": "LineEdit",
"enabled": "%{JS: ( '%{BaseCB}' === '' ) ? 'yes' : ''}",
"enabled": "%{JS: value('BaseCB') === '' ? 'true' : 'false'}",
"mandatory": false,
"data":
{

View File

@@ -8,19 +8,19 @@
"trDisplayCategory": "Other Project",
"icon": "autotest.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureDesktop" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('AutoTest') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('AutoTest') >= 0}",
"options":
[
{ "key": "ProjectFilePath",
"value": "%{JS: '%{BuildSystem}' == 'qmake' ? '%{ProFileName}' : ('%{BuildSystem}' == 'qbs' ? '%{QbsFileName}' : '%{CMakeFileName}') }"
"value": "%{JS: value('BuildSystem') == 'qmake' ? value('ProFileName') : (value('BuildSystem') == 'qbs' ? value('QbsFileName') : value('CMakeFileName')) }"
},
{ "key": "ProFileName",
"value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}"
"value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}"
},
{
"key": "QbsFileName",
"value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}"
"value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}"
},
{
"key": "CMakeFileName",
@@ -34,19 +34,19 @@
},
{
"key": "TestCaseFileWithHeaderSuffix",
"value": "%{JS: 'tst_%{TestCaseName}.'.toLowerCase() + Util.preferredSuffix('text/x-c++hdr') }"
"value": "%{JS: 'tst_' + value('TestCaseName').toLowerCase() + '.' + Util.preferredSuffix('text/x-c++hdr') }"
},
{
"key": "GUARD",
"value": "%{JS: '%{TestCaseFileWithHeaderSuffix}'.toUpperCase().replace('.', '_') }"
"value": "%{JS: value('TestCaseFileWithHeaderSuffix').toUpperCase().replace('.', '_') }"
},
{
"key": "TestCaseFileWithCppSuffix",
"value": "%{JS: 'tst_%{TestCaseName}.'.toLowerCase() + Util.preferredSuffix('text/x-c++src') }"
"value": "%{JS: 'tst_' + value('TestCaseName').toLowerCase() + '.' + Util.preferredSuffix('text/x-c++src') }"
},
{
"key": "TestCaseFileWithQmlSuffix",
"value": "%{JS: 'tst_%{TestCaseName}.qml'.toLowerCase() }"
"value": "%{JS: 'tst_' + value('TestCaseName').toLowerCase() + '.qml' }"
}
],
@@ -95,7 +95,7 @@
{
"name": "RequireGUI",
"trDisplayName": "GUI Application",
"visible": "%{JS: '%{TestFrameWork}' === 'QtTest'}",
"visible": "%{JS: value('TestFrameWork') === 'QtTest'}",
"type": "CheckBox",
"data": {
"checked": false
@@ -111,7 +111,7 @@
{
"name": "RequireApplication",
"trDisplayName": "Requires QApplication",
"visible": "%{JS: '%{TestFrameWork}' === 'QtTest'}",
"visible": "%{JS: value('TestFrameWork') === 'QtTest'}",
"type": "CheckBox",
"data": {
"checked": false
@@ -120,7 +120,7 @@
{
"name": "GenerateInitAndCleanup",
"trDisplayName": "Generate initialization and cleanup code",
"visible": "%{JS: [ 'QtTest', 'QtQuickTest' ].indexOf('%{TestFrameWork}') >= 0 }",
"visible": "%{JS: [ 'QtTest', 'QtQuickTest' ].indexOf(value('TestFrameWork')) >= 0 }",
"type": "CheckBox",
"data": {
"checked": false
@@ -129,14 +129,14 @@
{
"name": "TestSetName",
"trDisplayName": "Test set name:",
"visible": "%{JS: '%{TestFrameWork}' === 'GTest'}",
"visible": "%{JS: value('TestFrameWork') === 'GTest'}",
"type": "LineEdit",
"data": { "validator": "^[a-zA-Z0-9]+$" }
},
{
"name": "GTestCXX11",
"trDisplayName": "Enable C++11",
"visible": "%{JS: '%{TestFrameWork}' === 'GTest'}",
"visible": "%{JS: value('TestFrameWork') === 'GTest'}",
"type": "CheckBox",
"data": {
"checked": false
@@ -145,7 +145,7 @@
{
"name": "GTestRepository",
"trDisplayName": "Googletest repository:",
"visible": "%{JS: '%{TestFrameWork}' === 'GTest'}",
"visible": "%{JS: value('TestFrameWork') === 'GTest'}",
"type": "PathChooser",
"data": {
"kind": "existingDirectory"
@@ -163,17 +163,17 @@
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
@@ -187,7 +187,7 @@
"enabled": "%{IsTopLevelProject}",
"data": {
"projectFilePath": "%{ProjectFilePath}",
"requiredFeatures": [ "%{JS: ('%{TestFrameWork}' === 'QtQuickTest' ? 'QtSupport.Wizards.FeatureQt.5' : (('%{BuildSystem}' === 'qmake' || '%{TestFrameWork}' === 'QtTest') ? 'QtSupport.Wizards.FeatureQt' : 'DeviceType.Desktop' )) }" ]
"requiredFeatures": [ "%{JS: (value('TestFrameWork') === 'QtQuickTest' ? 'QtSupport.Wizards.FeatureQt.5' : ((value('BuildSystem') === 'qmake' || value('TestFrameWork') === 'QtTest') ? 'QtSupport.Wizards.FeatureQt' : 'DeviceType.Desktop' )) }" ]
}
},
{
@@ -205,64 +205,64 @@
{
"source": "files/gtest_dependency.pri",
"target": "gtest_dependency.pri",
"condition": "%{JS: '%{TestFrameWork}' == 'GTest' && '%{BuildSystem}' == 'qmake'}",
"condition": "%{JS: value('TestFrameWork') == 'GTest' && value('BuildSystem') == 'qmake'}",
"openInEditor": false
},
{
"source": "files/googlecommon.js",
"target": "googlecommon.js",
"condition": "%{JS: '%{TestFrameWork}' == 'GTest' && '%{BuildSystem}' == 'qbs'}",
"condition": "%{JS: value('TestFrameWork') == 'GTest' && value('BuildSystem') == 'qbs'}",
"openInEditor": false
},
{
"source": "files/tst.pro",
"target": "%{ProjectFilePath}",
"condition": "%{JS: '%{BuildSystem}' == 'qmake'}",
"condition": "%{JS: value('BuildSystem') == 'qmake'}",
"openInEditor": false,
"openAsProject": true
},
{
"source": "files/tst.qbs",
"target": "%{ProjectFilePath}",
"condition": "%{JS: '%{BuildSystem}' == 'qbs'}",
"condition": "%{JS: value('BuildSystem') == 'qbs'}",
"openInEditor": false,
"openAsProject": true
},
{
"source": "files/tst.txt",
"target": "CMakeLists.txt",
"condition": "%{JS: '%{BuildSystem}' == 'cmake'}",
"condition": "%{JS: value('BuildSystem') == 'cmake'}",
"openInEditor": false,
"openAsProject": true
},
{
"source": "files/tst_src.h",
"target": "%{TestCaseFileWithHeaderSuffix}",
"condition": "%{JS: '%{TestFrameWork}' == 'GTest'}",
"condition": "%{JS: value('TestFrameWork') == 'GTest'}",
"openInEditor": true
},
{
"source": "files/tst_src.cpp",
"target": "%{TestCaseFileWithCppSuffix}",
"condition": "%{JS: '%{TestFrameWork}' == 'QtTest'}",
"condition": "%{JS: value('TestFrameWork') == 'QtTest'}",
"openInEditor": true
},
{
"source": "files/tst_main.cpp",
"target": "%{MainCppName}",
"condition": "%{JS: ['GTest', 'QtQuickTest'].indexOf('%{TestFrameWork}') >= 0}",
"condition": "%{JS: ['GTest', 'QtQuickTest'].indexOf(value('TestFrameWork')) >= 0}",
"openInEditor": true
},
{
"source": "files/tst_qml.tmpl",
"target": "%{TestCaseFileWithQmlSuffix}",
"condition": "%{JS: '%{TestFrameWork}' === 'QtQuickTest'}",
"condition": "%{JS: value('TestFrameWork') === 'QtQuickTest'}",
"openInEditor": true
},
{
"source": "../projects/git.ignore",
"target": ".gitignore",
"condition": "%{JS: ( %{IsTopLevelProject} && '%{VersionControl}' === 'G.Git' )}"
"condition": "%{JS: ( %{IsTopLevelProject} && value('VersionControl') === 'G.Git' )}"
}
]
}

View File

@@ -7,18 +7,18 @@
"trDisplayName": "C++ Class",
"trDisplayCategory": "C++",
"iconText": "h/cpp",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
"options":
[
{ "key": "TargetPath", "value": "%{Path}" },
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
{ "key": "Base", "value": "%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" },
{ "key": "isQObject", "value": "%{JS: [ 'QObject', 'QWidget', 'QMainWindow', 'QDeclarativeItem', 'QQuickItem'].indexOf('%{Base}') >= 0 }" },
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard('%{HdrFileName}')}" },
{ "key": "SharedDataInit", "value": "%{JS: ('%{IncludeQSharedData}') ? 'data(new %{CN}Data)' : '' }" }
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
{ "key": "Base", "value": "%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" },
{ "key": "isQObject", "value": "%{JS: [ 'QObject', 'QWidget', 'QMainWindow', 'QDeclarativeItem', 'QQuickItem'].indexOf(value('Base')) >= 0 }" },
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" },
{ "key": "SharedDataInit", "value": "%{JS: (value('IncludeQSharedData')) ? 'data(new %{CN}Data)' : '' }" }
],
"pages":
@@ -49,7 +49,7 @@
{
"name": "BaseEdit",
"type": "LineEdit",
"enabled": "%{JS: '%{BaseCB}' === ''}",
"enabled": "%{JS: value('BaseCB') === ''}",
"mandatory": false,
"data":
{
@@ -71,7 +71,7 @@
{
"checkedValue": "QObject",
"uncheckedValue": "",
"checked": "%{JS: '%{BaseCB}' === 'QObject'}"
"checked": "%{JS: value('BaseCB') === 'QObject'}"
}
},
{
@@ -82,7 +82,7 @@
{
"checkedValue": "QWidget",
"uncheckedValue": "",
"checked": "%{JS: '%{BaseCB}' === 'QWidget'}"
"checked": "%{JS: value('BaseCB') === 'QWidget'}"
}
},
{
@@ -93,7 +93,7 @@
{
"checkedValue": "QMainWindow",
"uncheckedValue": "",
"checked": "%{JS: '%{BaseCB}' === 'QMainWindow'}"
"checked": "%{JS: value('BaseCB') === 'QMainWindow'}"
}
},
{
@@ -104,7 +104,7 @@
{
"checkedValue": "QDeclarativeItem",
"uncheckedValue": "",
"checked": "%{JS: '%{BaseCB}' === 'QDeclarativeItem'}"
"checked": "%{JS: value('BaseCB') === 'QDeclarativeItem'}"
}
},
{
@@ -115,7 +115,7 @@
{
"checkedValue": "QQuickItem",
"uncheckedValue": "",
"checked": "%{JS: '%{BaseCB}' === 'QQuickItem'}"
"checked": "%{JS: value('BaseCB') === 'QQuickItem'}"
}
},
{
@@ -139,14 +139,14 @@
"type": "LineEdit",
"trDisplayName": "Header file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}" }
},
{
"name": "SrcFileName",
"type": "LineEdit",
"trDisplayName": "Source file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++src'))}" }
},
{
"name": "Path",

View File

@@ -6,15 +6,15 @@
"trDescription": "Creates a Qt item model.",
"trDisplayName": "Qt Item Model",
"trDisplayCategory": "Qt",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
"options":
[
{ "key": "TargetPath", "value": "%{Path}" },
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" }
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}" }
],
"pages":
@@ -92,14 +92,14 @@
"type": "LineEdit",
"trDisplayName": "Header file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}" }
},
{
"name": "SrcFileName",
"type": "LineEdit",
"trDisplayName": "Source file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++src'))}" }
},
{
"name": "Path",
@@ -131,7 +131,7 @@
{
"source": "itemmodel.h",
"target": "%{HdrPath}",
"condition": "%{JS: '%{Base}' === 'QAbstractItemModel'}",
"condition": "%{JS: value('Base') === 'QAbstractItemModel'}",
"options": [
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
@@ -141,7 +141,7 @@
"source": "itemmodel.cpp",
"target": "%{SrcPath}",
"openInEditor": true,
"condition": "%{JS: '%{Base}' === 'QAbstractItemModel'}",
"condition": "%{JS: value('Base') === 'QAbstractItemModel'}",
"options": [
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
@@ -150,7 +150,7 @@
{
"source": "tablemodel.h",
"target": "%{HdrPath}",
"condition": "%{JS: '%{Base}' === 'QAbstractTableModel'}",
"condition": "%{JS: value('Base') === 'QAbstractTableModel'}",
"options": [
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
@@ -160,7 +160,7 @@
"source": "tablemodel.cpp",
"target": "%{SrcPath}",
"openInEditor": true,
"condition": "%{JS: '%{Base}' === 'QAbstractTableModel'}",
"condition": "%{JS: value('Base') === 'QAbstractTableModel'}",
"options": [
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
@@ -169,7 +169,7 @@
{
"source": "listmodel.h",
"target": "%{HdrPath}",
"condition": "%{JS: '%{Base}' === 'QAbstractListModel'}",
"condition": "%{JS: value('Base') === 'QAbstractListModel'}",
"options": [
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
@@ -179,7 +179,7 @@
"source": "listmodel.cpp",
"target": "%{SrcPath}",
"openInEditor": true,
"condition": "%{JS: '%{Base}' === 'QAbstractListModel'}",
"condition": "%{JS: value('Base') === 'QAbstractListModel'}",
"options": [
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }

View File

@@ -7,11 +7,11 @@
"trDisplayName": "Python Class",
"trDisplayCategory": "Python",
"icon": "../../files/python/icon.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('PythonEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
"options":
[
{ "key": "Base", "value":"%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" },
{ "key": "Base", "value":"%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" },
{ "key": "Imports", "value": "%{ImportQtCore}%{ImportQtWidgets}%{ImportQtDeclarative}"}
],
@@ -52,7 +52,7 @@
{
"name": "BaseEdit",
"type": "LineEdit",
"enabled": "%{JS: '%{BaseCB}' === ''}",
"enabled": "%{JS: value('BaseCB') === ''}",
"mandatory": false,
"data": { "trText": "%{BaseCB}" }
},
@@ -71,7 +71,7 @@
{
"checkedValue": "QtCore",
"uncheckedValue": "",
"checked": "%{JS: '%{Base}' !== ''}"
"checked": "%{JS: value('Base') !== ''}"
}
},
{
@@ -82,7 +82,7 @@
{
"checkedValue": "QtWidgets",
"uncheckedValue": "",
"checked": "%{JS: '%{Base}' === 'QWidget'}"
"checked": "%{JS: value('Base') === 'QWidget'}"
}
},
{
@@ -93,7 +93,7 @@
{
"checkedValue": "QtQuick",
"uncheckedValue": "",
"checked": "%{JS: '%{Base}' === 'QQuickItem'}"
"checked": "%{JS: value('Base') === 'QQuickItem'}"
}
},
{
@@ -108,7 +108,7 @@
"type": "LineEdit",
"trDisplayName": "Source file:",
"mandatory": true,
"data": { "trText": "%{JS: Util.fileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-python')}')}" }
"data": { "trText": "%{JS: Util.fileName(value('Class'), Util.preferredSuffix('text/x-python'))}" }
},
{
"name": "TargetPath",

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "Qt",
"iconText": "ui.qml",
"featuresRequired": [ "QtSupport.Wizards.FeatureQtQuick.UiFiles" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlJSEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmlJSEditor') >= 0}",
"options" : [
{ "key": "QmlFile", "value": "%{Class}.%{JS: Util.preferredSuffix('text/x-qml')}" },

View File

@@ -7,9 +7,9 @@
"trDisplayName": "C++ Header File",
"trDisplayCategory": "C++",
"iconText": "h",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
"options": { "key": "FileName", "value": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" },
"options": { "key": "FileName", "value": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('text/x-c++hdr'))}" },
"pages" :
[
@@ -33,7 +33,7 @@
"source": "file.h",
"target": "%{FileName}",
"openInEditor": true,
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName('%{FileName}')}" }
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName(value('FileName'))}" }
}
}
]

View File

@@ -7,9 +7,9 @@
"trDisplayName": "C++ Source File",
"trDisplayCategory": "C++",
"iconText": "cpp",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
"options": { "key": "FileName", "value": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" },
"options": { "key": "FileName", "value": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('text/x-c++src'))}" },
"pages" :
[
@@ -33,7 +33,7 @@
"source": "file.cpp",
"target": "%{FileName}",
"openInEditor": true,
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName('%{FileName}')}" }
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName(value('FileName'))}" }
}
}
]

View File

@@ -1 +1 @@
%{JS: [ %{FormContents} ].join('\n')}\
%{FormContents}

View File

@@ -7,12 +7,12 @@
"trDisplayName": "Qt Designer Form",
"trDisplayCategory": "Qt",
"iconText": "ui",
"enabled": "%{JS: [ %{Plugins} ].indexOf('Designer') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('Designer') >= 0}",
"options": [
{ "key": "UiClass", "value": "%{JS: QtSupport.uiClassName([ %{FormContents} ].join('\\n'))}" },
{ "key": "UiClass", "value": "%{JS: QtSupport.uiClassName(value('FormContents'))}" },
{ "key": "Extension", "value": "%{JS: Util.preferredSuffix('application/x-designer')}"},
{ "key": "InitialFileName", "value": "%{JS: Cpp.classToFileName('%{UiClass}', '%{Extension}') }" }
{ "key": "InitialFileName", "value": "%{JS: Cpp.classToFileName(value('UiClass'), value('Extension')) }" }
],
"pages":
@@ -41,7 +41,7 @@
"data":
{
"source": "file.ui",
"target": "%{JS: Util.fileName('%{TargetPath}', '%{Extension}')}",
"target": "%{JS: Util.fileName(value('TargetPath'), value('Extension'))}",
"openInEditor": true
}
}

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "GLSL",
"iconText": "frag",
"platformIndependent": true,
"enabled": "%{JS: [ %{Plugins} ].indexOf('GLSLEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('GLSLEditor') >= 0}",
"pages" :
[
@@ -30,7 +30,7 @@
"data":
{
"source": "file.frag",
"target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-glsl-frag')}')}",
"target": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('text/x-glsl-frag'))}",
"openInEditor": true
}
}

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "GLSL",
"iconText": "vert",
"platformIndependent": true,
"enabled": "%{JS: [ %{Plugins} ].indexOf('GLSLEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('GLSLEditor') >= 0}",
"pages" :
[
@@ -30,7 +30,7 @@
"data":
{
"source": "file.vert",
"target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-glsl-vert')}')}",
"target": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('text/x-glsl-vert'))}",
"openInEditor": true
}
}

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "GLSL",
"iconText": "fsh",
"platformIndependent": true,
"enabled": "%{JS: [ %{Plugins} ].indexOf('GLSLEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('GLSLEditor') >= 0}",
"pages" :
[
@@ -30,7 +30,7 @@
"data":
{
"source": "file.fsh",
"target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-glsl-es-frag')}')}",
"target": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('text/x-glsl-es-frag'))}",
"openInEditor": true
}
}

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "GLSL",
"iconText": "vsh",
"platformIndependent": true,
"enabled": "%{JS: [ %{Plugins} ].indexOf('GLSLEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('GLSLEditor') >= 0}",
"pages" :
[
@@ -30,7 +30,7 @@
"data":
{
"source": "file.vsh",
"target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-glsl-es-vert')}')}",
"target": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('text/x-glsl-es-vert'))}",
"openInEditor": true
}
}

View File

@@ -7,9 +7,9 @@
"trDisplayName": "Java File",
"trDisplayCategory": "Java",
"iconText": "java",
"enabled": "%{JS: [ %{Plugins} ].indexOf('Android') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('Android') >= 0}",
"options": [ { "key": "ClassName", "value": "%{JS: '%{FileName}'.charAt(0).toUpperCase() + '%{FileName}'.substr(1)}" } ],
"options": [ { "key": "ClassName", "value": "%{JS: value('FileName').charAt(0).toUpperCase() + value('FileName').substr(1)}" } ],
"pages" :
[
@@ -31,7 +31,7 @@
"data":
{
"source": "source.java",
"target": "%{JS: Util.fileName('%{Path}/%{ClassName}', '%{JS: Util.preferredSuffix('text/x-java')}')}",
"target": "%{JS: Util.fileName(value('Path') + '/' + value('ClassName'), Util.preferredSuffix('text/x-java'))}",
"openInEditor": true
}
}

View File

@@ -7,7 +7,7 @@
"trDisplayName": "JS File",
"trDisplayCategory": "Qt",
"iconText": "js",
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlJSEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmlJSEditor') >= 0}",
"pages" :
[
@@ -47,7 +47,7 @@
"data":
{
"source": "file.js",
"target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('application/javascript')}')}",
"target": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('application/javascript'))}",
"openInEditor": true
}
}

View File

@@ -8,12 +8,12 @@
"trDisplayCategory": "Modeling",
"iconText": "qmodel",
"platformIndependent": true,
"enabled": "%{JS: [ %{Plugins} ].indexOf('ModelEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('ModelEditor') >= 0}",
"options":
[
{ "key": "TargetPath", "value": "%{JS: Util.fileName('%{Location}/%{FileName}', '%{JS: Util.preferredSuffix('text/vnd.qtcreator.model')}')}" },
{ "key": "FileName", "value": "%{JS: Modeling.elementNameToFileName('%{Name}')}" }
{ "key": "TargetPath", "value": "%{JS: Util.fileName(value('Location') + '/' + value('FileName'), Util.preferredSuffix('text/vnd.qtcreator.model'))}" },
{ "key": "FileName", "value": "%{JS: Modeling.elementNameToFileName(value('Name'))}" }
],
"pages" :
@@ -34,8 +34,8 @@
"name": "Location",
"trDisplayName": "Location:",
"type": "PathChooser",
"isComplete": "%{JS: '%{Location}' === '' || !Util.exists('%{TargetPath}')}",
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators('%{TargetPath}')}\" exists in the filesystem.",
"isComplete": "%{JS: value('Location') === '' || !Util.exists(value('TargetPath'))}",
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators(value('TargetPath'))}\" exists in the filesystem.",
"data":
{
"kind": "directory",

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "Modeling",
"iconText": "qmodel",
"platformIndependent": true,
"enabled": "%{JS: [ %{Plugins} ].indexOf('ModelEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('ModelEditor') >= 0}",
"options": [ { "key": "TargetPath", "value": "%{JS: Util.mktemp('model-XXXXXX.qmodel')}" } ],

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Nim File",
"trDisplayCategory": "Nim",
"icon": "../../projects/nim/icon.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('Nim') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('Nim') >= 0}",
"pages" :
[
@@ -29,7 +29,7 @@
"data":
{
"source": "file.nim",
"target": "%{JS: Util.fileName('%{TargetPath}', 'nim')}",
"target": "%{JS: Util.fileName(value('TargetPath'), 'nim')}",
"openInEditor": true
}
}

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Nim Script File",
"trDisplayCategory": "Nim",
"icon": "../../projects/nim/icon.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('Nim') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('Nim') >= 0}",
"pages" :
[
@@ -29,7 +29,7 @@
"data":
{
"source": "file.nims",
"target": "%{JS: Util.fileName('%{TargetPath}', 'nims')}",
"target": "%{JS: Util.fileName(value('TargetPath'), 'nims')}",
"openInEditor": true
}
}

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Python File",
"trDisplayCategory": "Python",
"icon": "icon.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('PythonEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
"pages" :
[
@@ -29,7 +29,7 @@
"data":
{
"source": "file.py",
"target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-python')}')}",
"target": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('text/x-python'))}",
"openInEditor": true
}
}

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Qt Resource File",
"trDisplayCategory": "Qt",
"iconText": "qrc",
"enabled": "%{JS: [ %{Plugins} ].indexOf('ResourceEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('ResourceEditor') >= 0}",
"pages" :
[
@@ -29,7 +29,7 @@
"data":
{
"source": "file.qrc",
"target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('application/vnd.qt.xml.resource')}')}",
"target": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('application/vnd.qt.xml.resource'))}",
"openInEditor": true
}
}

View File

@@ -7,7 +7,7 @@
"trDisplayName": "QML File (Qt Quick 2)",
"trDisplayCategory": "Qt",
"iconText": "qml",
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlJSEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmlJSEditor') >= 0}",
"pages" :
[
@@ -29,7 +29,7 @@
"data":
{
"source": "file.qml.tpl",
"target": "%{JS: Util.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-qml')}')}",
"target": "%{JS: Util.fileName(value('TargetPath'), Util.preferredSuffix('text/x-qml'))}",
"openInEditor": true
}
}

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Scratch Buffer",
"trDisplayCategory": "General",
"platformIndependent": true,
"enabled": "%{JS: [ %{Plugins} ].indexOf('TextEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('TextEditor') >= 0}",
"options": [ { "key": "TargetPath", "value": "%{JS: Util.mktemp('scratch-XXXXXX.txt')}" } ],

View File

@@ -8,11 +8,11 @@
"trDisplayCategory": "Modeling",
"iconText": "scxml",
"platformIndependent": true,
"enabled": "%{JS: [ %{Plugins} ].indexOf('ScxmlEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('ScxmlEditor') >= 0}",
"options":
[
{ "key": "TargetPath", "value": "%{JS: Util.fileName('%{Location}/%{FileName}', '%{JS: Util.preferredSuffix('application/scxml+xml')}')}" },
{ "key": "TargetPath", "value": "%{JS: Util.fileName(value('Location') + '/' + value('FileName'), Util.preferredSuffix('application/scxml+xml'))}" },
{ "key": "FileName", "value": "%{Name}" }
],
@@ -34,8 +34,8 @@
"name": "Location",
"trDisplayName": "Location:",
"type": "PathChooser",
"isComplete": "%{JS: '%{Location}' === '' || !Util.exists('%{TargetPath}')}",
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators('%{TargetPath}')}\" exists in the filesystem.",
"isComplete": "%{JS: value('Location') === '' || !Util.exists(value('TargetPath'))}",
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators(value('TargetPath'))}\" exists in the filesystem.",
"data":
{
"kind": "directory",

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "General",
"iconText": "txt",
"platformIndependent": true,
"enabled": "%{JS: [ %{Plugins} ].indexOf('TextEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('TextEditor') >= 0}",
"pages" :
[

View File

@@ -8,13 +8,13 @@
"trDisplayCategory": "Application",
"icon": "../../global/consoleapplication.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "CppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" }
],
@@ -31,7 +31,7 @@
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
@@ -46,17 +46,17 @@
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
@@ -67,7 +67,7 @@
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data": { "projectFilePath": "%{ProjectFile}" }
},
{
@@ -86,18 +86,18 @@
"source": "file.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "file.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "main.cpp",
@@ -107,7 +107,7 @@
{
"source": "../git.ignore",
"target": ".gitignore",
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -7,31 +7,31 @@
"trDisplayName": "C++ Library",
"trDisplayCategory": "Library",
"icon": "../../global/lib.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0 && ([ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0)}",
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0 && (value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0)}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : '%{CMakeFile}'}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : value('CMakeFile')}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "PluginJsonFile", "value": "%{JS: Util.fileName('%{ProjectName}', 'json')}" },
{ "key": "IsShared", "value": "%{JS: '%{Type}' === 'shared'}" },
{ "key": "IsStatic", "value": "%{JS: '%{Type}' === 'static'}" },
{ "key": "IsQtPlugin", "value": "%{JS: '%{Type}' === 'qtplugin'}" },
{ "key": "BaseClassName", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][0] : ''}" },
{ "key": "PluginTargetPath", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][1] : ''}" },
{ "key": "PluginInterface", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][2] : ''}" },
{ "key": "PluginModule", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][3] : ''}" },
{ "key": "PluginMethods", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][4] : ''}" },
{ "key": "QtModule", "value": "%{JS: %{IsQtPlugin} ? '%{PluginModule}' : '%{LibraryQtModule}'}" },
{ "key": "QtModuleUpperCase", "value": "%{JS: '%{QtModule}'.charAt(0).toUpperCase() + '%{QtModule}'.slice(1)}" },
{ "key": "LibraryDefine", "value": "%{JS: Cpp.headerGuard('%{ProjectName}') + '_LIBRARY'}" },
{ "key": "LibraryExport", "value": "%{JS: Cpp.headerGuard('%{ProjectName}') + '_EXPORT'}" },
{ "key": "GlobalHdrFileName", "value": "%{JS: Util.fileName('%{ProjectName}_global', Util.preferredSuffix('text/x-c++hdr'))}" },
{ "key": "TargetInstallPath", "value": "%{JS: %{IsShared} ? '/usr/lib' : (%{IsQtPlugin} && '%{PluginTargetPath}' ? '$$[QT_INSTALL_PLUGINS]/%{PluginTargetPath}' : '')}" },
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard('%{HdrFileName}')}" },
{ "key": "GLOBAL_GUARD", "value": "%{JS: Cpp.headerGuard('%{GlobalHdrFileName}')}" }
{ "key": "PluginJsonFile", "value": "%{JS: Util.fileName(value('ProjectName'), 'json')}" },
{ "key": "IsShared", "value": "%{JS: value('Type') === 'shared'}" },
{ "key": "IsStatic", "value": "%{JS: value('Type') === 'static'}" },
{ "key": "IsQtPlugin", "value": "%{JS: value('Type') === 'qtplugin'}" },
{ "key": "BaseClassName", "value": "%{JS: value('BaseClassInfo').BaseClassName }" },
{ "key": "PluginTargetPath", "value": "%{JS: value('BaseClassInfo').PluginTargetPath }" },
{ "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": "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": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" },
{ "key": "GLOBAL_GUARD", "value": "%{JS: Cpp.headerGuard(value('GlobalHdrFileName'))}" }
],
"pages":
@@ -46,7 +46,7 @@
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
@@ -61,12 +61,12 @@
{
"trKey": "Qmake",
"value": "qmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
}
]
}
@@ -124,14 +124,14 @@
"data":
{
"validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)",
"trText": "%{JS: '%{Type}' === 'qtplugin' ? '%{BaseClassName}'.slice(1) : ('%{ProjectName}'.charAt(0).toUpperCase() + '%{ProjectName}'.slice(1))}"
"trText": "%{JS: value('Type') === 'qtplugin' ? value('BaseClassName').slice(1) : (value('ProjectName').charAt(0).toUpperCase() + value('ProjectName').slice(1))}"
}
},
{
"name": "BaseClassInfo",
"trDisplayName": "Base class:",
"type": "ComboBox",
"visible": "%{JS: '%{Type}' === 'qtplugin'}",
"visible": "%{JS: value('Type') === 'qtplugin'}",
"data":
{
"index": 1,
@@ -139,31 +139,80 @@
[
{
"trKey": "QAccessiblePlugin",
"value": "'QAccessiblePlugin', 'accessible', 'QAccessibleFactoryInterface', 'gui', 'QAccessibleInterface *create(const QString &key, QObject *object)'"
"value":
{
"BaseClassName": "QAccessiblePlugin",
"PluginTargetPath": "accessible",
"PluginInterface": "QAccessibleFactoryInterface",
"PluginModule": "gui",
"PluginMethods": "QAccessibleInterface *create(const QString &key, QObject *object)"
}
},
{
"trKey": "QGenericPlugin",
"value": "'QGenericPlugin', 'generic', 'QGenericPluginFactoryInterface', 'gui', 'QObject *create(const QString &name, const QString &spec)'"
"value":
{
"BaseClassName": "QGenericPlugin",
"PluginTargetPath": "generic",
"PluginInterface": "QGenericPluginFactoryInterface",
"PluginModule": "gui",
"PluginMethods": "QObject *create(const QString &name, const QString &spec)"
}
},
{
"trKey": "QIconEnginePlugin",
"value": "'QIconEnginePlugin', 'imageformats', 'QIconEngineFactoryInterface', 'gui', 'QIconEngine *create(const QString &filename)'"
"value":
{
"BaseClassName": "QIconEnginePlugin",
"PluginTargetPath": "imageformats",
"PluginInterface": "QIconEngineFactoryInterface",
"PluginModule": "gui",
"PluginMethods": "QIconEngine *create(const QString &filename)"
}
},
{
"trKey": "QImageIOPlugin",
"value": "'QImageIOPlugin', 'imageformats', 'QImageIOHandlerFactoryInterface', 'gui', 'QImageIOPlugin::Capabilities capabilities(QIODevice *device, const QByteArray &format) const|QImageIOHandler *create(QIODevice *device, const QByteArray &format) const'"
"value":
{
"BaseClassName": "QImageIOPlugin",
"PluginTargetPath": "imageformats",
"PluginInterface": "QImageIOHandlerFactoryInterface",
"PluginModule": "gui",
"PluginMethods": "QImageIOPlugin::Capabilities capabilities(QIODevice *device, const QByteArray &format) const|QImageIOHandler *create(QIODevice *device, const QByteArray &format) const"
}
},
{
"trKey": "QScriptExtensionPlugin",
"value": "'QScriptExtensionPlugin', '', 'QScriptExtensionInterface', 'script', 'void initialize(const QString &key, QScriptEngine *engine)|QStringList keys() const'"
"value":
{
"BaseClassName": "QScriptExtensionPlugin",
"PluginTargetPath": "",
"PluginInterface": "QScriptExtensionInterface",
"PluginModule": "script",
"PluginMethods": "void initialize(const QString &key, QScriptEngine *engine)|QStringList keys() const"
}
},
{
"trKey": "QSqlDriverPlugin",
"value": "'QSqlDriverPlugin', 'sqldrivers', 'QSqlDriverFactoryInterface', 'sql', 'QSqlDriver *create(const QString &key)'"
"value":
{
"BaseClassName": "QSqlDriverPlugin",
"PluginTargetPath": "sqldrivers",
"PluginInterface": "QSqlDriverFactoryInterface",
"PluginModule": "sql",
"PluginMethods": "QSqlDriver *create(const QString &key)"
}
},
{
"trKey": "QStylePlugin",
"value": "'QStylePlugin', 'styles', 'QStyleFactoryInterface', 'widgets', 'QStyle *create(const QString &key)'"
"value":
{
"BaseClassName": "QStylePlugin",
"PluginTargetPath": "styles",
"PluginInterface": "QStyleFactoryInterface",
"PluginModule": "widgets",
"PluginMethods": "QStyle *create(const QString &key)"
}
}
]
}
@@ -172,7 +221,7 @@
"name": "LibraryQtModule",
"trDisplayName": "Qt module:",
"type": "ComboBox",
"visible": "%{JS: '%{Type}' != 'qtplugin'}",
"visible": "%{JS: value('Type') != 'qtplugin'}",
"data":
{
"index": 1,
@@ -206,14 +255,14 @@
"type": "LineEdit",
"trDisplayName": "Header file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}" }
},
{
"name": "SrcFileName",
"type": "LineEdit",
"trDisplayName": "Source file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++src'))}" }
}
]
},
@@ -221,7 +270,7 @@
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data": { "projectFilePath": "%{ProjectFile}" }
},
{
@@ -240,12 +289,12 @@
"source": "project.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "lib.cpp",
@@ -259,17 +308,17 @@
{
"source": "lib_global.h",
"target": "%{GlobalHdrFileName}",
"condition": "%{JS: '%{Type}' === 'shared'}"
"condition": "%{JS: value('Type') === 'shared'}"
},
{
"source": "project.json",
"target": "%{PluginJsonFile}",
"condition": "%{JS: '%{Type}' === 'qtplugin'}"
"condition": "%{JS: value('Type') === 'qtplugin'}"
},
{
"source": "../git.ignore",
"target": ".gitignore",
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -8,13 +8,13 @@
"trDisplayCategory": "Non-Qt Project",
"featuresRequired": [ "ToolChain.Nim.NimToolChain" ],
"icon": "icon.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('Nim') >= 0 }",
"enabled": "%{JS: value('Plugins').indexOf('Nim') >= 0 }",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: '%{NimProjectFile}'}" },
{ "key": "NimProjectFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'nimproject')}" },
{ "key": "NimFileName", "value": "%{JS: 'main.nim'}" }
{ "key": "ProjectFile", "value": "%{NimProjectFile}" },
{ "key": "NimProjectFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'nimproject')}" },
{ "key": "NimFileName", "value": "main.nim" }
],
"pages":
@@ -28,7 +28,7 @@
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data": { "projectFilePath": "%{ProjectFile}" }
},
{
@@ -56,7 +56,7 @@
{
"source": "../git.ignore",
"target": "%{ProjectDirectory}/.gitignore",
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -7,13 +7,13 @@
"trDisplayName": "Plain C Application",
"trDisplayCategory": "Non-Qt Project",
"icon": "../../global/consoleapplication.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0 && ([ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0)}",
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0 && (value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0)}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "CFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-csrc')}" }
],
@@ -29,7 +29,7 @@
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
@@ -44,17 +44,17 @@
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
@@ -65,7 +65,7 @@
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data": { "projectFilePath": "%{ProjectFile}" }
},
{
@@ -84,18 +84,18 @@
"source": "file.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "file.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "main.c",
@@ -105,7 +105,7 @@
{
"source": "../git.ignore",
"target": ".gitignore",
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -8,11 +8,11 @@
"trDisplayCategory": "Other Project",
"icon": "../../../global/guiapplication.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}",
"options":
[
{ "key": "ProFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "IsTopLevelProject", "value": "%{JS: !'%{Exists:ProjectExplorer.Profile.Ids}'}" }
{ "key": "ProFileName", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "IsTopLevelProject", "value": "%{JS: !value('Exists:ProjectExplorer.Profile.Ids')}" }
],
"pages":
@@ -50,7 +50,7 @@
{
"source": "../../git.ignore",
"target": "%{ProjectDirectory}/.gitignore",
"condition": "%{JS: %{IsTopLevelProject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: value('IsTopLevelProject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Qt for Python - Empty",
"trDisplayCategory": "Application",
"icon": "icon.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('PythonEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
"options":

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Qt for Python - Window",
"trDisplayCategory": "Application",
"icon": "icon.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('PythonEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
"options":
@@ -52,14 +52,14 @@
"type": "LineEdit",
"trDisplayName": "Source file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-python')}')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-python'))}" }
},
{
"name": "ProjectFileName",
"type": "LineEdit",
"trDisplayName": "Project file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', 'pyproject')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), 'pyproject')}" }
}
]
},

View File

@@ -8,20 +8,20 @@
"trDisplayCategory": "Application",
"icon": "icon.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
{ "key": "QtQuickWindowVersion", "value": "%{JS: %{QtVersion}.QtQuickWindowVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
{ "key": "QtQuickWindowVersion", "value": "%{JS: value('QtVersion').QtQuickWindowVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0 || [ %{Plugins} ].indexOf('Boot2QtQdb') >= 0}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
],
@@ -36,7 +36,7 @@
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
@@ -51,17 +51,17 @@
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
@@ -86,74 +86,74 @@
{
"trKey": "Qt 5.13",
"value":
"({
'QtQuickVersion': '2.13',
'QtQuickWindowVersion': '2.13',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.13",
"QtQuickWindowVersion": "2.13",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.12",
"value":
"({
'QtQuickVersion': '2.12',
'QtQuickWindowVersion': '2.12',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.12",
"QtQuickWindowVersion": "2.12",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.11",
"value":
"({
'QtQuickVersion': '2.11',
'QtQuickWindowVersion': '2.11',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.11",
"QtQuickWindowVersion": "2.11",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.10",
"value":
"({
'QtQuickVersion': '2.10',
'QtQuickWindowVersion': '2.10',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.10",
"QtQuickWindowVersion": "2.10",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.9",
"value":
"({
'QtQuickVersion': '2.9',
'QtQuickWindowVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
})"
{
"QtQuickVersion": "2.9",
"QtQuickWindowVersion": "2.9",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
}
},
{
"trKey": "Qt 5.8",
"value":
"({
'QtQuickVersion': '2.8',
'QtQuickWindowVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
})"
{
"QtQuickVersion": "2.8",
"QtQuickWindowVersion": "2.8",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
}
},
{
"trKey": "Qt 5.7",
"value":
"({
'QtQuickVersion': '2.7',
'QtQuickWindowVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
})"
{
"QtQuickVersion": "2.7",
"QtQuickWindowVersion": "2.7",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
}
},
{
"trKey": "Qt 5.6",
"value":
"({
'QtQuickVersion': '2.6',
'QtQuickWindowVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.Enterprise.VirtualKeyboard 2.0'
})"
{
"QtQuickVersion": "2.6",
"QtQuickWindowVersion": "2.6",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.0"
}
}
]
}
@@ -173,7 +173,7 @@
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data": {
"projectFilePath": "%{ProjectFile}",
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
@@ -195,19 +195,19 @@
"source": "../app.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "../CMakeLists.txt",
"target": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "../app.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "../main.cpp",
@@ -224,7 +224,7 @@
{
"source": "../../git.ignore",
"target": ".gitignore",
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -8,22 +8,22 @@
"trDisplayCategory": "Application",
"icon": "icon.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.9" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
{ "key": "QtQuickControlsVersion", "value": "%{JS: %{QtVersion}.QtQuickControlsVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickControlsStyle", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyle}" },
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyleTheme}" },
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
{ "key": "QtQuickControlsVersion", "value": "%{JS: value('QtVersion').QtQuickControlsVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0 || [ %{Plugins} ].indexOf('Boot2QtQdb') >= 0}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
],
@@ -38,7 +38,7 @@
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
@@ -53,17 +53,17 @@
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
@@ -88,47 +88,47 @@
{
"trKey": "Qt 5.13",
"value":
"({
'QtQuickVersion': '2.13',
'QtQuickControlsVersion': '2.13',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.13",
"QtQuickControlsVersion": "2.13",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.12",
"value":
"({
'QtQuickVersion': '2.12',
'QtQuickControlsVersion': '2.5',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.12",
"QtQuickControlsVersion": "2.5",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.11",
"value":
"({
'QtQuickVersion': '2.11',
'QtQuickControlsVersion': '2.4',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.11",
"QtQuickControlsVersion": "2.4",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.10",
"value":
"({
'QtQuickVersion': '2.10',
'QtQuickControlsVersion': '2.3',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.10",
"QtQuickControlsVersion": "2.3",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.9",
"value":
"({
'QtQuickVersion': '2.9',
'QtQuickControlsVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
})"
{
"QtQuickVersion": "2.9",
"QtQuickControlsVersion": "2.2",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
}
}
]
}
@@ -145,66 +145,66 @@
{
"trKey": "Default",
"value":
"({
'QtQuickControlsStyle': 'Default',
'QtQuickControlsStyleTheme': ''
})"
{
"QtQuickControlsStyle": "Default",
"QtQuickControlsStyleTheme": ""
}
},
{
"trKey": "Material Light",
"value":
"({
'QtQuickControlsStyle': 'Material',
'QtQuickControlsStyleTheme': 'Light'
})"
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Material Dark",
"value":
"({
'QtQuickControlsStyle': 'Material',
'QtQuickControlsStyleTheme': 'Dark'
})"
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal Light",
"value":
"({
'QtQuickControlsStyle': 'Universal',
'QtQuickControlsStyleTheme': 'Light'
})"
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Universal Dark",
"value":
"({
'QtQuickControlsStyle': 'Universal',
'QtQuickControlsStyleTheme': 'Dark'
})"
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal System",
"value":
"({
'QtQuickControlsStyle': 'Universal',
'QtQuickControlsStyleTheme': 'System'
})"
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "System"
}
},
{
"trKey": "Fusion (Qt 5.10+)",
"value":
"({
'QtQuickControlsStyle': 'Fusion',
'QtQuickControlsStyleTheme': ''
})"
{
"QtQuickControlsStyle": "Fusion",
"QtQuickControlsStyleTheme": ""
}
},
{
"trKey": "Imagine (Qt 5.10+)",
"value":
"({
'QtQuickControlsStyle': 'Imagine',
'QtQuickControlsStyleTheme': ''
})"
{
"QtQuickControlsStyle": "Imagine",
"QtQuickControlsStyleTheme": ""
}
}
]
}
@@ -224,7 +224,7 @@
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data": {
"projectFilePath": "%{ProjectFile}",
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
@@ -246,19 +246,19 @@
"source": "../app.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "../CMakeLists.txt",
"target": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "../app.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "../main.cpp",
@@ -279,7 +279,7 @@
{
"source": "../../git.ignore",
"target": ".gitignore",
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -8,22 +8,22 @@
"trDisplayCategory": "Application",
"icon": "icon.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.7" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
{ "key": "QtQuickControlsVersion", "value": "%{JS: %{QtVersion}.QtQuickControlsVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickControlsStyle", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyle}" },
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyleTheme}" },
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
{ "key": "QtQuickControlsVersion", "value": "%{JS: value('QtVersion').QtQuickControlsVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0 || [ %{Plugins} ].indexOf('Boot2QtQdb') >= 0}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
],
@@ -38,7 +38,7 @@
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
@@ -53,17 +53,17 @@
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
@@ -88,65 +88,65 @@
{
"trKey": "Qt 5.13",
"value":
"({
'QtQuickVersion': '2.13',
'QtQuickControlsVersion': '2.13',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.13",
"QtQuickControlsVersion": "2.13",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.12",
"value":
"({
'QtQuickVersion': '2.12',
'QtQuickControlsVersion': '2.5',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.12",
"QtQuickControlsVersion": "2.5",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.11",
"value":
"({
'QtQuickVersion': '2.11',
'QtQuickControlsVersion': '2.4',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.11",
"QtQuickControlsVersion": "2.4",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.10",
"value":
"({
'QtQuickVersion': '2.10',
'QtQuickControlsVersion': '2.3',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.10",
"QtQuickControlsVersion": "2.3",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.9",
"value":
"({
'QtQuickVersion': '2.9',
'QtQuickControlsVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
})"
{
"QtQuickVersion": "2.9",
"QtQuickControlsVersion": "2.2",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
}
},
{
"trKey": "Qt 5.8",
"value":
"({
'QtQuickVersion': '2.8',
'QtQuickControlsVersion': '2.1',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
})"
{
"QtQuickVersion": "2.8",
"QtQuickControlsVersion": "2.1",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
}
},
{
"trKey": "Qt 5.7",
"value":
"({
'QtQuickVersion': '2.7',
'QtQuickControlsVersion': '2.0',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
})"
{
"QtQuickVersion": "2.7",
"QtQuickControlsVersion": "2.0",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
}
}
]
}
@@ -163,66 +163,66 @@
{
"trKey": "Default",
"value":
"({
'QtQuickControlsStyle': 'Default',
'QtQuickControlsStyleTheme': ''
})"
{
"QtQuickControlsStyle": "Default",
"QtQuickControlsStyleTheme": ""
}
},
{
"trKey": "Material Light",
"value":
"({
'QtQuickControlsStyle': 'Material',
'QtQuickControlsStyleTheme': 'Light'
})"
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Material Dark",
"value":
"({
'QtQuickControlsStyle': 'Material',
'QtQuickControlsStyleTheme': 'Dark'
})"
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal Light",
"value":
"({
'QtQuickControlsStyle': 'Universal',
'QtQuickControlsStyleTheme': 'Light'
})"
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Universal Dark",
"value":
"({
'QtQuickControlsStyle': 'Universal',
'QtQuickControlsStyleTheme': 'Dark'
})"
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal System",
"value":
"({
'QtQuickControlsStyle': 'Universal',
'QtQuickControlsStyleTheme': 'System'
})"
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "System"
}
},
{
"trKey": "Fusion (Qt 5.10+)",
"value":
"({
'QtQuickControlsStyle': 'Fusion',
'QtQuickControlsStyleTheme': ''
})"
{
"QtQuickControlsStyle": "Fusion",
"QtQuickControlsStyleTheme": ""
}
},
{
"trKey": "Imagine (Qt 5.10+)",
"value":
"({
'QtQuickControlsStyle': 'Imagine',
'QtQuickControlsStyleTheme': ''
})"
{
"QtQuickControlsStyle": "Imagine",
"QtQuickControlsStyleTheme": ""
}
}
]
}
@@ -242,7 +242,7 @@
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data": {
"projectFilePath": "%{ProjectFile}",
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
@@ -264,19 +264,19 @@
"source": "../app.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "../CMakeLists.txt",
"target": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "../app.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "../main.cpp",
@@ -309,7 +309,7 @@
{
"source": "../../git.ignore",
"target": ".gitignore",
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -8,22 +8,22 @@
"trDisplayCategory": "Application",
"icon": "icon.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.7" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
{ "key": "QtQuickControlsVersion", "value": "%{JS: %{QtVersion}.QtQuickControlsVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickControlsStyle", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyle}" },
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyleTheme}" },
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
{ "key": "QtQuickControlsVersion", "value": "%{JS: value('QtVersion').QtQuickControlsVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0 || [ %{Plugins} ].indexOf('Boot2QtQdb') >= 0}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
],
@@ -38,7 +38,7 @@
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
@@ -53,17 +53,17 @@
{
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
@@ -88,65 +88,65 @@
{
"trKey": "Qt 5.13",
"value":
"({
'QtQuickVersion': '2.13',
'QtQuickControlsVersion': '2.13',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.13",
"QtQuickControlsVersion": "2.13",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.12",
"value":
"({
'QtQuickVersion': '2.12',
'QtQuickControlsVersion': '2.5',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.12",
"QtQuickControlsVersion": "2.5",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.11",
"value":
"({
'QtQuickVersion': '2.11',
'QtQuickControlsVersion': '2.4',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.11",
"QtQuickControlsVersion": "2.4",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.10",
"value":
"({
'QtQuickVersion': '2.10',
'QtQuickControlsVersion': '2.3',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.10",
"QtQuickControlsVersion": "2.3",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.9",
"value":
"({
'QtQuickVersion': '2.9',
'QtQuickControlsVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
})"
{
"QtQuickVersion": "2.9",
"QtQuickControlsVersion": "2.2",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
}
},
{
"trKey": "Qt 5.8",
"value":
"({
'QtQuickVersion': '2.8',
'QtQuickControlsVersion': '2.1',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
})"
{
"QtQuickVersion": "2.8",
"QtQuickControlsVersion": "2.1",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
}
},
{
"trKey": "Qt 5.7",
"value":
"({
'QtQuickVersion': '2.7',
'QtQuickControlsVersion': '2.0',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
})"
{
"QtQuickVersion": "2.7",
"QtQuickControlsVersion": "2.0",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
}
}
]
}
@@ -163,66 +163,66 @@
{
"trKey": "Default",
"value":
"({
'QtQuickControlsStyle': 'Default',
'QtQuickControlsStyleTheme': ''
})"
{
"QtQuickControlsStyle": "Default",
"QtQuickControlsStyleTheme": ""
}
},
{
"trKey": "Material Light",
"value":
"({
'QtQuickControlsStyle': 'Material',
'QtQuickControlsStyleTheme': 'Light'
})"
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Material Dark",
"value":
"({
'QtQuickControlsStyle': 'Material',
'QtQuickControlsStyleTheme': 'Dark'
})"
{
"QtQuickControlsStyle": "Material",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal Light",
"value":
"({
'QtQuickControlsStyle': 'Universal',
'QtQuickControlsStyleTheme': 'Light'
})"
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Light"
}
},
{
"trKey": "Universal Dark",
"value":
"({
'QtQuickControlsStyle': 'Universal',
'QtQuickControlsStyleTheme': 'Dark'
})"
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "Dark"
}
},
{
"trKey": "Universal System",
"value":
"({
'QtQuickControlsStyle': 'Universal',
'QtQuickControlsStyleTheme': 'System'
})"
{
"QtQuickControlsStyle": "Universal",
"QtQuickControlsStyleTheme": "System"
}
},
{
"trKey": "Fusion (Qt 5.10+)",
"value":
"({
'QtQuickControlsStyle': 'Fusion',
'QtQuickControlsStyleTheme': ''
})"
{
"QtQuickControlsStyle": "Fusion",
"QtQuickControlsStyleTheme": ""
}
},
{
"trKey": "Imagine (Qt 5.10+)",
"value":
"({
'QtQuickControlsStyle': 'Imagine',
'QtQuickControlsStyleTheme': ''
})"
{
"QtQuickControlsStyle": "Imagine",
"QtQuickControlsStyleTheme": ""
}
}
]
}
@@ -242,7 +242,7 @@
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data": {
"projectFilePath": "%{ProjectFile}",
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
@@ -264,19 +264,19 @@
"source": "../app.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "../CMakeLists.txt",
"target": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "../app.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "../main.cpp",
@@ -305,7 +305,7 @@
{
"source": "../../git.ignore",
"target": ".gitignore",
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -7,18 +7,18 @@
"trDisplayName": "Qt Quick UI Prototype",
"trDisplayCategory": "Other Project",
"icon": "qtquickuiprototype.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmlProjectManager') >= 0}",
"featuresRequired": [ "QtSupport.Wizards.FeatureQtQuickProject", "QtSupport.Wizards.FeatureQt" ],
"options":
[
{ "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qmlproject')}" },
{ "key": "MainQmlFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qml')}" },
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
{ "key": "QtQuickWindowVersion", "value": "%{JS: %{QtVersion}.QtQuickWindowVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
{ "key": "QmlProjectFileName", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qmlproject')}" },
{ "key": "MainQmlFileName", "value": "%{JS: Util.fileName(value('ProjectName'), 'qml')}" },
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
{ "key": "QtQuickWindowVersion", "value": "%{JS: value('QtVersion').QtQuickWindowVersion}" },
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0 || [ %{Plugins} ].indexOf('Boot2QtQdb') >= 0}" }
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" }
],
"pages":
@@ -46,74 +46,74 @@
{
"trKey": "Qt 5.13",
"value":
"({
'QtQuickVersion': '2.13',
'QtQuickWindowVersion': '2.13',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.13",
"QtQuickWindowVersion": "2.13",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.12",
"value":
"({
'QtQuickVersion': '2.12',
'QtQuickWindowVersion': '2.12',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
})"
{
"QtQuickVersion": "2.12",
"QtQuickWindowVersion": "2.12",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
}
},
{
"trKey": "Qt 5.11",
"value":
"({
'QtQuickVersion': '2.11',
'QtQuickWindowVersion': '2.11',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.11",
"QtQuickWindowVersion": "2.11",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.10",
"value":
"({
'QtQuickVersion': '2.10',
'QtQuickWindowVersion': '2.10',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
})"
{
"QtQuickVersion": "2.10",
"QtQuickWindowVersion": "2.10",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
}
},
{
"trKey": "Qt 5.9",
"value":
"({
'QtQuickVersion': '2.9',
'QtQuickWindowVersion': '2.3',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
})"
{
"QtQuickVersion": "2.9",
"QtQuickWindowVersion": "2.9",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
}
},
{
"trKey": "Qt 5.8",
"value":
"({
'QtQuickVersion': '2.8',
'QtQuickWindowVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
})"
{
"QtQuickVersion": "2.8",
"QtQuickWindowVersion": "2.8",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
}
},
{
"trKey": "Qt 5.7",
"value":
"({
'QtQuickVersion': '2.7',
'QtQuickWindowVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
})"
{
"QtQuickVersion": "2.7",
"QtQuickWindowVersion": "2.7",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
}
},
{
"trKey": "Qt 5.6",
"value":
"({
'QtQuickVersion': '2.6',
'QtQuickWindowVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.Enterprise.VirtualKeyboard 2.0'
})"
{
"QtQuickVersion": "2.6",
"QtQuickWindowVersion": "2.6",
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.0"
}
}
]
}
@@ -164,7 +164,7 @@
{
"source": "../git.ignore",
"target": "%{ProjectDirectory}/.gitignore",
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -8,18 +8,18 @@
"trDisplayCategory": "Application",
"icon": "../../global/guiapplication.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0}",
"options":
[
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : '%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}'}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile')}" },
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
{ "key": "MainFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
{ "key": "UiHdrFileName", "value": "%{JS: ('%{BuildSystem}' === 'cmake' ? (Util.path('%{FormFileName}') + '/') : '') + 'ui_' + Util.completeBaseName('%{FormFileName}') + '.h'}" },
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard('%{HdrFileName}')}" }
{ "key": "UiHdrFileName", "value": "%{JS: (value('BuildSystem') === 'cmake' ? (Util.path(value('FormFileName')) + '/') : '') + 'ui_' + Util.completeBaseName(value('FormFileName')) + '.h'}" },
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" }
],
"pages":
@@ -34,7 +34,7 @@
"trDisplayName": "Define Build System",
"trShortTitle": "Build System",
"typeId": "Fields",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data":
[
{
@@ -47,19 +47,19 @@
"items":
[
{
"trKey": "QMake",
"trKey": "qmake",
"value": "qmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
},
{
"trKey": "CMake",
"value": "cmake",
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
},
{
"trKey": "Qbs",
"value": "qbs",
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
}
]
}
@@ -93,7 +93,7 @@
"data":
{
"validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)",
"trText": "%{JS: '%{BaseClass}'.slice(1)}"
"trText": "%{JS: value('BaseClass') ? value('BaseClass').slice(1) : 'MyClass'}"
}
},
{
@@ -114,14 +114,14 @@
"type": "LineEdit",
"trDisplayName": "Header file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}" }
},
{
"name": "SrcFileName",
"type": "LineEdit",
"trDisplayName": "Source file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), Util.preferredSuffix('text/x-c++src'))}" }
},
{
"name": "GenerateForm",
@@ -135,7 +135,7 @@
"trDisplayName": "Form file:",
"enabled": "%{GenerateForm}",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', 'ui')}" }
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), 'ui')}" }
}
]
},
@@ -143,7 +143,7 @@
"trDisplayName": "Kit Selection",
"trShortTitle": "Kits",
"typeId": "Kits",
"enabled": "%{JS: ! %{IsSubproject}}",
"enabled": "%{JS: !value('IsSubproject')}",
"data": { "projectFilePath": "%{ProjectFile}" }
},
{
@@ -162,18 +162,18 @@
"source": "project.pro",
"target": "%{ProFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
},
{
"source": "CMakeLists.txt",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
},
{
"source": "project.qbs",
"target": "%{QbsFile}",
"openAsProject": true,
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
},
{
"source": "main.cpp",
@@ -196,7 +196,7 @@
{
"source": "../git.ignore",
"target": ".gitignore",
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
}
]
}

View File

@@ -295,6 +295,29 @@ QByteArray MacroExpander::expand(const QByteArray &stringWithVariables) const
return expand(QString::fromLatin1(stringWithVariables)).toLatin1();
}
QVariant MacroExpander::expandVariant(const QVariant &v) const
{
const auto type = QMetaType::Type(v.type());
if (type == QMetaType::QString) {
return expand(v.toString());
} else if (type == QMetaType::QStringList) {
return Utils::transform(v.toStringList(),
[this](const QString &s) -> QVariant { return expand(s); });
} else if (type == QMetaType::QVariantList) {
return Utils::transform(v.toList(), [this](const QVariant &v) { return expandVariant(v); });
} else if (type == QMetaType::QVariantMap) {
const auto map = v.toMap();
QVariantMap result;
QMapIterator<QString, QVariant> it(map);
while (it.hasNext()) {
it.next();
result.insert(it.key(), expandVariant(it.value()));
}
return result;
}
return v;
}
QString MacroExpander::expandProcessArgs(const QString &argsWithVariables) const
{
return QtcProcess::expandMacros(argsWithVariables, d);

View File

@@ -56,6 +56,7 @@ public:
QString expand(const QString &stringWithVariables) const;
QByteArray expand(const QByteArray &stringWithVariables) const;
QVariant expandVariant(const QVariant &v) const;
QString expandProcessArgs(const QString &argsWithVariables) const;

View File

@@ -29,6 +29,7 @@
#include <QSet>
#include <QString>
#include <QVariant>
#include <QWizardPage>
#include <functional>
@@ -41,30 +42,30 @@ namespace Internal {
class QTCREATOR_UTILS_EXPORT ObjectToFieldWidgetConverter : public QWidget
{
Q_OBJECT
Q_PROPERTY(QString text READ text NOTIFY textChanged)
Q_PROPERTY(QVariant value READ value NOTIFY valueChanged)
public:
template <class T, typename... Arguments>
static ObjectToFieldWidgetConverter *create(T *sender, void (T::*member)(Arguments...), const std::function<QString()> &toTextFunction)
template<class T, typename... Arguments>
static ObjectToFieldWidgetConverter *create(T *sender,
void (T::*member)(Arguments...),
const std::function<QVariant()> &toVariantFunction)
{
auto widget = new ObjectToFieldWidgetConverter();
widget->toTextFunction = toTextFunction;
widget->toVariantFunction = toVariantFunction;
connect(sender, &QObject::destroyed, widget, &QObject::deleteLater);
connect(sender, member, widget, [widget] () {
emit widget->textChanged(widget->text());
});
connect(sender, member, widget, [widget]() { emit widget->valueChanged(widget->value()); });
return widget;
}
signals:
void textChanged(const QString&);
void valueChanged(const QVariant &);
private:
ObjectToFieldWidgetConverter () = default;
// is used by the property text
QString text() {return toTextFunction();}
std::function<QString()> toTextFunction;
// is used by the property value
QVariant value() { return toVariantFunction(); }
std::function<QVariant()> toVariantFunction;
};
} // Internal
@@ -79,10 +80,17 @@ public:
virtual void pageWasAdded(); // called when this page was added to a Utils::Wizard
template<class T, typename... Arguments>
void registerObjectAsFieldWithName(const QString &name, T *sender, void (T::*changeSignal)(Arguments...),
const std::function<QString()> &senderToString)
void registerObjectAsFieldWithName(const QString &name,
T *sender,
void (T::*changeSignal)(Arguments...),
const std::function<QVariant()> &senderToVariant)
{
registerFieldWithName(name, Internal::ObjectToFieldWidgetConverter::create(sender, changeSignal, senderToString), "text", SIGNAL(textChanged(QString)));
registerFieldWithName(name,
Internal::ObjectToFieldWidgetConverter::create(sender,
changeSignal,
senderToVariant),
"value",
SIGNAL(valueChanged(QValue)));
}
void registerFieldWithName(const QString &name, QWidget *widget,

View File

@@ -34,8 +34,26 @@
#include <QDebug>
#include <QJSEngine>
namespace Core {
#include <unordered_map>
namespace std {
template<> struct hash<QString>
{
using argument_type = QString;
using result_type = size_t;
result_type operator()(const argument_type &v) const
{
return hash<string>()(v.toStdString());
}
};
} // namespace std
using ExtensionMap = std::unordered_map<QString, Core::JsExpander::ObjectFactory>;
Q_GLOBAL_STATIC(ExtensionMap, globalJsExtensions);
static Core::JsExpander *globalExpander = nullptr;
namespace Core {
namespace Internal {
class JsExpanderPrivate {
@@ -45,9 +63,14 @@ public:
} // namespace Internal
static Internal::JsExpanderPrivate *d;
void JsExpander::registerGlobalObject(const QString &name, const ObjectFactory &factory)
{
globalJsExtensions->insert({name, factory});
if (globalExpander)
globalExpander->registerObject(name, factory());
}
void JsExpander::registerQObjectForJs(const QString &name, QObject *obj)
void JsExpander::registerObject(const QString &name, QObject *obj)
{
QJSValue jsObj = d->m_engine.newQObject(obj);
d->m_engine.globalObject().setProperty(name, jsObj);
@@ -77,16 +100,21 @@ QString JsExpander::evaluate(const QString &expression, QString *errorMessage)
return QString();
}
JsExpander::JsExpander()
QJSEngine &JsExpander::engine()
{
d = new Internal::JsExpanderPrivate;
Utils::globalMacroExpander()->registerPrefix("JS",
return d->m_engine;
}
void JsExpander::registerForExpander(Utils::MacroExpander *macroExpander)
{
macroExpander->registerPrefix(
"JS",
QCoreApplication::translate("Core::JsExpander",
"Evaluate simple JavaScript statements.<br>"
"The statements may not contain '{' nor '}' characters."),
[](QString in) -> QString {
[this](QString in) -> QString {
QString errorMessage;
QString result = JsExpander::evaluate(in, &errorMessage);
QString result = evaluate(in, &errorMessage);
if (!errorMessage.isEmpty()) {
qWarning() << errorMessage;
return errorMessage;
@@ -94,8 +122,21 @@ JsExpander::JsExpander()
return result;
}
});
}
registerQObjectForJs(QLatin1String("Util"), new Internal::UtilsJsExtension);
JsExpander *JsExpander::createGlobalJsExpander()
{
globalExpander = new JsExpander();
registerGlobalObject<Internal::UtilsJsExtension>("Util");
globalExpander->registerForExpander(Utils::globalMacroExpander());
return globalExpander;
}
JsExpander::JsExpander()
{
d = new Internal::JsExpanderPrivate;
for (const std::pair<const QString, ObjectFactory> &obj : *globalJsExtensions)
registerObject(obj.first, obj.second());
}
JsExpander::~JsExpander()

View File

@@ -27,26 +27,51 @@
#include "core_global.h"
#include <functional>
QT_BEGIN_NAMESPACE
class QJSEngine;
class QObject;
class QString;
QT_END_NAMESPACE
namespace Utils {
class MacroExpander;
}
namespace Core {
namespace Internal { class MainWindow; }
namespace Internal {
class MainWindow;
class JsExpanderPrivate;
} // namespace Internal
class CORE_EXPORT JsExpander
{
public:
static void registerQObjectForJs(const QString &name, QObject *obj);
using ObjectFactory = std::function<QObject *()>;
static QString evaluate(const QString &expression, QString *errorMessage = nullptr);
private:
JsExpander();
~JsExpander();
template <class T>
static void registerGlobalObject(const QString &name)
{
registerGlobalObject(name, []{ return new T; });
}
static void registerGlobalObject(const QString &name, const ObjectFactory &factory);
void registerObject(const QString &name, QObject *obj);
QString evaluate(const QString &expression, QString *errorMessage = nullptr);
QJSEngine &engine();
void registerForExpander(Utils::MacroExpander *macroExpander);
private:
static JsExpander *createGlobalJsExpander();
Internal::JsExpanderPrivate *d;
friend class Core::Internal::MainWindow;
};

View File

@@ -100,25 +100,26 @@ namespace Internal {
enum { debugMainWindow = 0 };
MainWindow::MainWindow() :
AppMainWindow(),
m_coreImpl(new ICore(this)),
m_lowPrioAdditionalContexts(Constants::C_GLOBAL),
m_settingsDatabase(new SettingsDatabase(QFileInfo(PluginManager::settings()->fileName()).path(),
QLatin1String(Constants::IDE_CASED_ID),
this)),
m_progressManager(new ProgressManagerPrivate),
m_jsExpander(new JsExpander),
m_vcsManager(new VcsManager),
m_modeStack(new FancyTabWidget(this)),
m_generalSettings(new GeneralSettings),
m_systemSettings(new SystemSettings),
m_shortcutSettings(new ShortcutSettings),
m_toolSettings(new ToolSettings),
m_mimeTypeSettings(new MimeTypeSettings),
m_systemEditor(new SystemEditor),
m_toggleLeftSideBarButton(new QToolButton),
m_toggleRightSideBarButton(new QToolButton)
MainWindow::MainWindow()
: AppMainWindow()
, m_coreImpl(new ICore(this))
, m_lowPrioAdditionalContexts(Constants::C_GLOBAL)
, m_settingsDatabase(
new SettingsDatabase(QFileInfo(PluginManager::settings()->fileName()).path(),
QLatin1String(Constants::IDE_CASED_ID),
this))
, m_progressManager(new ProgressManagerPrivate)
, m_jsExpander(JsExpander::createGlobalJsExpander())
, m_vcsManager(new VcsManager)
, m_modeStack(new FancyTabWidget(this))
, m_generalSettings(new GeneralSettings)
, m_systemSettings(new SystemSettings)
, m_shortcutSettings(new ShortcutSettings)
, m_toolSettings(new ToolSettings)
, m_mimeTypeSettings(new MimeTypeSettings)
, m_systemEditor(new SystemEditor)
, m_toggleLeftSideBarButton(new QToolButton)
, m_toggleRightSideBarButton(new QToolButton)
{
(void) new DocumentManager(this);

View File

@@ -172,7 +172,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
d = new CppToolsPluginPrivate;
JsExpander::registerQObjectForJs(QLatin1String("Cpp"), new CppToolsJsExtension);
JsExpander::registerGlobalObject<CppToolsJsExtension>("Cpp");
// Menus
ActionContainer *mtools = ActionManager::actionContainer(Core::Constants::M_TOOLS);

View File

@@ -117,7 +117,7 @@ bool FormTemplateWizardPage::validatePage()
QMessageBox::critical(this, tr("%1 - Error").arg(title()), errorMessage);
return false;
}
wizard()->setProperty("FormContents", m_templateContents.split('\n'));
wizard()->setProperty("FormContents", m_templateContents);
return true;
}

View File

@@ -35,7 +35,7 @@ class JsExtension : public QObject
Q_OBJECT
public:
JsExtension(QObject *parent = nullptr) : QObject(parent) { }
JsExtension() {}
Q_INVOKABLE QString fileNameToElementName(const QString &file);
Q_INVOKABLE QString elementNameToFileName(const QString &element);

View File

@@ -92,7 +92,7 @@ bool ModelEditorPlugin::initialize(const QStringList &arguments, QString *errorS
d->modelFactory = new ModelEditorFactory(d->uiController, this);
d->settingsController = new SettingsController(this);
Core::JsExpander::registerQObjectForJs(QLatin1String("Modeling"), new JsExtension(this));
Core::JsExpander::registerGlobalObject<JsExtension>("Modeling");
connect(d->settingsController, &SettingsController::saveSettings,
d->uiController, &UiController::saveSettings);

View File

@@ -810,7 +810,7 @@ std::unique_ptr<QStandardItem> createStandardItemFromListItem(const QVariant &it
if (item.type() == QVariant::Map) {
QVariantMap tmp = item.toMap();
const QString key = JsonWizardFactory::localizedString(consumeValue(tmp, "trKey", QString()).toString());
const QString value = consumeValue(tmp, "value", key).toString();
const QVariant value = consumeValue(tmp, "value", key);
if (key.isNull() || key.isEmpty()) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
@@ -920,7 +920,7 @@ void ListField::initializeData(MacroExpander *expander)
if (item.get() == currentItem)
currentItem = expandedValuesItem;
expandedValuesItem->setText(expander->expand(item->text()));
expandedValuesItem->setData(expander->expand(item->data(ValueRole).toString()), ValueRole);
expandedValuesItem->setData(expander->expandVariant(item->data(ValueRole)), ValueRole);
expandedValuesItem->setData(expander->expand(item->data(IconStringRole).toString()), IconStringRole);
expandedValuesItem->setData(condition, ConditionRole);
@@ -1020,8 +1020,8 @@ void ComboBoxField::setup(JsonFieldPage *page, const QString &name)
page->registerObjectAsFieldWithName<QItemSelectionModel>(name, selectionModel(), &QItemSelectionModel::selectionChanged, [this]() {
const QModelIndex i = selectionModel()->currentIndex();
if (i.isValid())
return i.data(ValueRole).toString();
return QString();
return i.data(ValueRole);
return QVariant();
});
QObject::connect(selectionModel(), &QItemSelectionModel::selectionChanged, page, [page]() {
emit page->completeChanged();
@@ -1058,8 +1058,8 @@ void IconListField::setup(JsonFieldPage *page, const QString &name)
page->registerObjectAsFieldWithName<QItemSelectionModel>(name, selectionModel(), &QItemSelectionModel::selectionChanged, [this]() {
const QModelIndex i = selectionModel()->currentIndex();
if (i.isValid())
return i.data(ValueRole).toString();
return QString();
return i.data(ValueRole);
return QVariant();
});
QObject::connect(selectionModel(), &QItemSelectionModel::selectionChanged, page, [page]() {
emit page->completeChanged();

View File

@@ -45,6 +45,7 @@
#include <QDialogButtonBox>
#include <QDir>
#include <QFileInfo>
#include <QJSEngine>
#include <QLabel>
#include <QMessageBox>
#include <QPushButton>
@@ -143,7 +144,8 @@ private:
} // namespace Internal
JsonWizard::JsonWizard(QWidget *parent) : Utils::Wizard(parent)
JsonWizard::JsonWizard(QWidget *parent)
: Utils::Wizard(parent)
{
setMinimumSize(800, 500);
m_expander.registerExtraResolver([this](const QString &name, QString *ret) -> bool {
@@ -157,7 +159,10 @@ JsonWizard::JsonWizard(QWidget *parent) : Utils::Wizard(parent)
const QString key = QString::fromLatin1("%{") + value + QLatin1Char('}');
return m_expander.expand(key) == key ? QString() : QLatin1String("true");
});
// override default JS macro by custom one that adds Wizard specific features
m_jsExpander.registerObject("Wizard", new Internal::JsonWizardJsExtension(this));
m_jsExpander.engine().evaluate("var value = Wizard.value");
m_jsExpander.registerForExpander(&m_expander);
}
JsonWizard::~JsonWizard()
@@ -520,4 +525,17 @@ bool JsonWizard::OptionDefinition::condition(Utils::MacroExpander &expander) con
return JsonWizard::boolFromVariant(m_condition, &expander);
}
namespace Internal {
JsonWizardJsExtension::JsonWizardJsExtension(JsonWizard *wizard)
: m_wizard(wizard)
{}
QVariant JsonWizardJsExtension::value(const QString &name) const
{
const QVariant value = m_wizard->value(name);
return m_wizard->expander()->expandVariant(m_wizard->value(name));
}
} // namespace Internal
} // namespace ProjectExplorer

View File

@@ -29,6 +29,7 @@
#include <projectexplorer/projectnodes.h>
#include <coreplugin/generatedfile.h>
#include <coreplugin/jsexpander.h>
#include <utils/wizard.h>
#include <utils/macroexpander.h>
@@ -37,8 +38,25 @@
namespace ProjectExplorer {
class JsonWizard;
class JsonWizardGenerator;
namespace Internal {
class JsonWizardJsExtension : public QObject
{
Q_OBJECT
public:
JsonWizardJsExtension(JsonWizard *wizard);
Q_INVOKABLE QVariant value(const QString &name) const;
private:
JsonWizard *m_wizard;
};
} // namespace Internal
// Documentation inside.
class PROJECTEXPLORER_EXPORT JsonWizard : public Utils::Wizard
{
@@ -126,6 +144,7 @@ private:
GeneratorFiles m_files;
Utils::MacroExpander m_expander;
Core::JsExpander m_jsExpander;
};
} // namespace ProjectExplorer

View File

@@ -34,6 +34,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/jsexpander.h>
#include <coreplugin/messagemanager.h>
#include <extensionsystem/pluginmanager.h>
@@ -46,10 +47,11 @@
#include <QDebug>
#include <QDir>
#include <QMap>
#include <QJSEngine>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonParseError>
#include <QMap>
#include <QUuid>
namespace ProjectExplorer {
@@ -513,9 +515,17 @@ bool JsonWizardFactory::isAvailable(Core::Id platformId) const
[platformId]() { return platformId.toString(); });
expander.registerVariable("Features", tr("The features available to this wizard."),
[this, e, platformId]() { return JsonWizard::stringListToArrayString(Core::Id::toStringList(availableFeatures(platformId)), e); });
expander.registerVariable("Plugins", tr("The plugins loaded."),
[this, e]() { return JsonWizard::stringListToArrayString(Core::Id::toStringList(pluginFeatures()), e); });
expander.registerVariable("Plugins", tr("The plugins loaded."), [this, e]() {
return JsonWizard::stringListToArrayString(Core::Id::toStringList(pluginFeatures()), e);
});
Core::JsExpander jsExpander;
jsExpander.registerObject("Wizard",
new Internal::JsonWizardFactoryJsExtension(platformId,
availableFeatures(
platformId),
pluginFeatures()));
jsExpander.engine().evaluate("var value = Wizard.value");
jsExpander.registerForExpander(e);
return JsonWizard::boolFromVariant(m_enabledExpression, &expander);
}
@@ -660,4 +670,26 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const QDir &baseDir,
return errorMessage->isEmpty();
}
namespace Internal {
JsonWizardFactoryJsExtension::JsonWizardFactoryJsExtension(Core::Id platformId,
const QSet<Core::Id> &availableFeatures,
const QSet<Core::Id> &pluginFeatures)
: m_platformId(platformId)
, m_availableFeatures(availableFeatures)
, m_pluginFeatures(pluginFeatures)
{}
QVariant JsonWizardFactoryJsExtension::value(const QString &name) const
{
if (name == "Platform")
return m_platformId.toString();
if (name == "Features")
return Core::Id::toStringList(m_availableFeatures);
if (name == "Plugins")
return Core::Id::toStringList(m_pluginFeatures);
return QVariant();
}
} // namespace Internal
} // namespace ProjectExplorer

View File

@@ -119,4 +119,23 @@ private:
friend class ProjectExplorerPluginPrivate;
};
} //namespace ProjectExplorer
namespace Internal {
class JsonWizardFactoryJsExtension : public QObject
{
Q_OBJECT
public:
JsonWizardFactoryJsExtension(Core::Id platformId,
const QSet<Core::Id> &availableFeatures,
const QSet<Core::Id> &pluginFeatures);
Q_INVOKABLE QVariant value(const QString &name) const;
private:
Core::Id m_platformId;
QSet<Core::Id> m_availableFeatures;
QSet<Core::Id> m_pluginFeatures;
};
} // namespace Internal
} // namespace ProjectExplorer

View File

@@ -127,7 +127,9 @@ Core::GeneratedFile JsonWizardFileGenerator::generateFile(const File &file,
*ret = options.value(n);
return true;
});
nested.registerExtraResolver([expander](QString n, QString *ret) { return expander->resolveMacro(n, ret); });
nested.registerExtraResolver([expander](QString n, QString *ret) {
return expander->resolveMacro(n, ret);
});
gf.setContents(Utils::TemplateEngine::processText(&nested, QString::fromUtf8(reader.data()),
errorMessage));

View File

@@ -85,7 +85,7 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
ProFileEvaluator::initialize();
new ProFileCacheManager(this);
JsExpander::registerQObjectForJs(QLatin1String("QtSupport"), new CodeGenerator);
JsExpander::registerGlobalObject<CodeGenerator>("QtSupport");
d = new QtSupportPluginPrivate;

View File

@@ -98,7 +98,7 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
JsonWizardFactory::registerPageFactory(new Internal::VcsConfigurationPageFactory);
JsonWizardFactory::registerPageFactory(new Internal::VcsCommandPageFactory);
JsExpander::registerQObjectForJs(QLatin1String("Vcs"), new VcsJsExtension);
JsExpander::registerGlobalObject<VcsJsExtension>("Vcs");
Utils::MacroExpander *expander = Utils::globalMacroExpander();
expander->registerVariable(Constants::VAR_VCS_NAME,