diff options
author | Eike Ziller <eike.ziller@qt.io> | 2022-11-01 16:07:00 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-11-07 13:56:55 +0000 |
commit | 9eebcf3ef098f368cb15fa4add2969e26f5ba9ef (patch) | |
tree | 92af1600f1ac47186608b0e339a8e86f61bcb090 | |
parent | f792dc0216fc1fdae1e9d4421ccb489cae2aac2f (diff) |
Restrict Python application wizards to desktop
Fixes: QTCREATORBUG-28258
Change-Id: I9814abe093efbff0b7b15711d4773c8cbcdc8e41
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
5 files changed, 5 insertions, 5 deletions
diff --git a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/empty/wizard.json b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/empty/wizard.json index fecabd0942..2d566dc1f6 100644 --- a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/empty/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/empty/wizard.json @@ -8,7 +8,7 @@ "trDisplayCategory": "Application (Qt for Python)", "icon": "icon.png", "iconKind": "Themed", - "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", + "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}", "options": [ diff --git a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/mainwindow/wizard.json b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/mainwindow/wizard.json index d9f575ecd9..58e9f8cd52 100644 --- a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/mainwindow/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/mainwindow/wizard.json @@ -8,7 +8,7 @@ "trDisplayCategory": "Application (Qt for Python)", "icon": "../icons/icon.png", "iconKind": "Themed", - "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", + "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}", "options": [ diff --git a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/qtquickapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/qtquickapplication/wizard.json index 7ab73b917f..c04407347c 100644 --- a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/qtquickapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/qtquickapplication/wizard.json @@ -8,7 +8,7 @@ "trDisplayCategory": "Application (Qt for Python)", "icon": "../icons/icon.png", "iconKind": "Themed", - "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", + "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}", "options": [ diff --git a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/widget/wizard.json b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/widget/wizard.json index b9c96c9788..1a8e1bd72c 100644 --- a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/widget/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/widget/wizard.json @@ -8,7 +8,7 @@ "trDisplayCategory": "Application (Qt for Python)", "icon": "../icons/icon.png", "iconKind": "Themed", - "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", + "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}", "options": [ diff --git a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/widget_gen/wizard.json b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/widget_gen/wizard.json index 91572c2bdd..3bfe3af638 100644 --- a/share/qtcreator/templates/wizards/projects/qtforpythonapplication/widget_gen/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtforpythonapplication/widget_gen/wizard.json @@ -8,7 +8,7 @@ "trDisplayCategory": "Application (Qt for Python)", "icon": "../icons/icon.png", "iconKind": "Themed", - "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", + "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}", "options": [ |