forked from qt-creator/qt-creator
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:
@@ -98,15 +98,22 @@
|
|||||||
|
|
||||||
\section1 Using Variables in Wizards
|
\section1 Using Variables in Wizards
|
||||||
|
|
||||||
You can use variables (\c {%\{<variableName>\}}) in the configuration and
|
You can use variables (\c {%\{<variableName>\}}) in strings in the JSON configuration
|
||||||
template source files. A set of variables is predefined by the wizards and
|
file and in template source files.
|
||||||
their pages. You can introduce new variables as shortcuts to be used later.
|
A set of variables is predefined by the wizards and their pages.
|
||||||
Define the variable key names and values in the \c options section in the
|
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.
|
\c {wizard.json} file.
|
||||||
|
|
||||||
The variables always return strings. In places where a boolean value is
|
There is a special variable \c {%\{JS:<JavaScript expression>\}} which evaluates the given
|
||||||
expected and a string is given, an empty string as well as the string
|
JavaScript expression and converts the resulting JavaScript value to a string.
|
||||||
\c {"false"} is treated as \c false and anything else as \c true.
|
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
|
\section1 Localizing Wizards
|
||||||
|
|
||||||
@@ -221,7 +228,7 @@
|
|||||||
"trDisplayName": "C++ Class",
|
"trDisplayName": "C++ Class",
|
||||||
"trDisplayCategory": "C++",
|
"trDisplayCategory": "C++",
|
||||||
"icon": "../../global/genericfilewizard.png",
|
"icon": "../../global/genericfilewizard.png",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\list
|
\list
|
||||||
@@ -295,11 +302,11 @@
|
|||||||
{ "key": "TargetPath", "value": "%{Path}" },
|
{ "key": "TargetPath", "value": "%{Path}" },
|
||||||
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
|
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
|
||||||
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
|
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
|
||||||
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
|
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||||
{ "key": "Base", "value": "%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" },
|
{ "key": "Base", "value": "%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" },
|
||||||
{ "key": "isQObject", "value": "%{JS: ('%{Base}' === 'QObject' || '%{Base}' === 'QWidget' || '%{Base}' === 'QMainWindow' || '%{Base}' === 'QDeclarativeItem' || '%{Base}' === 'QQuickItem' ) ? 'yes' : ''}" },
|
{ "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('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" },
|
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}" },
|
||||||
{ "key": "SharedDataInit", "value": "%{JS: ('%{IncludeQSharedData}') ? 'data(new %{CN}Data)' : '' }" }
|
{ "key": "SharedDataInit", "value": "%{JS: value('IncludeQSharedData') ? 'data(new %{CN}Data)' : '' }" }
|
||||||
],
|
],
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
@@ -712,7 +719,7 @@
|
|||||||
{
|
{
|
||||||
"checkedValue": "QObject",
|
"checkedValue": "QObject",
|
||||||
"uncheckedValue": "",
|
"uncheckedValue": "",
|
||||||
"checked": "%{JS: ('%{BaseCB}' === 'QObject' ) ? 'yes' : ''}"
|
"checked": "%{JS: value('BaseCB') === 'QObject' ? 'true' : 'false'}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
\endcode
|
\endcode
|
||||||
@@ -788,7 +795,7 @@
|
|||||||
"name": "LabelQQC_2_0",
|
"name": "LabelQQC_2_0",
|
||||||
"type": "Label",
|
"type": "Label",
|
||||||
"span": true,
|
"span": true,
|
||||||
"visible": "%{( '%{CS}' === 'QQC_2_0' )}",
|
"visible": "%{JS: value('CS') === 'QQC_2_0'}",
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"wordWrap": true,
|
"wordWrap": true,
|
||||||
@@ -819,7 +826,7 @@
|
|||||||
{
|
{
|
||||||
"name": "BaseEdit",
|
"name": "BaseEdit",
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"enabled": "%{JS: ( '%{BaseCB}' === '' ) ? 'yes' : ''}",
|
"enabled": "%{JS: value('BaseCB') === '' ? 'true' : 'false'}",
|
||||||
"mandatory": false,
|
"mandatory": false,
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
|
@@ -8,19 +8,19 @@
|
|||||||
"trDisplayCategory": "Other Project",
|
"trDisplayCategory": "Other Project",
|
||||||
"icon": "autotest.png",
|
"icon": "autotest.png",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureDesktop" ],
|
"featuresRequired": [ "QtSupport.Wizards.FeatureDesktop" ],
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('AutoTest') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('AutoTest') >= 0}",
|
||||||
|
|
||||||
"options":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFilePath",
|
{ "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",
|
{ "key": "ProFileName",
|
||||||
"value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}"
|
"value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "QbsFileName",
|
"key": "QbsFileName",
|
||||||
"value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}"
|
"value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "CMakeFileName",
|
"key": "CMakeFileName",
|
||||||
@@ -34,19 +34,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "TestCaseFileWithHeaderSuffix",
|
"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",
|
"key": "GUARD",
|
||||||
"value": "%{JS: '%{TestCaseFileWithHeaderSuffix}'.toUpperCase().replace('.', '_') }"
|
"value": "%{JS: value('TestCaseFileWithHeaderSuffix').toUpperCase().replace('.', '_') }"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "TestCaseFileWithCppSuffix",
|
"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",
|
"key": "TestCaseFileWithQmlSuffix",
|
||||||
"value": "%{JS: 'tst_%{TestCaseName}.qml'.toLowerCase() }"
|
"value": "%{JS: 'tst_' + value('TestCaseName').toLowerCase() + '.qml' }"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
{
|
{
|
||||||
"name": "RequireGUI",
|
"name": "RequireGUI",
|
||||||
"trDisplayName": "GUI Application",
|
"trDisplayName": "GUI Application",
|
||||||
"visible": "%{JS: '%{TestFrameWork}' === 'QtTest'}",
|
"visible": "%{JS: value('TestFrameWork') === 'QtTest'}",
|
||||||
"type": "CheckBox",
|
"type": "CheckBox",
|
||||||
"data": {
|
"data": {
|
||||||
"checked": false
|
"checked": false
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
{
|
{
|
||||||
"name": "RequireApplication",
|
"name": "RequireApplication",
|
||||||
"trDisplayName": "Requires QApplication",
|
"trDisplayName": "Requires QApplication",
|
||||||
"visible": "%{JS: '%{TestFrameWork}' === 'QtTest'}",
|
"visible": "%{JS: value('TestFrameWork') === 'QtTest'}",
|
||||||
"type": "CheckBox",
|
"type": "CheckBox",
|
||||||
"data": {
|
"data": {
|
||||||
"checked": false
|
"checked": false
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
{
|
{
|
||||||
"name": "GenerateInitAndCleanup",
|
"name": "GenerateInitAndCleanup",
|
||||||
"trDisplayName": "Generate initialization and cleanup code",
|
"trDisplayName": "Generate initialization and cleanup code",
|
||||||
"visible": "%{JS: [ 'QtTest', 'QtQuickTest' ].indexOf('%{TestFrameWork}') >= 0 }",
|
"visible": "%{JS: [ 'QtTest', 'QtQuickTest' ].indexOf(value('TestFrameWork')) >= 0 }",
|
||||||
"type": "CheckBox",
|
"type": "CheckBox",
|
||||||
"data": {
|
"data": {
|
||||||
"checked": false
|
"checked": false
|
||||||
@@ -129,14 +129,14 @@
|
|||||||
{
|
{
|
||||||
"name": "TestSetName",
|
"name": "TestSetName",
|
||||||
"trDisplayName": "Test set name:",
|
"trDisplayName": "Test set name:",
|
||||||
"visible": "%{JS: '%{TestFrameWork}' === 'GTest'}",
|
"visible": "%{JS: value('TestFrameWork') === 'GTest'}",
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"data": { "validator": "^[a-zA-Z0-9]+$" }
|
"data": { "validator": "^[a-zA-Z0-9]+$" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "GTestCXX11",
|
"name": "GTestCXX11",
|
||||||
"trDisplayName": "Enable C++11",
|
"trDisplayName": "Enable C++11",
|
||||||
"visible": "%{JS: '%{TestFrameWork}' === 'GTest'}",
|
"visible": "%{JS: value('TestFrameWork') === 'GTest'}",
|
||||||
"type": "CheckBox",
|
"type": "CheckBox",
|
||||||
"data": {
|
"data": {
|
||||||
"checked": false
|
"checked": false
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
{
|
{
|
||||||
"name": "GTestRepository",
|
"name": "GTestRepository",
|
||||||
"trDisplayName": "Googletest repository:",
|
"trDisplayName": "Googletest repository:",
|
||||||
"visible": "%{JS: '%{TestFrameWork}' === 'GTest'}",
|
"visible": "%{JS: value('TestFrameWork') === 'GTest'}",
|
||||||
"type": "PathChooser",
|
"type": "PathChooser",
|
||||||
"data": {
|
"data": {
|
||||||
"kind": "existingDirectory"
|
"kind": "existingDirectory"
|
||||||
@@ -163,17 +163,17 @@
|
|||||||
{
|
{
|
||||||
"trKey": "qmake",
|
"trKey": "qmake",
|
||||||
"value": "qmake",
|
"value": "qmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "CMake",
|
"trKey": "CMake",
|
||||||
"value": "cmake",
|
"value": "cmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qbs",
|
"trKey": "Qbs",
|
||||||
"value": "qbs",
|
"value": "qbs",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
"enabled": "%{IsTopLevelProject}",
|
"enabled": "%{IsTopLevelProject}",
|
||||||
"data": {
|
"data": {
|
||||||
"projectFilePath": "%{ProjectFilePath}",
|
"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",
|
"source": "files/gtest_dependency.pri",
|
||||||
"target": "gtest_dependency.pri",
|
"target": "gtest_dependency.pri",
|
||||||
"condition": "%{JS: '%{TestFrameWork}' == 'GTest' && '%{BuildSystem}' == 'qmake'}",
|
"condition": "%{JS: value('TestFrameWork') == 'GTest' && value('BuildSystem') == 'qmake'}",
|
||||||
"openInEditor": false
|
"openInEditor": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "files/googlecommon.js",
|
"source": "files/googlecommon.js",
|
||||||
"target": "googlecommon.js",
|
"target": "googlecommon.js",
|
||||||
"condition": "%{JS: '%{TestFrameWork}' == 'GTest' && '%{BuildSystem}' == 'qbs'}",
|
"condition": "%{JS: value('TestFrameWork') == 'GTest' && value('BuildSystem') == 'qbs'}",
|
||||||
"openInEditor": false
|
"openInEditor": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "files/tst.pro",
|
"source": "files/tst.pro",
|
||||||
"target": "%{ProjectFilePath}",
|
"target": "%{ProjectFilePath}",
|
||||||
"condition": "%{JS: '%{BuildSystem}' == 'qmake'}",
|
"condition": "%{JS: value('BuildSystem') == 'qmake'}",
|
||||||
"openInEditor": false,
|
"openInEditor": false,
|
||||||
"openAsProject": true
|
"openAsProject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "files/tst.qbs",
|
"source": "files/tst.qbs",
|
||||||
"target": "%{ProjectFilePath}",
|
"target": "%{ProjectFilePath}",
|
||||||
"condition": "%{JS: '%{BuildSystem}' == 'qbs'}",
|
"condition": "%{JS: value('BuildSystem') == 'qbs'}",
|
||||||
"openInEditor": false,
|
"openInEditor": false,
|
||||||
"openAsProject": true
|
"openAsProject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "files/tst.txt",
|
"source": "files/tst.txt",
|
||||||
"target": "CMakeLists.txt",
|
"target": "CMakeLists.txt",
|
||||||
"condition": "%{JS: '%{BuildSystem}' == 'cmake'}",
|
"condition": "%{JS: value('BuildSystem') == 'cmake'}",
|
||||||
"openInEditor": false,
|
"openInEditor": false,
|
||||||
"openAsProject": true
|
"openAsProject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "files/tst_src.h",
|
"source": "files/tst_src.h",
|
||||||
"target": "%{TestCaseFileWithHeaderSuffix}",
|
"target": "%{TestCaseFileWithHeaderSuffix}",
|
||||||
"condition": "%{JS: '%{TestFrameWork}' == 'GTest'}",
|
"condition": "%{JS: value('TestFrameWork') == 'GTest'}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "files/tst_src.cpp",
|
"source": "files/tst_src.cpp",
|
||||||
"target": "%{TestCaseFileWithCppSuffix}",
|
"target": "%{TestCaseFileWithCppSuffix}",
|
||||||
"condition": "%{JS: '%{TestFrameWork}' == 'QtTest'}",
|
"condition": "%{JS: value('TestFrameWork') == 'QtTest'}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "files/tst_main.cpp",
|
"source": "files/tst_main.cpp",
|
||||||
"target": "%{MainCppName}",
|
"target": "%{MainCppName}",
|
||||||
"condition": "%{JS: ['GTest', 'QtQuickTest'].indexOf('%{TestFrameWork}') >= 0}",
|
"condition": "%{JS: ['GTest', 'QtQuickTest'].indexOf(value('TestFrameWork')) >= 0}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "files/tst_qml.tmpl",
|
"source": "files/tst_qml.tmpl",
|
||||||
"target": "%{TestCaseFileWithQmlSuffix}",
|
"target": "%{TestCaseFileWithQmlSuffix}",
|
||||||
"condition": "%{JS: '%{TestFrameWork}' === 'QtQuickTest'}",
|
"condition": "%{JS: value('TestFrameWork') === 'QtQuickTest'}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../projects/git.ignore",
|
"source": "../projects/git.ignore",
|
||||||
"target": ".gitignore",
|
"target": ".gitignore",
|
||||||
"condition": "%{JS: ( %{IsTopLevelProject} && '%{VersionControl}' === 'G.Git' )}"
|
"condition": "%{JS: ( %{IsTopLevelProject} && value('VersionControl') === 'G.Git' )}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -7,18 +7,18 @@
|
|||||||
"trDisplayName": "C++ Class",
|
"trDisplayName": "C++ Class",
|
||||||
"trDisplayCategory": "C++",
|
"trDisplayCategory": "C++",
|
||||||
"iconText": "h/cpp",
|
"iconText": "h/cpp",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
|
||||||
|
|
||||||
"options":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "TargetPath", "value": "%{Path}" },
|
{ "key": "TargetPath", "value": "%{Path}" },
|
||||||
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
|
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
|
||||||
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
|
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
|
||||||
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
|
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||||
{ "key": "Base", "value": "%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" },
|
{ "key": "Base", "value": "%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" },
|
||||||
{ "key": "isQObject", "value": "%{JS: [ 'QObject', 'QWidget', 'QMainWindow', 'QDeclarativeItem', 'QQuickItem'].indexOf('%{Base}') >= 0 }" },
|
{ "key": "isQObject", "value": "%{JS: [ 'QObject', 'QWidget', 'QMainWindow', 'QDeclarativeItem', 'QQuickItem'].indexOf(value('Base')) >= 0 }" },
|
||||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard('%{HdrFileName}')}" },
|
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" },
|
||||||
{ "key": "SharedDataInit", "value": "%{JS: ('%{IncludeQSharedData}') ? 'data(new %{CN}Data)' : '' }" }
|
{ "key": "SharedDataInit", "value": "%{JS: (value('IncludeQSharedData')) ? 'data(new %{CN}Data)' : '' }" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"pages":
|
"pages":
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
{
|
{
|
||||||
"name": "BaseEdit",
|
"name": "BaseEdit",
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"enabled": "%{JS: '%{BaseCB}' === ''}",
|
"enabled": "%{JS: value('BaseCB') === ''}",
|
||||||
"mandatory": false,
|
"mandatory": false,
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
{
|
{
|
||||||
"checkedValue": "QObject",
|
"checkedValue": "QObject",
|
||||||
"uncheckedValue": "",
|
"uncheckedValue": "",
|
||||||
"checked": "%{JS: '%{BaseCB}' === 'QObject'}"
|
"checked": "%{JS: value('BaseCB') === 'QObject'}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
{
|
{
|
||||||
"checkedValue": "QWidget",
|
"checkedValue": "QWidget",
|
||||||
"uncheckedValue": "",
|
"uncheckedValue": "",
|
||||||
"checked": "%{JS: '%{BaseCB}' === 'QWidget'}"
|
"checked": "%{JS: value('BaseCB') === 'QWidget'}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
{
|
{
|
||||||
"checkedValue": "QMainWindow",
|
"checkedValue": "QMainWindow",
|
||||||
"uncheckedValue": "",
|
"uncheckedValue": "",
|
||||||
"checked": "%{JS: '%{BaseCB}' === 'QMainWindow'}"
|
"checked": "%{JS: value('BaseCB') === 'QMainWindow'}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
{
|
{
|
||||||
"checkedValue": "QDeclarativeItem",
|
"checkedValue": "QDeclarativeItem",
|
||||||
"uncheckedValue": "",
|
"uncheckedValue": "",
|
||||||
"checked": "%{JS: '%{BaseCB}' === 'QDeclarativeItem'}"
|
"checked": "%{JS: value('BaseCB') === 'QDeclarativeItem'}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
{
|
{
|
||||||
"checkedValue": "QQuickItem",
|
"checkedValue": "QQuickItem",
|
||||||
"uncheckedValue": "",
|
"uncheckedValue": "",
|
||||||
"checked": "%{JS: '%{BaseCB}' === 'QQuickItem'}"
|
"checked": "%{JS: value('BaseCB') === 'QQuickItem'}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -139,14 +139,14 @@
|
|||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Header file:",
|
"trDisplayName": "Header file:",
|
||||||
"mandatory": true,
|
"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",
|
"name": "SrcFileName",
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Source file:",
|
"trDisplayName": "Source file:",
|
||||||
"mandatory": true,
|
"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",
|
"name": "Path",
|
||||||
|
@@ -6,15 +6,15 @@
|
|||||||
"trDescription": "Creates a Qt item model.",
|
"trDescription": "Creates a Qt item model.",
|
||||||
"trDisplayName": "Qt Item Model",
|
"trDisplayName": "Qt Item Model",
|
||||||
"trDisplayCategory": "Qt",
|
"trDisplayCategory": "Qt",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
|
||||||
|
|
||||||
"options":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "TargetPath", "value": "%{Path}" },
|
{ "key": "TargetPath", "value": "%{Path}" },
|
||||||
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
|
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
|
||||||
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
|
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
|
||||||
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
|
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||||
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" }
|
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"pages":
|
"pages":
|
||||||
@@ -92,14 +92,14 @@
|
|||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Header file:",
|
"trDisplayName": "Header file:",
|
||||||
"mandatory": true,
|
"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",
|
"name": "SrcFileName",
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Source file:",
|
"trDisplayName": "Source file:",
|
||||||
"mandatory": true,
|
"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",
|
"name": "Path",
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
{
|
{
|
||||||
"source": "itemmodel.h",
|
"source": "itemmodel.h",
|
||||||
"target": "%{HdrPath}",
|
"target": "%{HdrPath}",
|
||||||
"condition": "%{JS: '%{Base}' === 'QAbstractItemModel'}",
|
"condition": "%{JS: value('Base') === 'QAbstractItemModel'}",
|
||||||
"options": [
|
"options": [
|
||||||
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
|
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
|
||||||
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
"source": "itemmodel.cpp",
|
"source": "itemmodel.cpp",
|
||||||
"target": "%{SrcPath}",
|
"target": "%{SrcPath}",
|
||||||
"openInEditor": true,
|
"openInEditor": true,
|
||||||
"condition": "%{JS: '%{Base}' === 'QAbstractItemModel'}",
|
"condition": "%{JS: value('Base') === 'QAbstractItemModel'}",
|
||||||
"options": [
|
"options": [
|
||||||
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
|
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
|
||||||
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
{
|
{
|
||||||
"source": "tablemodel.h",
|
"source": "tablemodel.h",
|
||||||
"target": "%{HdrPath}",
|
"target": "%{HdrPath}",
|
||||||
"condition": "%{JS: '%{Base}' === 'QAbstractTableModel'}",
|
"condition": "%{JS: value('Base') === 'QAbstractTableModel'}",
|
||||||
"options": [
|
"options": [
|
||||||
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
|
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
|
||||||
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
"source": "tablemodel.cpp",
|
"source": "tablemodel.cpp",
|
||||||
"target": "%{SrcPath}",
|
"target": "%{SrcPath}",
|
||||||
"openInEditor": true,
|
"openInEditor": true,
|
||||||
"condition": "%{JS: '%{Base}' === 'QAbstractTableModel'}",
|
"condition": "%{JS: value('Base') === 'QAbstractTableModel'}",
|
||||||
"options": [
|
"options": [
|
||||||
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
|
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
|
||||||
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
{
|
{
|
||||||
"source": "listmodel.h",
|
"source": "listmodel.h",
|
||||||
"target": "%{HdrPath}",
|
"target": "%{HdrPath}",
|
||||||
"condition": "%{JS: '%{Base}' === 'QAbstractListModel'}",
|
"condition": "%{JS: value('Base') === 'QAbstractListModel'}",
|
||||||
"options": [
|
"options": [
|
||||||
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
|
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
|
||||||
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
"source": "listmodel.cpp",
|
"source": "listmodel.cpp",
|
||||||
"target": "%{SrcPath}",
|
"target": "%{SrcPath}",
|
||||||
"openInEditor": true,
|
"openInEditor": true,
|
||||||
"condition": "%{JS: '%{Base}' === 'QAbstractListModel'}",
|
"condition": "%{JS: value('Base') === 'QAbstractListModel'}",
|
||||||
"options": [
|
"options": [
|
||||||
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
|
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
|
||||||
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
||||||
|
@@ -7,11 +7,11 @@
|
|||||||
"trDisplayName": "Python Class",
|
"trDisplayName": "Python Class",
|
||||||
"trDisplayCategory": "Python",
|
"trDisplayCategory": "Python",
|
||||||
"icon": "../../files/python/icon.png",
|
"icon": "../../files/python/icon.png",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('PythonEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
|
||||||
|
|
||||||
"options":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "Base", "value":"%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" },
|
{ "key": "Base", "value":"%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" },
|
||||||
{ "key": "Imports", "value": "%{ImportQtCore}%{ImportQtWidgets}%{ImportQtDeclarative}"}
|
{ "key": "Imports", "value": "%{ImportQtCore}%{ImportQtWidgets}%{ImportQtDeclarative}"}
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
{
|
{
|
||||||
"name": "BaseEdit",
|
"name": "BaseEdit",
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"enabled": "%{JS: '%{BaseCB}' === ''}",
|
"enabled": "%{JS: value('BaseCB') === ''}",
|
||||||
"mandatory": false,
|
"mandatory": false,
|
||||||
"data": { "trText": "%{BaseCB}" }
|
"data": { "trText": "%{BaseCB}" }
|
||||||
},
|
},
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
{
|
{
|
||||||
"checkedValue": "QtCore",
|
"checkedValue": "QtCore",
|
||||||
"uncheckedValue": "",
|
"uncheckedValue": "",
|
||||||
"checked": "%{JS: '%{Base}' !== ''}"
|
"checked": "%{JS: value('Base') !== ''}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
{
|
{
|
||||||
"checkedValue": "QtWidgets",
|
"checkedValue": "QtWidgets",
|
||||||
"uncheckedValue": "",
|
"uncheckedValue": "",
|
||||||
"checked": "%{JS: '%{Base}' === 'QWidget'}"
|
"checked": "%{JS: value('Base') === 'QWidget'}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
{
|
{
|
||||||
"checkedValue": "QtQuick",
|
"checkedValue": "QtQuick",
|
||||||
"uncheckedValue": "",
|
"uncheckedValue": "",
|
||||||
"checked": "%{JS: '%{Base}' === 'QQuickItem'}"
|
"checked": "%{JS: value('Base') === 'QQuickItem'}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Source file:",
|
"trDisplayName": "Source file:",
|
||||||
"mandatory": true,
|
"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",
|
"name": "TargetPath",
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
"trDisplayCategory": "Qt",
|
"trDisplayCategory": "Qt",
|
||||||
"iconText": "ui.qml",
|
"iconText": "ui.qml",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQtQuick.UiFiles" ],
|
"featuresRequired": [ "QtSupport.Wizards.FeatureQtQuick.UiFiles" ],
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlJSEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('QmlJSEditor') >= 0}",
|
||||||
|
|
||||||
"options" : [
|
"options" : [
|
||||||
{ "key": "QmlFile", "value": "%{Class}.%{JS: Util.preferredSuffix('text/x-qml')}" },
|
{ "key": "QmlFile", "value": "%{Class}.%{JS: Util.preferredSuffix('text/x-qml')}" },
|
||||||
|
@@ -7,9 +7,9 @@
|
|||||||
"trDisplayName": "C++ Header File",
|
"trDisplayName": "C++ Header File",
|
||||||
"trDisplayCategory": "C++",
|
"trDisplayCategory": "C++",
|
||||||
"iconText": "h",
|
"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" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"source": "file.h",
|
"source": "file.h",
|
||||||
"target": "%{FileName}",
|
"target": "%{FileName}",
|
||||||
"openInEditor": true,
|
"openInEditor": true,
|
||||||
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName('%{FileName}')}" }
|
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName(value('FileName'))}" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -7,9 +7,9 @@
|
|||||||
"trDisplayName": "C++ Source File",
|
"trDisplayName": "C++ Source File",
|
||||||
"trDisplayCategory": "C++",
|
"trDisplayCategory": "C++",
|
||||||
"iconText": "cpp",
|
"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" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"source": "file.cpp",
|
"source": "file.cpp",
|
||||||
"target": "%{FileName}",
|
"target": "%{FileName}",
|
||||||
"openInEditor": true,
|
"openInEditor": true,
|
||||||
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName('%{FileName}')}" }
|
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName(value('FileName'))}" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -1 +1 @@
|
|||||||
%{JS: [ %{FormContents} ].join('\n')}\
|
%{FormContents}
|
||||||
|
@@ -7,12 +7,12 @@
|
|||||||
"trDisplayName": "Qt Designer Form",
|
"trDisplayName": "Qt Designer Form",
|
||||||
"trDisplayCategory": "Qt",
|
"trDisplayCategory": "Qt",
|
||||||
"iconText": "ui",
|
"iconText": "ui",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('Designer') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('Designer') >= 0}",
|
||||||
|
|
||||||
"options": [
|
"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": "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":
|
"pages":
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.ui",
|
"source": "file.ui",
|
||||||
"target": "%{JS: Util.fileName('%{TargetPath}', '%{Extension}')}",
|
"target": "%{JS: Util.fileName(value('TargetPath'), value('Extension'))}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
"trDisplayCategory": "GLSL",
|
"trDisplayCategory": "GLSL",
|
||||||
"iconText": "frag",
|
"iconText": "frag",
|
||||||
"platformIndependent": true,
|
"platformIndependent": true,
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('GLSLEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('GLSLEditor') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.frag",
|
"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
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
"trDisplayCategory": "GLSL",
|
"trDisplayCategory": "GLSL",
|
||||||
"iconText": "vert",
|
"iconText": "vert",
|
||||||
"platformIndependent": true,
|
"platformIndependent": true,
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('GLSLEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('GLSLEditor') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.vert",
|
"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
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
"trDisplayCategory": "GLSL",
|
"trDisplayCategory": "GLSL",
|
||||||
"iconText": "fsh",
|
"iconText": "fsh",
|
||||||
"platformIndependent": true,
|
"platformIndependent": true,
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('GLSLEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('GLSLEditor') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.fsh",
|
"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
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
"trDisplayCategory": "GLSL",
|
"trDisplayCategory": "GLSL",
|
||||||
"iconText": "vsh",
|
"iconText": "vsh",
|
||||||
"platformIndependent": true,
|
"platformIndependent": true,
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('GLSLEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('GLSLEditor') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.vsh",
|
"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
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,9 +7,9 @@
|
|||||||
"trDisplayName": "Java File",
|
"trDisplayName": "Java File",
|
||||||
"trDisplayCategory": "Java",
|
"trDisplayCategory": "Java",
|
||||||
"iconText": "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" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "source.java",
|
"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
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
"trDisplayName": "JS File",
|
"trDisplayName": "JS File",
|
||||||
"trDisplayCategory": "Qt",
|
"trDisplayCategory": "Qt",
|
||||||
"iconText": "js",
|
"iconText": "js",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlJSEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('QmlJSEditor') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.js",
|
"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
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,12 +8,12 @@
|
|||||||
"trDisplayCategory": "Modeling",
|
"trDisplayCategory": "Modeling",
|
||||||
"iconText": "qmodel",
|
"iconText": "qmodel",
|
||||||
"platformIndependent": true,
|
"platformIndependent": true,
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('ModelEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('ModelEditor') >= 0}",
|
||||||
|
|
||||||
"options":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "TargetPath", "value": "%{JS: Util.fileName('%{Location}/%{FileName}', '%{JS: Util.preferredSuffix('text/vnd.qtcreator.model')}')}" },
|
{ "key": "TargetPath", "value": "%{JS: Util.fileName(value('Location') + '/' + value('FileName'), Util.preferredSuffix('text/vnd.qtcreator.model'))}" },
|
||||||
{ "key": "FileName", "value": "%{JS: Modeling.elementNameToFileName('%{Name}')}" }
|
{ "key": "FileName", "value": "%{JS: Modeling.elementNameToFileName(value('Name'))}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
"name": "Location",
|
"name": "Location",
|
||||||
"trDisplayName": "Location:",
|
"trDisplayName": "Location:",
|
||||||
"type": "PathChooser",
|
"type": "PathChooser",
|
||||||
"isComplete": "%{JS: '%{Location}' === '' || !Util.exists('%{TargetPath}')}",
|
"isComplete": "%{JS: value('Location') === '' || !Util.exists(value('TargetPath'))}",
|
||||||
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators('%{TargetPath}')}\" exists in the filesystem.",
|
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators(value('TargetPath'))}\" exists in the filesystem.",
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"kind": "directory",
|
"kind": "directory",
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
"trDisplayCategory": "Modeling",
|
"trDisplayCategory": "Modeling",
|
||||||
"iconText": "qmodel",
|
"iconText": "qmodel",
|
||||||
"platformIndependent": true,
|
"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')}" } ],
|
"options": [ { "key": "TargetPath", "value": "%{JS: Util.mktemp('model-XXXXXX.qmodel')}" } ],
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
"trDisplayName": "Nim File",
|
"trDisplayName": "Nim File",
|
||||||
"trDisplayCategory": "Nim",
|
"trDisplayCategory": "Nim",
|
||||||
"icon": "../../projects/nim/icon.png",
|
"icon": "../../projects/nim/icon.png",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('Nim') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('Nim') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.nim",
|
"source": "file.nim",
|
||||||
"target": "%{JS: Util.fileName('%{TargetPath}', 'nim')}",
|
"target": "%{JS: Util.fileName(value('TargetPath'), 'nim')}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
"trDisplayName": "Nim Script File",
|
"trDisplayName": "Nim Script File",
|
||||||
"trDisplayCategory": "Nim",
|
"trDisplayCategory": "Nim",
|
||||||
"icon": "../../projects/nim/icon.png",
|
"icon": "../../projects/nim/icon.png",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('Nim') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('Nim') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.nims",
|
"source": "file.nims",
|
||||||
"target": "%{JS: Util.fileName('%{TargetPath}', 'nims')}",
|
"target": "%{JS: Util.fileName(value('TargetPath'), 'nims')}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
"trDisplayName": "Python File",
|
"trDisplayName": "Python File",
|
||||||
"trDisplayCategory": "Python",
|
"trDisplayCategory": "Python",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('PythonEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.py",
|
"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
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
"trDisplayName": "Qt Resource File",
|
"trDisplayName": "Qt Resource File",
|
||||||
"trDisplayCategory": "Qt",
|
"trDisplayCategory": "Qt",
|
||||||
"iconText": "qrc",
|
"iconText": "qrc",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('ResourceEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('ResourceEditor') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.qrc",
|
"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
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
"trDisplayName": "QML File (Qt Quick 2)",
|
"trDisplayName": "QML File (Qt Quick 2)",
|
||||||
"trDisplayCategory": "Qt",
|
"trDisplayCategory": "Qt",
|
||||||
"iconText": "qml",
|
"iconText": "qml",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlJSEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('QmlJSEditor') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.qml.tpl",
|
"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
|
"openInEditor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
"trDisplayName": "Scratch Buffer",
|
"trDisplayName": "Scratch Buffer",
|
||||||
"trDisplayCategory": "General",
|
"trDisplayCategory": "General",
|
||||||
"platformIndependent": true,
|
"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')}" } ],
|
"options": [ { "key": "TargetPath", "value": "%{JS: Util.mktemp('scratch-XXXXXX.txt')}" } ],
|
||||||
|
|
||||||
|
@@ -8,11 +8,11 @@
|
|||||||
"trDisplayCategory": "Modeling",
|
"trDisplayCategory": "Modeling",
|
||||||
"iconText": "scxml",
|
"iconText": "scxml",
|
||||||
"platformIndependent": true,
|
"platformIndependent": true,
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('ScxmlEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('ScxmlEditor') >= 0}",
|
||||||
|
|
||||||
"options":
|
"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}" }
|
{ "key": "FileName", "value": "%{Name}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
"name": "Location",
|
"name": "Location",
|
||||||
"trDisplayName": "Location:",
|
"trDisplayName": "Location:",
|
||||||
"type": "PathChooser",
|
"type": "PathChooser",
|
||||||
"isComplete": "%{JS: '%{Location}' === '' || !Util.exists('%{TargetPath}')}",
|
"isComplete": "%{JS: value('Location') === '' || !Util.exists(value('TargetPath'))}",
|
||||||
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators('%{TargetPath}')}\" exists in the filesystem.",
|
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators(value('TargetPath'))}\" exists in the filesystem.",
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"kind": "directory",
|
"kind": "directory",
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
"trDisplayCategory": "General",
|
"trDisplayCategory": "General",
|
||||||
"iconText": "txt",
|
"iconText": "txt",
|
||||||
"platformIndependent": true,
|
"platformIndependent": true,
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('TextEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('TextEditor') >= 0}",
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
|
@@ -8,13 +8,13 @@
|
|||||||
"trDisplayCategory": "Application",
|
"trDisplayCategory": "Application",
|
||||||
"icon": "../../global/consoleapplication.png",
|
"icon": "../../global/consoleapplication.png",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
|
"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":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
|
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
|
||||||
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
|
||||||
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
|
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
|
||||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||||
{ "key": "CppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" }
|
{ "key": "CppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" }
|
||||||
],
|
],
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
"trDisplayName": "Define Build System",
|
"trDisplayName": "Define Build System",
|
||||||
"trShortTitle": "Build System",
|
"trShortTitle": "Build System",
|
||||||
"typeId": "Fields",
|
"typeId": "Fields",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data":
|
"data":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -46,17 +46,17 @@
|
|||||||
{
|
{
|
||||||
"trKey": "qmake",
|
"trKey": "qmake",
|
||||||
"value": "qmake",
|
"value": "qmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "CMake",
|
"trKey": "CMake",
|
||||||
"value": "cmake",
|
"value": "cmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qbs",
|
"trKey": "Qbs",
|
||||||
"value": "qbs",
|
"value": "qbs",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
"trDisplayName": "Kit Selection",
|
"trDisplayName": "Kit Selection",
|
||||||
"trShortTitle": "Kits",
|
"trShortTitle": "Kits",
|
||||||
"typeId": "Kits",
|
"typeId": "Kits",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -86,18 +86,18 @@
|
|||||||
"source": "file.pro",
|
"source": "file.pro",
|
||||||
"target": "%{ProFile}",
|
"target": "%{ProFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "CMakeLists.txt",
|
"source": "CMakeLists.txt",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "file.qbs",
|
"source": "file.qbs",
|
||||||
"target": "%{QbsFile}",
|
"target": "%{QbsFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
|
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "main.cpp",
|
"source": "main.cpp",
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../git.ignore",
|
"source": "../git.ignore",
|
||||||
"target": ".gitignore",
|
"target": ".gitignore",
|
||||||
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -7,31 +7,31 @@
|
|||||||
"trDisplayName": "C++ Library",
|
"trDisplayName": "C++ Library",
|
||||||
"trDisplayCategory": "Library",
|
"trDisplayCategory": "Library",
|
||||||
"icon": "../../global/lib.png",
|
"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":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : '%{CMakeFile}'}" },
|
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : value('CMakeFile')}" },
|
||||||
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
|
||||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||||
{ "key": "PluginJsonFile", "value": "%{JS: Util.fileName('%{ProjectName}', 'json')}" },
|
{ "key": "PluginJsonFile", "value": "%{JS: Util.fileName(value('ProjectName'), 'json')}" },
|
||||||
{ "key": "IsShared", "value": "%{JS: '%{Type}' === 'shared'}" },
|
{ "key": "IsShared", "value": "%{JS: value('Type') === 'shared'}" },
|
||||||
{ "key": "IsStatic", "value": "%{JS: '%{Type}' === 'static'}" },
|
{ "key": "IsStatic", "value": "%{JS: value('Type') === 'static'}" },
|
||||||
{ "key": "IsQtPlugin", "value": "%{JS: '%{Type}' === 'qtplugin'}" },
|
{ "key": "IsQtPlugin", "value": "%{JS: value('Type') === 'qtplugin'}" },
|
||||||
{ "key": "BaseClassName", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][0] : ''}" },
|
{ "key": "BaseClassName", "value": "%{JS: value('BaseClassInfo').BaseClassName }" },
|
||||||
{ "key": "PluginTargetPath", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][1] : ''}" },
|
{ "key": "PluginTargetPath", "value": "%{JS: value('BaseClassInfo').PluginTargetPath }" },
|
||||||
{ "key": "PluginInterface", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][2] : ''}" },
|
{ "key": "PluginInterface", "value": "%{JS: value('BaseClassInfo').PluginInterface }" },
|
||||||
{ "key": "PluginModule", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][3] : ''}" },
|
{ "key": "PluginModule", "value": "%{JS: value('BaseClassInfo').PluginModule }" },
|
||||||
{ "key": "PluginMethods", "value": "%{JS: [%{BaseClassInfo}].length ? [%{BaseClassInfo}][4] : ''}" },
|
{ "key": "PluginMethods", "value": "%{JS: value('BaseClassInfo').PluginMethods }" },
|
||||||
{ "key": "QtModule", "value": "%{JS: %{IsQtPlugin} ? '%{PluginModule}' : '%{LibraryQtModule}'}" },
|
{ "key": "QtModule", "value": "%{JS: value('IsQtPlugin') ? value('PluginModule') : value('LibraryQtModule')}" },
|
||||||
{ "key": "QtModuleUpperCase", "value": "%{JS: '%{QtModule}'.charAt(0).toUpperCase() + '%{QtModule}'.slice(1)}" },
|
{ "key": "QtModuleUpperCase", "value": "%{JS: value('QtModule').charAt(0).toUpperCase() + value('QtModule').slice(1)}" },
|
||||||
{ "key": "LibraryDefine", "value": "%{JS: Cpp.headerGuard('%{ProjectName}') + '_LIBRARY'}" },
|
{ "key": "LibraryDefine", "value": "%{JS: Cpp.headerGuard(value('ProjectName')) + '_LIBRARY'}" },
|
||||||
{ "key": "LibraryExport", "value": "%{JS: Cpp.headerGuard('%{ProjectName}') + '_EXPORT'}" },
|
{ "key": "LibraryExport", "value": "%{JS: Cpp.headerGuard(value('ProjectName')) + '_EXPORT'}" },
|
||||||
{ "key": "GlobalHdrFileName", "value": "%{JS: Util.fileName('%{ProjectName}_global', Util.preferredSuffix('text/x-c++hdr'))}" },
|
{ "key": "GlobalHdrFileName", "value": "%{JS: Util.fileName(value('ProjectName') + '_global', Util.preferredSuffix('text/x-c++hdr'))}" },
|
||||||
{ "key": "TargetInstallPath", "value": "%{JS: %{IsShared} ? '/usr/lib' : (%{IsQtPlugin} && '%{PluginTargetPath}' ? '$$[QT_INSTALL_PLUGINS]/%{PluginTargetPath}' : '')}" },
|
{ "key": "TargetInstallPath", "value": "%{JS: value('IsShared') ? '/usr/lib' : (value('IsQtPlugin') && value('PluginTargetPath') ? '$$[QT_INSTALL_PLUGINS]/' + value('PluginTargetPath') : '')}" },
|
||||||
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
|
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard('%{HdrFileName}')}" },
|
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" },
|
||||||
{ "key": "GLOBAL_GUARD", "value": "%{JS: Cpp.headerGuard('%{GlobalHdrFileName}')}" }
|
{ "key": "GLOBAL_GUARD", "value": "%{JS: Cpp.headerGuard(value('GlobalHdrFileName'))}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"pages":
|
"pages":
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
"trDisplayName": "Define Build System",
|
"trDisplayName": "Define Build System",
|
||||||
"trShortTitle": "Build System",
|
"trShortTitle": "Build System",
|
||||||
"typeId": "Fields",
|
"typeId": "Fields",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data":
|
"data":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -61,12 +61,12 @@
|
|||||||
{
|
{
|
||||||
"trKey": "Qmake",
|
"trKey": "Qmake",
|
||||||
"value": "qmake",
|
"value": "qmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "CMake",
|
"trKey": "CMake",
|
||||||
"value": "cmake",
|
"value": "cmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -124,14 +124,14 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)",
|
"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",
|
"name": "BaseClassInfo",
|
||||||
"trDisplayName": "Base class:",
|
"trDisplayName": "Base class:",
|
||||||
"type": "ComboBox",
|
"type": "ComboBox",
|
||||||
"visible": "%{JS: '%{Type}' === 'qtplugin'}",
|
"visible": "%{JS: value('Type') === 'qtplugin'}",
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"index": 1,
|
"index": 1,
|
||||||
@@ -139,31 +139,80 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"trKey": "QAccessiblePlugin",
|
"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",
|
"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",
|
"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",
|
"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",
|
"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",
|
"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",
|
"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",
|
"name": "LibraryQtModule",
|
||||||
"trDisplayName": "Qt module:",
|
"trDisplayName": "Qt module:",
|
||||||
"type": "ComboBox",
|
"type": "ComboBox",
|
||||||
"visible": "%{JS: '%{Type}' != 'qtplugin'}",
|
"visible": "%{JS: value('Type') != 'qtplugin'}",
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"index": 1,
|
"index": 1,
|
||||||
@@ -206,14 +255,14 @@
|
|||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Header file:",
|
"trDisplayName": "Header file:",
|
||||||
"mandatory": true,
|
"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",
|
"name": "SrcFileName",
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Source file:",
|
"trDisplayName": "Source file:",
|
||||||
"mandatory": true,
|
"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",
|
"trDisplayName": "Kit Selection",
|
||||||
"trShortTitle": "Kits",
|
"trShortTitle": "Kits",
|
||||||
"typeId": "Kits",
|
"typeId": "Kits",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -240,12 +289,12 @@
|
|||||||
"source": "project.pro",
|
"source": "project.pro",
|
||||||
"target": "%{ProFile}",
|
"target": "%{ProFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "CMakeLists.txt",
|
"source": "CMakeLists.txt",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "lib.cpp",
|
"source": "lib.cpp",
|
||||||
@@ -259,17 +308,17 @@
|
|||||||
{
|
{
|
||||||
"source": "lib_global.h",
|
"source": "lib_global.h",
|
||||||
"target": "%{GlobalHdrFileName}",
|
"target": "%{GlobalHdrFileName}",
|
||||||
"condition": "%{JS: '%{Type}' === 'shared'}"
|
"condition": "%{JS: value('Type') === 'shared'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "project.json",
|
"source": "project.json",
|
||||||
"target": "%{PluginJsonFile}",
|
"target": "%{PluginJsonFile}",
|
||||||
"condition": "%{JS: '%{Type}' === 'qtplugin'}"
|
"condition": "%{JS: value('Type') === 'qtplugin'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../git.ignore",
|
"source": "../git.ignore",
|
||||||
"target": ".gitignore",
|
"target": ".gitignore",
|
||||||
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -8,13 +8,13 @@
|
|||||||
"trDisplayCategory": "Non-Qt Project",
|
"trDisplayCategory": "Non-Qt Project",
|
||||||
"featuresRequired": [ "ToolChain.Nim.NimToolChain" ],
|
"featuresRequired": [ "ToolChain.Nim.NimToolChain" ],
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('Nim') >= 0 }",
|
"enabled": "%{JS: value('Plugins').indexOf('Nim') >= 0 }",
|
||||||
|
|
||||||
"options":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFile", "value": "%{JS: '%{NimProjectFile}'}" },
|
{ "key": "ProjectFile", "value": "%{NimProjectFile}" },
|
||||||
{ "key": "NimProjectFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'nimproject')}" },
|
{ "key": "NimProjectFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'nimproject')}" },
|
||||||
{ "key": "NimFileName", "value": "%{JS: 'main.nim'}" }
|
{ "key": "NimFileName", "value": "main.nim" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"pages":
|
"pages":
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"trDisplayName": "Kit Selection",
|
"trDisplayName": "Kit Selection",
|
||||||
"trShortTitle": "Kits",
|
"trShortTitle": "Kits",
|
||||||
"typeId": "Kits",
|
"typeId": "Kits",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../git.ignore",
|
"source": "../git.ignore",
|
||||||
"target": "%{ProjectDirectory}/.gitignore",
|
"target": "%{ProjectDirectory}/.gitignore",
|
||||||
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -7,13 +7,13 @@
|
|||||||
"trDisplayName": "Plain C Application",
|
"trDisplayName": "Plain C Application",
|
||||||
"trDisplayCategory": "Non-Qt Project",
|
"trDisplayCategory": "Non-Qt Project",
|
||||||
"icon": "../../global/consoleapplication.png",
|
"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":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
|
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
|
||||||
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
|
||||||
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
|
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
|
||||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||||
{ "key": "CFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-csrc')}" }
|
{ "key": "CFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-csrc')}" }
|
||||||
],
|
],
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"trDisplayName": "Define Build System",
|
"trDisplayName": "Define Build System",
|
||||||
"trShortTitle": "Build System",
|
"trShortTitle": "Build System",
|
||||||
"typeId": "Fields",
|
"typeId": "Fields",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data":
|
"data":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -44,17 +44,17 @@
|
|||||||
{
|
{
|
||||||
"trKey": "qmake",
|
"trKey": "qmake",
|
||||||
"value": "qmake",
|
"value": "qmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "CMake",
|
"trKey": "CMake",
|
||||||
"value": "cmake",
|
"value": "cmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qbs",
|
"trKey": "Qbs",
|
||||||
"value": "qbs",
|
"value": "qbs",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
"trDisplayName": "Kit Selection",
|
"trDisplayName": "Kit Selection",
|
||||||
"trShortTitle": "Kits",
|
"trShortTitle": "Kits",
|
||||||
"typeId": "Kits",
|
"typeId": "Kits",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -84,18 +84,18 @@
|
|||||||
"source": "file.pro",
|
"source": "file.pro",
|
||||||
"target": "%{ProFile}",
|
"target": "%{ProFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "CMakeLists.txt",
|
"source": "CMakeLists.txt",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "file.qbs",
|
"source": "file.qbs",
|
||||||
"target": "%{QbsFile}",
|
"target": "%{QbsFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
|
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "main.c",
|
"source": "main.c",
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../git.ignore",
|
"source": "../git.ignore",
|
||||||
"target": ".gitignore",
|
"target": ".gitignore",
|
||||||
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -8,11 +8,11 @@
|
|||||||
"trDisplayCategory": "Other Project",
|
"trDisplayCategory": "Other Project",
|
||||||
"icon": "../../../global/guiapplication.png",
|
"icon": "../../../global/guiapplication.png",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
|
"featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}",
|
||||||
"options":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
{ "key": "ProFileName", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
|
||||||
{ "key": "IsTopLevelProject", "value": "%{JS: !'%{Exists:ProjectExplorer.Profile.Ids}'}" }
|
{ "key": "IsTopLevelProject", "value": "%{JS: !value('Exists:ProjectExplorer.Profile.Ids')}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"pages":
|
"pages":
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../../git.ignore",
|
"source": "../../git.ignore",
|
||||||
"target": "%{ProjectDirectory}/.gitignore",
|
"target": "%{ProjectDirectory}/.gitignore",
|
||||||
"condition": "%{JS: %{IsTopLevelProject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: value('IsTopLevelProject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
"trDisplayName": "Qt for Python - Empty",
|
"trDisplayName": "Qt for Python - Empty",
|
||||||
"trDisplayCategory": "Application",
|
"trDisplayCategory": "Application",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('PythonEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
|
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
|
||||||
|
|
||||||
"options":
|
"options":
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
"trDisplayName": "Qt for Python - Window",
|
"trDisplayName": "Qt for Python - Window",
|
||||||
"trDisplayCategory": "Application",
|
"trDisplayCategory": "Application",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('PythonEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
|
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
|
||||||
|
|
||||||
"options":
|
"options":
|
||||||
@@ -52,14 +52,14 @@
|
|||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Source file:",
|
"trDisplayName": "Source file:",
|
||||||
"mandatory": true,
|
"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",
|
"name": "ProjectFileName",
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Project file:",
|
"trDisplayName": "Project file:",
|
||||||
"mandatory": true,
|
"mandatory": true,
|
||||||
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', 'pyproject')}" }
|
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), 'pyproject')}" }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@@ -8,20 +8,20 @@
|
|||||||
"trDisplayCategory": "Application",
|
"trDisplayCategory": "Application",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
|
"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":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
|
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
|
||||||
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
|
||||||
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
|
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
|
||||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||||
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||||
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
|
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
|
||||||
{ "key": "QtQuickWindowVersion", "value": "%{JS: %{QtVersion}.QtQuickWindowVersion}" },
|
{ "key": "QtQuickWindowVersion", "value": "%{JS: value('QtVersion').QtQuickWindowVersion}" },
|
||||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
|
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
{ "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}" }
|
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"trDisplayName": "Define Build System",
|
"trDisplayName": "Define Build System",
|
||||||
"trShortTitle": "Build System",
|
"trShortTitle": "Build System",
|
||||||
"typeId": "Fields",
|
"typeId": "Fields",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data":
|
"data":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -51,17 +51,17 @@
|
|||||||
{
|
{
|
||||||
"trKey": "qmake",
|
"trKey": "qmake",
|
||||||
"value": "qmake",
|
"value": "qmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "CMake",
|
"trKey": "CMake",
|
||||||
"value": "cmake",
|
"value": "cmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qbs",
|
"trKey": "Qbs",
|
||||||
"value": "qbs",
|
"value": "qbs",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -86,74 +86,74 @@
|
|||||||
{
|
{
|
||||||
"trKey": "Qt 5.13",
|
"trKey": "Qt 5.13",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.13',
|
"QtQuickVersion": "2.13",
|
||||||
'QtQuickWindowVersion': '2.13',
|
"QtQuickWindowVersion": "2.13",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.12",
|
"trKey": "Qt 5.12",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.12',
|
"QtQuickVersion": "2.12",
|
||||||
'QtQuickWindowVersion': '2.12',
|
"QtQuickWindowVersion": "2.12",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.11",
|
"trKey": "Qt 5.11",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.11',
|
"QtQuickVersion": "2.11",
|
||||||
'QtQuickWindowVersion': '2.11',
|
"QtQuickWindowVersion": "2.11",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.10",
|
"trKey": "Qt 5.10",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.10',
|
"QtQuickVersion": "2.10",
|
||||||
'QtQuickWindowVersion': '2.10',
|
"QtQuickWindowVersion": "2.10",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.9",
|
"trKey": "Qt 5.9",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.9',
|
"QtQuickVersion": "2.9",
|
||||||
'QtQuickWindowVersion': '2.2',
|
"QtQuickWindowVersion": "2.9",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.8",
|
"trKey": "Qt 5.8",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.8',
|
"QtQuickVersion": "2.8",
|
||||||
'QtQuickWindowVersion': '2.2',
|
"QtQuickWindowVersion": "2.8",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.7",
|
"trKey": "Qt 5.7",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.7',
|
"QtQuickVersion": "2.7",
|
||||||
'QtQuickWindowVersion': '2.2',
|
"QtQuickWindowVersion": "2.7",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.6",
|
"trKey": "Qt 5.6",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.6',
|
"QtQuickVersion": "2.6",
|
||||||
'QtQuickWindowVersion': '2.2',
|
"QtQuickWindowVersion": "2.6",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.Enterprise.VirtualKeyboard 2.0'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.0"
|
||||||
})"
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
"trDisplayName": "Kit Selection",
|
"trDisplayName": "Kit Selection",
|
||||||
"trShortTitle": "Kits",
|
"trShortTitle": "Kits",
|
||||||
"typeId": "Kits",
|
"typeId": "Kits",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data": {
|
"data": {
|
||||||
"projectFilePath": "%{ProjectFile}",
|
"projectFilePath": "%{ProjectFile}",
|
||||||
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
|
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
|
||||||
@@ -195,19 +195,19 @@
|
|||||||
"source": "../app.pro",
|
"source": "../app.pro",
|
||||||
"target": "%{ProFile}",
|
"target": "%{ProFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../CMakeLists.txt",
|
"source": "../CMakeLists.txt",
|
||||||
"target": "CMakeLists.txt",
|
"target": "CMakeLists.txt",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../app.qbs",
|
"source": "../app.qbs",
|
||||||
"target": "%{QbsFile}",
|
"target": "%{QbsFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
|
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../main.cpp",
|
"source": "../main.cpp",
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../../git.ignore",
|
"source": "../../git.ignore",
|
||||||
"target": ".gitignore",
|
"target": ".gitignore",
|
||||||
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -8,22 +8,22 @@
|
|||||||
"trDisplayCategory": "Application",
|
"trDisplayCategory": "Application",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.9" ],
|
"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":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
|
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
|
||||||
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
|
||||||
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
|
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
|
||||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||||
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||||
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
|
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
|
||||||
{ "key": "QtQuickControlsVersion", "value": "%{JS: %{QtVersion}.QtQuickControlsVersion}" },
|
{ "key": "QtQuickControlsVersion", "value": "%{JS: value('QtVersion').QtQuickControlsVersion}" },
|
||||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
|
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||||
{ "key": "QtQuickControlsStyle", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyle}" },
|
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
|
||||||
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyleTheme}" },
|
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
|
||||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
{ "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}" }
|
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"trDisplayName": "Define Build System",
|
"trDisplayName": "Define Build System",
|
||||||
"trShortTitle": "Build System",
|
"trShortTitle": "Build System",
|
||||||
"typeId": "Fields",
|
"typeId": "Fields",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data":
|
"data":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -53,17 +53,17 @@
|
|||||||
{
|
{
|
||||||
"trKey": "qmake",
|
"trKey": "qmake",
|
||||||
"value": "qmake",
|
"value": "qmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "CMake",
|
"trKey": "CMake",
|
||||||
"value": "cmake",
|
"value": "cmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qbs",
|
"trKey": "Qbs",
|
||||||
"value": "qbs",
|
"value": "qbs",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -88,47 +88,47 @@
|
|||||||
{
|
{
|
||||||
"trKey": "Qt 5.13",
|
"trKey": "Qt 5.13",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.13',
|
"QtQuickVersion": "2.13",
|
||||||
'QtQuickControlsVersion': '2.13',
|
"QtQuickControlsVersion": "2.13",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.12",
|
"trKey": "Qt 5.12",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.12',
|
"QtQuickVersion": "2.12",
|
||||||
'QtQuickControlsVersion': '2.5',
|
"QtQuickControlsVersion": "2.5",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.11",
|
"trKey": "Qt 5.11",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.11',
|
"QtQuickVersion": "2.11",
|
||||||
'QtQuickControlsVersion': '2.4',
|
"QtQuickControlsVersion": "2.4",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.10",
|
"trKey": "Qt 5.10",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.10',
|
"QtQuickVersion": "2.10",
|
||||||
'QtQuickControlsVersion': '2.3',
|
"QtQuickControlsVersion": "2.3",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.9",
|
"trKey": "Qt 5.9",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.9',
|
"QtQuickVersion": "2.9",
|
||||||
'QtQuickControlsVersion': '2.2',
|
"QtQuickControlsVersion": "2.2",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
|
||||||
})"
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -145,66 +145,66 @@
|
|||||||
{
|
{
|
||||||
"trKey": "Default",
|
"trKey": "Default",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Default',
|
"QtQuickControlsStyle": "Default",
|
||||||
'QtQuickControlsStyleTheme': ''
|
"QtQuickControlsStyleTheme": ""
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Material Light",
|
"trKey": "Material Light",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Material',
|
"QtQuickControlsStyle": "Material",
|
||||||
'QtQuickControlsStyleTheme': 'Light'
|
"QtQuickControlsStyleTheme": "Light"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Material Dark",
|
"trKey": "Material Dark",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Material',
|
"QtQuickControlsStyle": "Material",
|
||||||
'QtQuickControlsStyleTheme': 'Dark'
|
"QtQuickControlsStyleTheme": "Dark"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Universal Light",
|
"trKey": "Universal Light",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Universal',
|
"QtQuickControlsStyle": "Universal",
|
||||||
'QtQuickControlsStyleTheme': 'Light'
|
"QtQuickControlsStyleTheme": "Light"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Universal Dark",
|
"trKey": "Universal Dark",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Universal',
|
"QtQuickControlsStyle": "Universal",
|
||||||
'QtQuickControlsStyleTheme': 'Dark'
|
"QtQuickControlsStyleTheme": "Dark"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Universal System",
|
"trKey": "Universal System",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Universal',
|
"QtQuickControlsStyle": "Universal",
|
||||||
'QtQuickControlsStyleTheme': 'System'
|
"QtQuickControlsStyleTheme": "System"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Fusion (Qt 5.10+)",
|
"trKey": "Fusion (Qt 5.10+)",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Fusion',
|
"QtQuickControlsStyle": "Fusion",
|
||||||
'QtQuickControlsStyleTheme': ''
|
"QtQuickControlsStyleTheme": ""
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Imagine (Qt 5.10+)",
|
"trKey": "Imagine (Qt 5.10+)",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Imagine',
|
"QtQuickControlsStyle": "Imagine",
|
||||||
'QtQuickControlsStyleTheme': ''
|
"QtQuickControlsStyleTheme": ""
|
||||||
})"
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
"trDisplayName": "Kit Selection",
|
"trDisplayName": "Kit Selection",
|
||||||
"trShortTitle": "Kits",
|
"trShortTitle": "Kits",
|
||||||
"typeId": "Kits",
|
"typeId": "Kits",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data": {
|
"data": {
|
||||||
"projectFilePath": "%{ProjectFile}",
|
"projectFilePath": "%{ProjectFile}",
|
||||||
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
|
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
|
||||||
@@ -246,19 +246,19 @@
|
|||||||
"source": "../app.pro",
|
"source": "../app.pro",
|
||||||
"target": "%{ProFile}",
|
"target": "%{ProFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../CMakeLists.txt",
|
"source": "../CMakeLists.txt",
|
||||||
"target": "CMakeLists.txt",
|
"target": "CMakeLists.txt",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../app.qbs",
|
"source": "../app.qbs",
|
||||||
"target": "%{QbsFile}",
|
"target": "%{QbsFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
|
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../main.cpp",
|
"source": "../main.cpp",
|
||||||
@@ -279,7 +279,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../../git.ignore",
|
"source": "../../git.ignore",
|
||||||
"target": ".gitignore",
|
"target": ".gitignore",
|
||||||
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -8,22 +8,22 @@
|
|||||||
"trDisplayCategory": "Application",
|
"trDisplayCategory": "Application",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.7" ],
|
"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":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
|
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
|
||||||
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
|
||||||
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
|
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
|
||||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||||
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||||
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
|
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
|
||||||
{ "key": "QtQuickControlsVersion", "value": "%{JS: %{QtVersion}.QtQuickControlsVersion}" },
|
{ "key": "QtQuickControlsVersion", "value": "%{JS: value('QtVersion').QtQuickControlsVersion}" },
|
||||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
|
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||||
{ "key": "QtQuickControlsStyle", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyle}" },
|
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
|
||||||
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyleTheme}" },
|
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
|
||||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
{ "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}" }
|
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"trDisplayName": "Define Build System",
|
"trDisplayName": "Define Build System",
|
||||||
"trShortTitle": "Build System",
|
"trShortTitle": "Build System",
|
||||||
"typeId": "Fields",
|
"typeId": "Fields",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data":
|
"data":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -53,17 +53,17 @@
|
|||||||
{
|
{
|
||||||
"trKey": "qmake",
|
"trKey": "qmake",
|
||||||
"value": "qmake",
|
"value": "qmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "CMake",
|
"trKey": "CMake",
|
||||||
"value": "cmake",
|
"value": "cmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qbs",
|
"trKey": "Qbs",
|
||||||
"value": "qbs",
|
"value": "qbs",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -88,65 +88,65 @@
|
|||||||
{
|
{
|
||||||
"trKey": "Qt 5.13",
|
"trKey": "Qt 5.13",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.13',
|
"QtQuickVersion": "2.13",
|
||||||
'QtQuickControlsVersion': '2.13',
|
"QtQuickControlsVersion": "2.13",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.12",
|
"trKey": "Qt 5.12",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.12',
|
"QtQuickVersion": "2.12",
|
||||||
'QtQuickControlsVersion': '2.5',
|
"QtQuickControlsVersion": "2.5",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.11",
|
"trKey": "Qt 5.11",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.11',
|
"QtQuickVersion": "2.11",
|
||||||
'QtQuickControlsVersion': '2.4',
|
"QtQuickControlsVersion": "2.4",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.10",
|
"trKey": "Qt 5.10",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.10',
|
"QtQuickVersion": "2.10",
|
||||||
'QtQuickControlsVersion': '2.3',
|
"QtQuickControlsVersion": "2.3",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.9",
|
"trKey": "Qt 5.9",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.9',
|
"QtQuickVersion": "2.9",
|
||||||
'QtQuickControlsVersion': '2.2',
|
"QtQuickControlsVersion": "2.2",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.8",
|
"trKey": "Qt 5.8",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.8',
|
"QtQuickVersion": "2.8",
|
||||||
'QtQuickControlsVersion': '2.1',
|
"QtQuickControlsVersion": "2.1",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.7",
|
"trKey": "Qt 5.7",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.7',
|
"QtQuickVersion": "2.7",
|
||||||
'QtQuickControlsVersion': '2.0',
|
"QtQuickControlsVersion": "2.0",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
|
||||||
})"
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -163,66 +163,66 @@
|
|||||||
{
|
{
|
||||||
"trKey": "Default",
|
"trKey": "Default",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Default',
|
"QtQuickControlsStyle": "Default",
|
||||||
'QtQuickControlsStyleTheme': ''
|
"QtQuickControlsStyleTheme": ""
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Material Light",
|
"trKey": "Material Light",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Material',
|
"QtQuickControlsStyle": "Material",
|
||||||
'QtQuickControlsStyleTheme': 'Light'
|
"QtQuickControlsStyleTheme": "Light"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Material Dark",
|
"trKey": "Material Dark",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Material',
|
"QtQuickControlsStyle": "Material",
|
||||||
'QtQuickControlsStyleTheme': 'Dark'
|
"QtQuickControlsStyleTheme": "Dark"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Universal Light",
|
"trKey": "Universal Light",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Universal',
|
"QtQuickControlsStyle": "Universal",
|
||||||
'QtQuickControlsStyleTheme': 'Light'
|
"QtQuickControlsStyleTheme": "Light"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Universal Dark",
|
"trKey": "Universal Dark",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Universal',
|
"QtQuickControlsStyle": "Universal",
|
||||||
'QtQuickControlsStyleTheme': 'Dark'
|
"QtQuickControlsStyleTheme": "Dark"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Universal System",
|
"trKey": "Universal System",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Universal',
|
"QtQuickControlsStyle": "Universal",
|
||||||
'QtQuickControlsStyleTheme': 'System'
|
"QtQuickControlsStyleTheme": "System"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Fusion (Qt 5.10+)",
|
"trKey": "Fusion (Qt 5.10+)",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Fusion',
|
"QtQuickControlsStyle": "Fusion",
|
||||||
'QtQuickControlsStyleTheme': ''
|
"QtQuickControlsStyleTheme": ""
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Imagine (Qt 5.10+)",
|
"trKey": "Imagine (Qt 5.10+)",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Imagine',
|
"QtQuickControlsStyle": "Imagine",
|
||||||
'QtQuickControlsStyleTheme': ''
|
"QtQuickControlsStyleTheme": ""
|
||||||
})"
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -242,7 +242,7 @@
|
|||||||
"trDisplayName": "Kit Selection",
|
"trDisplayName": "Kit Selection",
|
||||||
"trShortTitle": "Kits",
|
"trShortTitle": "Kits",
|
||||||
"typeId": "Kits",
|
"typeId": "Kits",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data": {
|
"data": {
|
||||||
"projectFilePath": "%{ProjectFile}",
|
"projectFilePath": "%{ProjectFile}",
|
||||||
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
|
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
|
||||||
@@ -264,19 +264,19 @@
|
|||||||
"source": "../app.pro",
|
"source": "../app.pro",
|
||||||
"target": "%{ProFile}",
|
"target": "%{ProFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../CMakeLists.txt",
|
"source": "../CMakeLists.txt",
|
||||||
"target": "CMakeLists.txt",
|
"target": "CMakeLists.txt",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../app.qbs",
|
"source": "../app.qbs",
|
||||||
"target": "%{QbsFile}",
|
"target": "%{QbsFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
|
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../main.cpp",
|
"source": "../main.cpp",
|
||||||
@@ -309,7 +309,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../../git.ignore",
|
"source": "../../git.ignore",
|
||||||
"target": ".gitignore",
|
"target": ".gitignore",
|
||||||
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -8,22 +8,22 @@
|
|||||||
"trDisplayCategory": "Application",
|
"trDisplayCategory": "Application",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.7" ],
|
"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":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
|
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
|
||||||
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
|
||||||
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
|
{ "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
|
||||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||||
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||||
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
|
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
|
||||||
{ "key": "QtQuickControlsVersion", "value": "%{JS: %{QtVersion}.QtQuickControlsVersion}" },
|
{ "key": "QtQuickControlsVersion", "value": "%{JS: value('QtVersion').QtQuickControlsVersion}" },
|
||||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
|
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||||
{ "key": "QtQuickControlsStyle", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyle}" },
|
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
|
||||||
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyleTheme}" },
|
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
|
||||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
{ "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}" }
|
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"trDisplayName": "Define Build System",
|
"trDisplayName": "Define Build System",
|
||||||
"trShortTitle": "Build System",
|
"trShortTitle": "Build System",
|
||||||
"typeId": "Fields",
|
"typeId": "Fields",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data":
|
"data":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -53,17 +53,17 @@
|
|||||||
{
|
{
|
||||||
"trKey": "qmake",
|
"trKey": "qmake",
|
||||||
"value": "qmake",
|
"value": "qmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "CMake",
|
"trKey": "CMake",
|
||||||
"value": "cmake",
|
"value": "cmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qbs",
|
"trKey": "Qbs",
|
||||||
"value": "qbs",
|
"value": "qbs",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -88,65 +88,65 @@
|
|||||||
{
|
{
|
||||||
"trKey": "Qt 5.13",
|
"trKey": "Qt 5.13",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.13',
|
"QtQuickVersion": "2.13",
|
||||||
'QtQuickControlsVersion': '2.13',
|
"QtQuickControlsVersion": "2.13",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.12",
|
"trKey": "Qt 5.12",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.12',
|
"QtQuickVersion": "2.12",
|
||||||
'QtQuickControlsVersion': '2.5',
|
"QtQuickControlsVersion": "2.5",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.11",
|
"trKey": "Qt 5.11",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.11',
|
"QtQuickVersion": "2.11",
|
||||||
'QtQuickControlsVersion': '2.4',
|
"QtQuickControlsVersion": "2.4",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.10",
|
"trKey": "Qt 5.10",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.10',
|
"QtQuickVersion": "2.10",
|
||||||
'QtQuickControlsVersion': '2.3',
|
"QtQuickControlsVersion": "2.3",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.9",
|
"trKey": "Qt 5.9",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.9',
|
"QtQuickVersion": "2.9",
|
||||||
'QtQuickControlsVersion': '2.2',
|
"QtQuickControlsVersion": "2.2",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.8",
|
"trKey": "Qt 5.8",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.8',
|
"QtQuickVersion": "2.8",
|
||||||
'QtQuickControlsVersion': '2.1',
|
"QtQuickControlsVersion": "2.1",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.7",
|
"trKey": "Qt 5.7",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.7',
|
"QtQuickVersion": "2.7",
|
||||||
'QtQuickControlsVersion': '2.0',
|
"QtQuickControlsVersion": "2.0",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
|
||||||
})"
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -163,66 +163,66 @@
|
|||||||
{
|
{
|
||||||
"trKey": "Default",
|
"trKey": "Default",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Default',
|
"QtQuickControlsStyle": "Default",
|
||||||
'QtQuickControlsStyleTheme': ''
|
"QtQuickControlsStyleTheme": ""
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Material Light",
|
"trKey": "Material Light",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Material',
|
"QtQuickControlsStyle": "Material",
|
||||||
'QtQuickControlsStyleTheme': 'Light'
|
"QtQuickControlsStyleTheme": "Light"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Material Dark",
|
"trKey": "Material Dark",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Material',
|
"QtQuickControlsStyle": "Material",
|
||||||
'QtQuickControlsStyleTheme': 'Dark'
|
"QtQuickControlsStyleTheme": "Dark"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Universal Light",
|
"trKey": "Universal Light",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Universal',
|
"QtQuickControlsStyle": "Universal",
|
||||||
'QtQuickControlsStyleTheme': 'Light'
|
"QtQuickControlsStyleTheme": "Light"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Universal Dark",
|
"trKey": "Universal Dark",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Universal',
|
"QtQuickControlsStyle": "Universal",
|
||||||
'QtQuickControlsStyleTheme': 'Dark'
|
"QtQuickControlsStyleTheme": "Dark"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Universal System",
|
"trKey": "Universal System",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Universal',
|
"QtQuickControlsStyle": "Universal",
|
||||||
'QtQuickControlsStyleTheme': 'System'
|
"QtQuickControlsStyleTheme": "System"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Fusion (Qt 5.10+)",
|
"trKey": "Fusion (Qt 5.10+)",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Fusion',
|
"QtQuickControlsStyle": "Fusion",
|
||||||
'QtQuickControlsStyleTheme': ''
|
"QtQuickControlsStyleTheme": ""
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Imagine (Qt 5.10+)",
|
"trKey": "Imagine (Qt 5.10+)",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickControlsStyle': 'Imagine',
|
"QtQuickControlsStyle": "Imagine",
|
||||||
'QtQuickControlsStyleTheme': ''
|
"QtQuickControlsStyleTheme": ""
|
||||||
})"
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -242,7 +242,7 @@
|
|||||||
"trDisplayName": "Kit Selection",
|
"trDisplayName": "Kit Selection",
|
||||||
"trShortTitle": "Kits",
|
"trShortTitle": "Kits",
|
||||||
"typeId": "Kits",
|
"typeId": "Kits",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data": {
|
"data": {
|
||||||
"projectFilePath": "%{ProjectFile}",
|
"projectFilePath": "%{ProjectFile}",
|
||||||
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
|
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
|
||||||
@@ -264,19 +264,19 @@
|
|||||||
"source": "../app.pro",
|
"source": "../app.pro",
|
||||||
"target": "%{ProFile}",
|
"target": "%{ProFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../CMakeLists.txt",
|
"source": "../CMakeLists.txt",
|
||||||
"target": "CMakeLists.txt",
|
"target": "CMakeLists.txt",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../app.qbs",
|
"source": "../app.qbs",
|
||||||
"target": "%{QbsFile}",
|
"target": "%{QbsFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
|
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "../main.cpp",
|
"source": "../main.cpp",
|
||||||
@@ -305,7 +305,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../../git.ignore",
|
"source": "../../git.ignore",
|
||||||
"target": ".gitignore",
|
"target": ".gitignore",
|
||||||
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -7,18 +7,18 @@
|
|||||||
"trDisplayName": "Qt Quick UI Prototype",
|
"trDisplayName": "Qt Quick UI Prototype",
|
||||||
"trDisplayCategory": "Other Project",
|
"trDisplayCategory": "Other Project",
|
||||||
"icon": "qtquickuiprototype.png",
|
"icon": "qtquickuiprototype.png",
|
||||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('QmlProjectManager') >= 0}",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQtQuickProject", "QtSupport.Wizards.FeatureQt" ],
|
"featuresRequired": [ "QtSupport.Wizards.FeatureQtQuickProject", "QtSupport.Wizards.FeatureQt" ],
|
||||||
|
|
||||||
"options":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qmlproject')}" },
|
{ "key": "QmlProjectFileName", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qmlproject')}" },
|
||||||
{ "key": "MainQmlFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qml')}" },
|
{ "key": "MainQmlFileName", "value": "%{JS: Util.fileName(value('ProjectName'), 'qml')}" },
|
||||||
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
|
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
|
||||||
{ "key": "QtQuickWindowVersion", "value": "%{JS: %{QtVersion}.QtQuickWindowVersion}" },
|
{ "key": "QtQuickWindowVersion", "value": "%{JS: value('QtVersion').QtQuickWindowVersion}" },
|
||||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
|
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
{ "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":
|
"pages":
|
||||||
@@ -46,74 +46,74 @@
|
|||||||
{
|
{
|
||||||
"trKey": "Qt 5.13",
|
"trKey": "Qt 5.13",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.13',
|
"QtQuickVersion": "2.13",
|
||||||
'QtQuickWindowVersion': '2.13',
|
"QtQuickWindowVersion": "2.13",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.12",
|
"trKey": "Qt 5.12",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.12',
|
"QtQuickVersion": "2.12",
|
||||||
'QtQuickWindowVersion': '2.12',
|
"QtQuickWindowVersion": "2.12",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.4'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.11",
|
"trKey": "Qt 5.11",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.11',
|
"QtQuickVersion": "2.11",
|
||||||
'QtQuickWindowVersion': '2.11',
|
"QtQuickWindowVersion": "2.11",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.10",
|
"trKey": "Qt 5.10",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.10',
|
"QtQuickVersion": "2.10",
|
||||||
'QtQuickWindowVersion': '2.10',
|
"QtQuickWindowVersion": "2.10",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.9",
|
"trKey": "Qt 5.9",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.9',
|
"QtQuickVersion": "2.9",
|
||||||
'QtQuickWindowVersion': '2.3',
|
"QtQuickWindowVersion": "2.9",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.8",
|
"trKey": "Qt 5.8",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.8',
|
"QtQuickVersion": "2.8",
|
||||||
'QtQuickWindowVersion': '2.2',
|
"QtQuickWindowVersion": "2.8",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.7",
|
"trKey": "Qt 5.7",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.7',
|
"QtQuickVersion": "2.7",
|
||||||
'QtQuickWindowVersion': '2.2',
|
"QtQuickWindowVersion": "2.7",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
|
||||||
})"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qt 5.6",
|
"trKey": "Qt 5.6",
|
||||||
"value":
|
"value":
|
||||||
"({
|
{
|
||||||
'QtQuickVersion': '2.6',
|
"QtQuickVersion": "2.6",
|
||||||
'QtQuickWindowVersion': '2.2',
|
"QtQuickWindowVersion": "2.6",
|
||||||
'QtQuickVirtualKeyboardImport': 'QtQuick.Enterprise.VirtualKeyboard 2.0'
|
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.0"
|
||||||
})"
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../git.ignore",
|
"source": "../git.ignore",
|
||||||
"target": "%{ProjectDirectory}/.gitignore",
|
"target": "%{ProjectDirectory}/.gitignore",
|
||||||
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -8,18 +8,18 @@
|
|||||||
"trDisplayCategory": "Application",
|
"trDisplayCategory": "Application",
|
||||||
"icon": "../../global/guiapplication.png",
|
"icon": "../../global/guiapplication.png",
|
||||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
|
"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":
|
"options":
|
||||||
[
|
[
|
||||||
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : '%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}'}" },
|
{ "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile')}" },
|
||||||
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
{ "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
|
||||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
{ "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": "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": "UiHdrFileName", "value": "%{JS: (value('BuildSystem') === 'cmake' ? (Util.path(value('FormFileName')) + '/') : '') + 'ui_' + Util.completeBaseName(value('FormFileName')) + '.h'}" },
|
||||||
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" },
|
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard('%{HdrFileName}')}" }
|
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"pages":
|
"pages":
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"trDisplayName": "Define Build System",
|
"trDisplayName": "Define Build System",
|
||||||
"trShortTitle": "Build System",
|
"trShortTitle": "Build System",
|
||||||
"typeId": "Fields",
|
"typeId": "Fields",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data":
|
"data":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -47,19 +47,19 @@
|
|||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"trKey": "QMake",
|
"trKey": "qmake",
|
||||||
"value": "qmake",
|
"value": "qmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "CMake",
|
"trKey": "CMake",
|
||||||
"value": "cmake",
|
"value": "cmake",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"trKey": "Qbs",
|
"trKey": "Qbs",
|
||||||
"value": "qbs",
|
"value": "qbs",
|
||||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
|
"condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)",
|
"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",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Header file:",
|
"trDisplayName": "Header file:",
|
||||||
"mandatory": true,
|
"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",
|
"name": "SrcFileName",
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"trDisplayName": "Source file:",
|
"trDisplayName": "Source file:",
|
||||||
"mandatory": true,
|
"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",
|
"name": "GenerateForm",
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
"trDisplayName": "Form file:",
|
"trDisplayName": "Form file:",
|
||||||
"enabled": "%{GenerateForm}",
|
"enabled": "%{GenerateForm}",
|
||||||
"mandatory": true,
|
"mandatory": true,
|
||||||
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', 'ui')}" }
|
"data": { "trText": "%{JS: Cpp.classToFileName(value('Class'), 'ui')}" }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
"trDisplayName": "Kit Selection",
|
"trDisplayName": "Kit Selection",
|
||||||
"trShortTitle": "Kits",
|
"trShortTitle": "Kits",
|
||||||
"typeId": "Kits",
|
"typeId": "Kits",
|
||||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
"enabled": "%{JS: !value('IsSubproject')}",
|
||||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -162,18 +162,18 @@
|
|||||||
"source": "project.pro",
|
"source": "project.pro",
|
||||||
"target": "%{ProFile}",
|
"target": "%{ProFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'qmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "CMakeLists.txt",
|
"source": "CMakeLists.txt",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
|
"condition": "%{JS: value('BuildSystem') === 'cmake'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "project.qbs",
|
"source": "project.qbs",
|
||||||
"target": "%{QbsFile}",
|
"target": "%{QbsFile}",
|
||||||
"openAsProject": true,
|
"openAsProject": true,
|
||||||
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
|
"condition": "%{JS: value('BuildSystem') === 'qbs'}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "main.cpp",
|
"source": "main.cpp",
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
{
|
{
|
||||||
"source": "../git.ignore",
|
"source": "../git.ignore",
|
||||||
"target": ".gitignore",
|
"target": ".gitignore",
|
||||||
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
"condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -295,6 +295,29 @@ QByteArray MacroExpander::expand(const QByteArray &stringWithVariables) const
|
|||||||
return expand(QString::fromLatin1(stringWithVariables)).toLatin1();
|
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
|
QString MacroExpander::expandProcessArgs(const QString &argsWithVariables) const
|
||||||
{
|
{
|
||||||
return QtcProcess::expandMacros(argsWithVariables, d);
|
return QtcProcess::expandMacros(argsWithVariables, d);
|
||||||
|
@@ -56,6 +56,7 @@ public:
|
|||||||
|
|
||||||
QString expand(const QString &stringWithVariables) const;
|
QString expand(const QString &stringWithVariables) const;
|
||||||
QByteArray expand(const QByteArray &stringWithVariables) const;
|
QByteArray expand(const QByteArray &stringWithVariables) const;
|
||||||
|
QVariant expandVariant(const QVariant &v) const;
|
||||||
|
|
||||||
QString expandProcessArgs(const QString &argsWithVariables) const;
|
QString expandProcessArgs(const QString &argsWithVariables) const;
|
||||||
|
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
#include <QWizardPage>
|
#include <QWizardPage>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@@ -41,30 +42,30 @@ namespace Internal {
|
|||||||
class QTCREATOR_UTILS_EXPORT ObjectToFieldWidgetConverter : public QWidget
|
class QTCREATOR_UTILS_EXPORT ObjectToFieldWidgetConverter : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QString text READ text NOTIFY textChanged)
|
Q_PROPERTY(QVariant value READ value NOTIFY valueChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
template <class T, typename... Arguments>
|
template<class T, typename... Arguments>
|
||||||
static ObjectToFieldWidgetConverter *create(T *sender, void (T::*member)(Arguments...), const std::function<QString()> &toTextFunction)
|
static ObjectToFieldWidgetConverter *create(T *sender,
|
||||||
|
void (T::*member)(Arguments...),
|
||||||
|
const std::function<QVariant()> &toVariantFunction)
|
||||||
{
|
{
|
||||||
auto widget = new ObjectToFieldWidgetConverter();
|
auto widget = new ObjectToFieldWidgetConverter();
|
||||||
widget->toTextFunction = toTextFunction;
|
widget->toVariantFunction = toVariantFunction;
|
||||||
connect(sender, &QObject::destroyed, widget, &QObject::deleteLater);
|
connect(sender, &QObject::destroyed, widget, &QObject::deleteLater);
|
||||||
connect(sender, member, widget, [widget] () {
|
connect(sender, member, widget, [widget]() { emit widget->valueChanged(widget->value()); });
|
||||||
emit widget->textChanged(widget->text());
|
|
||||||
});
|
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void textChanged(const QString&);
|
void valueChanged(const QVariant &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ObjectToFieldWidgetConverter () = default;
|
ObjectToFieldWidgetConverter () = default;
|
||||||
|
|
||||||
// is used by the property text
|
// is used by the property value
|
||||||
QString text() {return toTextFunction();}
|
QVariant value() { return toVariantFunction(); }
|
||||||
std::function<QString()> toTextFunction;
|
std::function<QVariant()> toVariantFunction;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
@@ -79,10 +80,17 @@ public:
|
|||||||
virtual void pageWasAdded(); // called when this page was added to a Utils::Wizard
|
virtual void pageWasAdded(); // called when this page was added to a Utils::Wizard
|
||||||
|
|
||||||
template<class T, typename... Arguments>
|
template<class T, typename... Arguments>
|
||||||
void registerObjectAsFieldWithName(const QString &name, T *sender, void (T::*changeSignal)(Arguments...),
|
void registerObjectAsFieldWithName(const QString &name,
|
||||||
const std::function<QString()> &senderToString)
|
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,
|
void registerFieldWithName(const QString &name, QWidget *widget,
|
||||||
|
@@ -34,8 +34,26 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QJSEngine>
|
#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 {
|
namespace Internal {
|
||||||
|
|
||||||
class JsExpanderPrivate {
|
class JsExpanderPrivate {
|
||||||
@@ -45,9 +63,14 @@ public:
|
|||||||
|
|
||||||
} // namespace Internal
|
} // 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);
|
QJSValue jsObj = d->m_engine.newQObject(obj);
|
||||||
d->m_engine.globalObject().setProperty(name, jsObj);
|
d->m_engine.globalObject().setProperty(name, jsObj);
|
||||||
@@ -77,16 +100,21 @@ QString JsExpander::evaluate(const QString &expression, QString *errorMessage)
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
JsExpander::JsExpander()
|
QJSEngine &JsExpander::engine()
|
||||||
{
|
{
|
||||||
d = new Internal::JsExpanderPrivate;
|
return d->m_engine;
|
||||||
Utils::globalMacroExpander()->registerPrefix("JS",
|
}
|
||||||
|
|
||||||
|
void JsExpander::registerForExpander(Utils::MacroExpander *macroExpander)
|
||||||
|
{
|
||||||
|
macroExpander->registerPrefix(
|
||||||
|
"JS",
|
||||||
QCoreApplication::translate("Core::JsExpander",
|
QCoreApplication::translate("Core::JsExpander",
|
||||||
"Evaluate simple JavaScript statements.<br>"
|
"Evaluate simple JavaScript statements.<br>"
|
||||||
"The statements may not contain '{' nor '}' characters."),
|
"The statements may not contain '{' nor '}' characters."),
|
||||||
[](QString in) -> QString {
|
[this](QString in) -> QString {
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
QString result = JsExpander::evaluate(in, &errorMessage);
|
QString result = evaluate(in, &errorMessage);
|
||||||
if (!errorMessage.isEmpty()) {
|
if (!errorMessage.isEmpty()) {
|
||||||
qWarning() << errorMessage;
|
qWarning() << errorMessage;
|
||||||
return errorMessage;
|
return errorMessage;
|
||||||
@@ -94,8 +122,21 @@ JsExpander::JsExpander()
|
|||||||
return result;
|
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()
|
JsExpander::~JsExpander()
|
||||||
|
@@ -27,26 +27,51 @@
|
|||||||
|
|
||||||
#include "core_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QJSEngine;
|
||||||
class QObject;
|
class QObject;
|
||||||
class QString;
|
class QString;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
namespace Utils {
|
||||||
|
class MacroExpander;
|
||||||
|
}
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
namespace Internal { class MainWindow; }
|
namespace Internal {
|
||||||
|
class MainWindow;
|
||||||
|
class JsExpanderPrivate;
|
||||||
|
} // namespace Internal
|
||||||
|
|
||||||
class CORE_EXPORT JsExpander
|
class CORE_EXPORT JsExpander
|
||||||
{
|
{
|
||||||
public:
|
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();
|
||||||
~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;
|
friend class Core::Internal::MainWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -100,25 +100,26 @@ namespace Internal {
|
|||||||
|
|
||||||
enum { debugMainWindow = 0 };
|
enum { debugMainWindow = 0 };
|
||||||
|
|
||||||
MainWindow::MainWindow() :
|
MainWindow::MainWindow()
|
||||||
AppMainWindow(),
|
: AppMainWindow()
|
||||||
m_coreImpl(new ICore(this)),
|
, m_coreImpl(new ICore(this))
|
||||||
m_lowPrioAdditionalContexts(Constants::C_GLOBAL),
|
, m_lowPrioAdditionalContexts(Constants::C_GLOBAL)
|
||||||
m_settingsDatabase(new SettingsDatabase(QFileInfo(PluginManager::settings()->fileName()).path(),
|
, m_settingsDatabase(
|
||||||
QLatin1String(Constants::IDE_CASED_ID),
|
new SettingsDatabase(QFileInfo(PluginManager::settings()->fileName()).path(),
|
||||||
this)),
|
QLatin1String(Constants::IDE_CASED_ID),
|
||||||
m_progressManager(new ProgressManagerPrivate),
|
this))
|
||||||
m_jsExpander(new JsExpander),
|
, m_progressManager(new ProgressManagerPrivate)
|
||||||
m_vcsManager(new VcsManager),
|
, m_jsExpander(JsExpander::createGlobalJsExpander())
|
||||||
m_modeStack(new FancyTabWidget(this)),
|
, m_vcsManager(new VcsManager)
|
||||||
m_generalSettings(new GeneralSettings),
|
, m_modeStack(new FancyTabWidget(this))
|
||||||
m_systemSettings(new SystemSettings),
|
, m_generalSettings(new GeneralSettings)
|
||||||
m_shortcutSettings(new ShortcutSettings),
|
, m_systemSettings(new SystemSettings)
|
||||||
m_toolSettings(new ToolSettings),
|
, m_shortcutSettings(new ShortcutSettings)
|
||||||
m_mimeTypeSettings(new MimeTypeSettings),
|
, m_toolSettings(new ToolSettings)
|
||||||
m_systemEditor(new SystemEditor),
|
, m_mimeTypeSettings(new MimeTypeSettings)
|
||||||
m_toggleLeftSideBarButton(new QToolButton),
|
, m_systemEditor(new SystemEditor)
|
||||||
m_toggleRightSideBarButton(new QToolButton)
|
, m_toggleLeftSideBarButton(new QToolButton)
|
||||||
|
, m_toggleRightSideBarButton(new QToolButton)
|
||||||
{
|
{
|
||||||
(void) new DocumentManager(this);
|
(void) new DocumentManager(this);
|
||||||
|
|
||||||
|
@@ -172,7 +172,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
|
|||||||
|
|
||||||
d = new CppToolsPluginPrivate;
|
d = new CppToolsPluginPrivate;
|
||||||
|
|
||||||
JsExpander::registerQObjectForJs(QLatin1String("Cpp"), new CppToolsJsExtension);
|
JsExpander::registerGlobalObject<CppToolsJsExtension>("Cpp");
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
ActionContainer *mtools = ActionManager::actionContainer(Core::Constants::M_TOOLS);
|
ActionContainer *mtools = ActionManager::actionContainer(Core::Constants::M_TOOLS);
|
||||||
|
@@ -117,7 +117,7 @@ bool FormTemplateWizardPage::validatePage()
|
|||||||
QMessageBox::critical(this, tr("%1 - Error").arg(title()), errorMessage);
|
QMessageBox::critical(this, tr("%1 - Error").arg(title()), errorMessage);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
wizard()->setProperty("FormContents", m_templateContents.split('\n'));
|
wizard()->setProperty("FormContents", m_templateContents);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -35,7 +35,7 @@ class JsExtension : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
JsExtension(QObject *parent = nullptr) : QObject(parent) { }
|
JsExtension() {}
|
||||||
|
|
||||||
Q_INVOKABLE QString fileNameToElementName(const QString &file);
|
Q_INVOKABLE QString fileNameToElementName(const QString &file);
|
||||||
Q_INVOKABLE QString elementNameToFileName(const QString &element);
|
Q_INVOKABLE QString elementNameToFileName(const QString &element);
|
||||||
|
@@ -92,7 +92,7 @@ bool ModelEditorPlugin::initialize(const QStringList &arguments, QString *errorS
|
|||||||
d->modelFactory = new ModelEditorFactory(d->uiController, this);
|
d->modelFactory = new ModelEditorFactory(d->uiController, this);
|
||||||
d->settingsController = new SettingsController(this);
|
d->settingsController = new SettingsController(this);
|
||||||
|
|
||||||
Core::JsExpander::registerQObjectForJs(QLatin1String("Modeling"), new JsExtension(this));
|
Core::JsExpander::registerGlobalObject<JsExtension>("Modeling");
|
||||||
|
|
||||||
connect(d->settingsController, &SettingsController::saveSettings,
|
connect(d->settingsController, &SettingsController::saveSettings,
|
||||||
d->uiController, &UiController::saveSettings);
|
d->uiController, &UiController::saveSettings);
|
||||||
|
@@ -810,7 +810,7 @@ std::unique_ptr<QStandardItem> createStandardItemFromListItem(const QVariant &it
|
|||||||
if (item.type() == QVariant::Map) {
|
if (item.type() == QVariant::Map) {
|
||||||
QVariantMap tmp = item.toMap();
|
QVariantMap tmp = item.toMap();
|
||||||
const QString key = JsonWizardFactory::localizedString(consumeValue(tmp, "trKey", QString()).toString());
|
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()) {
|
if (key.isNull() || key.isEmpty()) {
|
||||||
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
|
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonFieldPage",
|
||||||
@@ -920,7 +920,7 @@ void ListField::initializeData(MacroExpander *expander)
|
|||||||
if (item.get() == currentItem)
|
if (item.get() == currentItem)
|
||||||
currentItem = expandedValuesItem;
|
currentItem = expandedValuesItem;
|
||||||
expandedValuesItem->setText(expander->expand(item->text()));
|
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(expander->expand(item->data(IconStringRole).toString()), IconStringRole);
|
||||||
expandedValuesItem->setData(condition, ConditionRole);
|
expandedValuesItem->setData(condition, ConditionRole);
|
||||||
|
|
||||||
@@ -1020,8 +1020,8 @@ void ComboBoxField::setup(JsonFieldPage *page, const QString &name)
|
|||||||
page->registerObjectAsFieldWithName<QItemSelectionModel>(name, selectionModel(), &QItemSelectionModel::selectionChanged, [this]() {
|
page->registerObjectAsFieldWithName<QItemSelectionModel>(name, selectionModel(), &QItemSelectionModel::selectionChanged, [this]() {
|
||||||
const QModelIndex i = selectionModel()->currentIndex();
|
const QModelIndex i = selectionModel()->currentIndex();
|
||||||
if (i.isValid())
|
if (i.isValid())
|
||||||
return i.data(ValueRole).toString();
|
return i.data(ValueRole);
|
||||||
return QString();
|
return QVariant();
|
||||||
});
|
});
|
||||||
QObject::connect(selectionModel(), &QItemSelectionModel::selectionChanged, page, [page]() {
|
QObject::connect(selectionModel(), &QItemSelectionModel::selectionChanged, page, [page]() {
|
||||||
emit page->completeChanged();
|
emit page->completeChanged();
|
||||||
@@ -1058,8 +1058,8 @@ void IconListField::setup(JsonFieldPage *page, const QString &name)
|
|||||||
page->registerObjectAsFieldWithName<QItemSelectionModel>(name, selectionModel(), &QItemSelectionModel::selectionChanged, [this]() {
|
page->registerObjectAsFieldWithName<QItemSelectionModel>(name, selectionModel(), &QItemSelectionModel::selectionChanged, [this]() {
|
||||||
const QModelIndex i = selectionModel()->currentIndex();
|
const QModelIndex i = selectionModel()->currentIndex();
|
||||||
if (i.isValid())
|
if (i.isValid())
|
||||||
return i.data(ValueRole).toString();
|
return i.data(ValueRole);
|
||||||
return QString();
|
return QVariant();
|
||||||
});
|
});
|
||||||
QObject::connect(selectionModel(), &QItemSelectionModel::selectionChanged, page, [page]() {
|
QObject::connect(selectionModel(), &QItemSelectionModel::selectionChanged, page, [page]() {
|
||||||
emit page->completeChanged();
|
emit page->completeChanged();
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QJSEngine>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
@@ -143,7 +144,8 @@ private:
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
JsonWizard::JsonWizard(QWidget *parent) : Utils::Wizard(parent)
|
JsonWizard::JsonWizard(QWidget *parent)
|
||||||
|
: Utils::Wizard(parent)
|
||||||
{
|
{
|
||||||
setMinimumSize(800, 500);
|
setMinimumSize(800, 500);
|
||||||
m_expander.registerExtraResolver([this](const QString &name, QString *ret) -> bool {
|
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('}');
|
const QString key = QString::fromLatin1("%{") + value + QLatin1Char('}');
|
||||||
return m_expander.expand(key) == key ? QString() : QLatin1String("true");
|
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()
|
JsonWizard::~JsonWizard()
|
||||||
@@ -520,4 +525,17 @@ bool JsonWizard::OptionDefinition::condition(Utils::MacroExpander &expander) con
|
|||||||
return JsonWizard::boolFromVariant(m_condition, &expander);
|
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
|
} // namespace ProjectExplorer
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
#include <projectexplorer/projectnodes.h>
|
#include <projectexplorer/projectnodes.h>
|
||||||
|
|
||||||
#include <coreplugin/generatedfile.h>
|
#include <coreplugin/generatedfile.h>
|
||||||
|
#include <coreplugin/jsexpander.h>
|
||||||
|
|
||||||
#include <utils/wizard.h>
|
#include <utils/wizard.h>
|
||||||
#include <utils/macroexpander.h>
|
#include <utils/macroexpander.h>
|
||||||
@@ -37,8 +38,25 @@
|
|||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
class JsonWizard;
|
||||||
class JsonWizardGenerator;
|
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.
|
// Documentation inside.
|
||||||
class PROJECTEXPLORER_EXPORT JsonWizard : public Utils::Wizard
|
class PROJECTEXPLORER_EXPORT JsonWizard : public Utils::Wizard
|
||||||
{
|
{
|
||||||
@@ -126,6 +144,7 @@ private:
|
|||||||
|
|
||||||
GeneratorFiles m_files;
|
GeneratorFiles m_files;
|
||||||
Utils::MacroExpander m_expander;
|
Utils::MacroExpander m_expander;
|
||||||
|
Core::JsExpander m_jsExpander;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/icontext.h>
|
#include <coreplugin/icontext.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
#include <coreplugin/jsexpander.h>
|
||||||
#include <coreplugin/messagemanager.h>
|
#include <coreplugin/messagemanager.h>
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
@@ -46,10 +47,11 @@
|
|||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QMap>
|
#include <QJSEngine>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonParseError>
|
#include <QJsonParseError>
|
||||||
|
#include <QMap>
|
||||||
#include <QUuid>
|
#include <QUuid>
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
@@ -513,9 +515,17 @@ bool JsonWizardFactory::isAvailable(Core::Id platformId) const
|
|||||||
[platformId]() { return platformId.toString(); });
|
[platformId]() { return platformId.toString(); });
|
||||||
expander.registerVariable("Features", tr("The features available to this wizard."),
|
expander.registerVariable("Features", tr("The features available to this wizard."),
|
||||||
[this, e, platformId]() { return JsonWizard::stringListToArrayString(Core::Id::toStringList(availableFeatures(platformId)), e); });
|
[this, e, platformId]() { return JsonWizard::stringListToArrayString(Core::Id::toStringList(availableFeatures(platformId)), e); });
|
||||||
expander.registerVariable("Plugins", tr("The plugins loaded."),
|
expander.registerVariable("Plugins", tr("The plugins loaded."), [this, e]() {
|
||||||
[this, e]() { return JsonWizard::stringListToArrayString(Core::Id::toStringList(pluginFeatures()), 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);
|
return JsonWizard::boolFromVariant(m_enabledExpression, &expander);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -660,4 +670,26 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const QDir &baseDir,
|
|||||||
return errorMessage->isEmpty();
|
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
|
} // namespace ProjectExplorer
|
||||||
|
@@ -119,4 +119,23 @@ private:
|
|||||||
friend class ProjectExplorerPluginPrivate;
|
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
|
||||||
|
@@ -127,7 +127,9 @@ Core::GeneratedFile JsonWizardFileGenerator::generateFile(const File &file,
|
|||||||
*ret = options.value(n);
|
*ret = options.value(n);
|
||||||
return true;
|
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()),
|
gf.setContents(Utils::TemplateEngine::processText(&nested, QString::fromUtf8(reader.data()),
|
||||||
errorMessage));
|
errorMessage));
|
||||||
|
@@ -85,7 +85,7 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
|
|||||||
ProFileEvaluator::initialize();
|
ProFileEvaluator::initialize();
|
||||||
new ProFileCacheManager(this);
|
new ProFileCacheManager(this);
|
||||||
|
|
||||||
JsExpander::registerQObjectForJs(QLatin1String("QtSupport"), new CodeGenerator);
|
JsExpander::registerGlobalObject<CodeGenerator>("QtSupport");
|
||||||
|
|
||||||
d = new QtSupportPluginPrivate;
|
d = new QtSupportPluginPrivate;
|
||||||
|
|
||||||
|
@@ -98,7 +98,7 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
JsonWizardFactory::registerPageFactory(new Internal::VcsConfigurationPageFactory);
|
JsonWizardFactory::registerPageFactory(new Internal::VcsConfigurationPageFactory);
|
||||||
JsonWizardFactory::registerPageFactory(new Internal::VcsCommandPageFactory);
|
JsonWizardFactory::registerPageFactory(new Internal::VcsCommandPageFactory);
|
||||||
|
|
||||||
JsExpander::registerQObjectForJs(QLatin1String("Vcs"), new VcsJsExtension);
|
JsExpander::registerGlobalObject<VcsJsExtension>("Vcs");
|
||||||
|
|
||||||
Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
||||||
expander->registerVariable(Constants::VAR_VCS_NAME,
|
expander->registerVariable(Constants::VAR_VCS_NAME,
|
||||||
|
Reference in New Issue
Block a user