Commit Graph

958 Commits

Author SHA1 Message Date
Christian Kandeler
0142d59258 Wizards: Bump default minimum Qt version for new QtQuick projects
Fixes: QTCREATORBUG-31168
Change-Id: I5a4411bcce348c89151fc2a193f8d19dc00343ef
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-01 14:19:21 +00:00
Christian Stenger
391e7ae34a Wizards: Redo sub project handling
If the user tries to add a sub project the decision for the
parent project must happen directly on the intro page
to avoid asking for build system or kit information later on.
Any of these information are provided by the parent project
and can therefore be skipped in case of having a sub project.
So, move this decision to the first page and on the last page
only let the user decide to which sub node of the chosen
project the new project will be added to.
The old approach set the IsSubproject marker quite too late
to handle this appropriate, so explicitly set this already
on the first page.
For now there should be only qmake based projects which are
capable of adding sub projects at all, but this patch should
be a generalized preparation for having similar functionality
in other build systems.

Fixes: QTCREATORBUG-30281
Change-Id: I8f1de4fa05f46d68ac2ddec788840d473adb015e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-19 12:04:43 +00:00
Cristian Adam
36e84b1c54 Doc/Wizards: Update minimum CMake version to 3.16
Qt Creator due to the usage of CMake File-API was already requiring
CMake 3.14.

Qt 6.7 now requires CMake version 3.16, thus the version requirement
bump.

Note that Qt SDK is shipping CMake version 3.27.

Fixes: QTCREATORBUG-31079
Change-Id: Ife26d178b80949941cb808a1fbd91389d6d723bc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 08:12:41 +00:00
Christian Kandeler
f65c54fa3e Wizards: Remove remaining uses of classToHeaderGuard()
Amends 335c552bda.

Change-Id: I4f43e74f74cd42c4139e91b80abe89bf371411ef
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-10 14:08:15 +00:00
Eike Ziller
8b5f5744dc Rename Qt Designer -> Qt Widgets Designer
Fixes: QTCREATORBUG-30756
Change-Id: Icb4a2513e230b71b5bb5033ead6a09ad3a8963ab
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-05-23 11:37:08 +00:00
Christian Kandeler
1bd3c7d9e5 Wizards: Stop chasing The Current Thing in string construction
Guard against random deprecations by using a robust solution that works
across all Qt versions.

Fixes: QTCREATORBUG-30325
Change-Id: I00428d2454fcd6abffd3a25631946ea5d27cc4ae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-02-16 13:45:41 +00:00
David Schulz
aefd80094a Python: add requirements file to python project wizard
This is the de facto standard way of defining project dependencies. And
those files can be used to install dependencies via pip.

Change-Id: Ibfe37624b66d757cd331aee9c51090200b3bad39
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-01 05:44:46 +00:00
Tim Jenssen
a3a69d83f3 Merge remote-tracking branch 'origin/qds/dev' into 13.0
Change-Id: I09a0e8514c8ad7badaa7af6d101c71d5c96b5465
2024-01-31 20:25:34 +01:00
Ali Kianian
1aee25bbc2 QmlDesigner: Create DataStore on demand
Task-number: QDS-11708
Change-Id: Ie08ab6260a1b720640c2c85f4b49b8093ec622d8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-01-22 10:58:37 +00:00
Christian Kandeler
335c552bda Wizards: Always derive header guard from file name
Fixes: QTCREATORBUG-30140
Change-Id: Iad84bb49b26193f059f729009bc66832939f079c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-10 09:44:54 +00:00
Alessandro Portale
9b285cdcd2 Wizards: Fix paths in QtQuickApplication/QDS wizard
Amends: e2c1cfb69f

Change-Id: Ib0a0bd0238dfdc1d40c90dd73f5d622c7baf4536
Reviewed-by: hjk <hjk@qt.io>
2023-12-19 09:11:23 +00:00
Tim Jenssen
06bfa66ed7 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: I6c657f5b8c0602ca76e9b17b10f1ff7a38b1b8be
2023-12-14 19:50:03 +01:00
Christian Kandeler
2c4261e307 Wizards: Modernize some qbs project files
The "import qbs" stanza has not been required for probably a decade now.

Change-Id: I92aadc9fd7a95c3fddd38b8a1d86e473ce421b48
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-14 12:04:20 +00:00
Christian Stenger
960768302a QtSupport: Support adding translation file
..for the major build systems. CMake build system will get further
improvements. For now this only works for adding ts files to the
target after the project had been created with QC's wizard with
some translation already added.
Qbs and qmake just work.
The C++ sources obviously will not change automatically to
integrate translation support for the application.

Task-number: QTCREATORBUG-29775
Change-Id: I80e4c21156f4bb8d5ef0bd6edf805021a55770ee
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-12-11 09:30:45 +00:00
Ali Kianian
37cca63593 QmlDesigner: Cleanup the templates for DataStore
- Fix the bug which disables the live preview
- The singleton of the DataStore is defined once
- Also modifies the template file formats of the DataStore files

Fixes: QDS-11430
Change-Id: I67e0f64355dccdc32c031bb4dc0fb8edf3fdf64a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-29 13:42:07 +00:00
David Schulz
09e94ae4ac Python: use kits page in python wizards
Change-Id: I1f7aaf145443481546abb868c8c167186600b848
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-28 12:17:14 +00:00
Thomas Hartmann
e2c1cfb69f QmlDesigner: Add wizard data for models and backend json data
Added the new files to all wizards, since the change of the
qmldir file otherwise breaks the wizard.
Adding json files to qmlproject for cmake generation.
New files have to be added to cmakefiles.txt.

Change-Id: If00eb4507b6f1364ce3cfa00db39632635febd09
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-11-24 11:49:23 +00:00
Ali Kianian
50fe4051e3 QmlDesigner: Add the Collection Singleton to the QDS template
Change-Id: I8bad907766dfa0f630cee935d2b587fc613b0922
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-22 16:25:40 +00:00
Eike Ziller
4c1044981f Plugin wizard: Add missing license templates
Change-Id: I3b43ebdb9823a5a7430946ca789188628a910b9d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-11-14 13:28:46 +00:00
Eike Ziller
9e00e1d6a0 Plugin wizard: Use Tr::tr
Create plugins that use the Tr::tr pattern for translations.

Change-Id: I9b6e6222951936c614c5ac45248e3d0bb58104ec
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-11-14 08:07:12 +00:00
Mitch Curtis
086fafbd49 Move Main.qml onto its own line in Qt Quick project templates
- Matches other commands in other templates (e.g. PROJECT_SOURCES).
- Makes it that little bit easier for users to add more files.
- Encourages users not to cram everything onto one line.

I didn't change qtquickapplication_compat/CMakeLists.6.x.txt
because I assume %{AdditionalQmlFiles} expands to many entries
per line anyway (and if so, that should be changed too).

Change-Id: I0cd33181e7000f070aa563e2341f739df8956e6d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-03 08:10:07 +00:00
Eike Ziller
df80454d26 Merge remote-tracking branch 'origin/12.0'
Change-Id: I04104ef638b28d99da11b9b7a22f31f8d0ddf460
2023-10-24 13:05:55 +02:00
Christian Stenger
73d0c4a29d AutoTest: Tweak Test Case wizard
We now support Catch2 in two different versions which means
we need different include directives depending on the version.
Let the user choose the correct version instead of providing
a fixed one that may be correct or not.

Change-Id: I0199070b4f4602b8e08b7ac60731071f0cd33141
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-10-20 12:52:05 +00:00
Eike Ziller
57a485b9e7 Merge remote-tracking branch 'origin/12.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: Ib3d0e8b4134105cb3bc159f09192e5fa06508bda
2023-10-17 13:35:45 +02:00
Christian Stenger
2119ef72b0 AutoTest: Fix creating test projects for cmake and qbs
...if the respective kits have no Qt configured.
GTest and Catch2 get fixed with separate patches.

Change-Id: Ib3eb92e97fd683f42e3666bd41728a3824e230ec
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-17 09:06:13 +00:00
Christian Stenger
67ad0cf556 AutoTest: Improve Catch2 wizard
Since version 3 of Catch2 it is recommended to use the
approach to link against Catch2 instead of using a single
include.
Make both variants work. There is still a third variant of
using a single include for version 3, which is left out
here, but can easily be fixed for Catch2 users.

Change-Id: I2c25837cb1df4b460b662466dde68563fa7d713c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-17 07:28:47 +00:00
Christian Stenger
bded214791 AutoTest: Improve GTest wizard
It is possible to use the header-only approach as well
as linking against googletest, so make this explicit
inside the wizard and fix the projects for the
respective choice. The old approach could work, but
mostly coincidentally.

Change-Id: I5b1c0b8dfd9a2ffac3268fc4c724ba47c2bf124c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-17 07:28:38 +00:00
Artem Sokolovskii
0634f9259b Tr: Remove full stop in lable names
Fixes: QTCREATORBUG-29355
Change-Id: Ib3769c1c797c0bc500b5b60e2b06b6f8ab7a6fb2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-10-16 12:33:28 +00:00
Eike Ziller
c53c9b539e Merge remote-tracking branch 'origin/12.0'
Change-Id: Ib62e4e8fc7776fa194bceced05612ae5eb113df9
2023-10-13 12:02:38 +02:00
Alessandro Portale
f734ba4461 Wizards: Make editable text options with macros/code non-translatable
Options with contain %{Macros} (sometimes with JavaScript code) should
not be translatable, since a translation can easily a prevent a wizard
from successfully working.

This change turns a couple of trText, trDisabledText and trPlaceholder
options into their non-translatable pendants.

Fixes: QTCREATORBUG-29649
Change-Id: Ia46ab7ac35f78d6368868d78e24179197744921d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-12 09:04:01 +00:00
Eike Ziller
60f7b13059 Merge remote-tracking branch 'origin/12.0'
Change-Id: Ia3e89b8e691e1ca74b03e5a8139647bedf5f88b3
2023-10-12 10:37:25 +02:00
Christian Stenger
c6c0971265 Wizard: Fix kit selection for Qt Quick Application
Fixes: QTCREATORBUG-29698
Change-Id: If0d962352096ebcbf2cdca2b85005add06d85d71
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-12 04:45:27 +00:00
Tasuku Suzuki
ef63c39266 Remove QtQuick 1 support from C++ Class wizard
QtQuick 1 is not part of Qt since Qt 5.6

Change-Id: I9fbbafe8a10a81dc6f4833301ecb124d459d5b3b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-10-11 10:33:25 +00:00
Christian Kandeler
e607c5530e Wizards: Fix "pragma once" check
Obviously, boolean functions return a string that you need to compare to
"true" and "false" explicitly.
Amends 8e75381fce.

Fixes: QTCREATORBUG-29713
Change-Id: I19966555badd67f95f51ea1c1757d8b86e727010
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-09 15:26:08 +00:00
Christian Stenger
8f741e3ab0 AutoTest: Split and re-organize wizard
Split off the single wizard into separate wizards listed
inside a separate projects category.
Simplifies maintenance and additional handling to be added
in a later patch.
Minor drive-by fixes for the cmake based projects.

Change-Id: I4f2f83c3892ea9a0f31691770a927294922c382d
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-27 09:57:25 +00:00
Christian Stenger
2842eeeecc AutoTest: Start renewal of wizard
Remove option for enabling C++11 for gtest. C++14 is minimum
nowadays when using a recent gtest version.

Change-Id: Iaa1c07be37fba0ee80d3bc46cef7238e91a541cd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-18 11:26:08 +00:00
Christian Stenger
23fffcb429 AutoTest: Fix creating cmake and qbs based test projects
Fixes creation of test projects for GTest, Boost Test and
Catch2 when not using qmake as build system.

Change-Id: I2fee3bcacf310e6dc4dbdd50bf8bd445dfb74328
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-18 11:25:58 +00:00
hjk
3fa4fa5cf3 Wizards: Use simpler init() signature in the Creator Plugin template
This is the most common case by far. Also add a hint for special needs.

Change-Id: Ib4d708d90a3b2dd91d18fa53c3fb597304145697
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-17 11:56:35 +00:00
hjk
59a6702271 Wizards: Enforce use of #pragma once in the Creator Plugin template
This should match Creator style, no matter what the users uses for
own projects.

Change-Id: I32e052b24ed6d029cd3c7a466bdf8191d1657e4e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-07-28 14:09:57 +00:00
Tasuku Suzuki
f0ba7bbbea QtQuick Application wizard: Remove unused import
Window belongs to QtQuick module in Qt 6

Change-Id: I8ff75320d84927db1fc79ba64538a3396203d36a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-28 13:53:33 +00:00
Eike Ziller
a419670ff5 Build: Change plugin json.in files to CMake style
They were still using variables in qmake style.
Directly use CMake variables in the json.in files and remove the no
longer needed escaping of quotes.

Adds a fatal message if it detects the old style in a .json.in file for
easier porting.

Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-25 13:21:16 +00:00
Eike Ziller
609510c323 Merge remote-tracking branch 'origin/11.0'
Conflicts:
	doc/qtdesignstudio/src/views/qtquick-designer.qdoc

Change-Id: I5d7ea23e356add0cbb2ad01ceb5e433377dc51c2
2023-07-06 09:49:11 +02:00
Eike Ziller
ca3f7a7bb2 Wizards: Improve the bundle id for mac/iOS
If an iOS developer doesn't have a wildcard app identifier registered,
the app identifier must be in some sense "unique". So just
"my.example.com" creates issues in this situation.

Qt >= 6.1 tries to set a better bundle id, reading Xcode settings for
the last used prefix there, and Qt 6.4 improves on that in case this
Xcode setting is not available. So, try to use this mechanism in the
wizards.

Even with the automatic deduction of a bundle id, this might be
completely wrong (the Xcode setting is whatever was used last in a Xcode
wizard, regardless of target platform, it can be different for different
users, or for different teams that the user works in), and Qt doesn't
set it for macOS, so aside from out-of-the-box experience the user
should set an explicit bundle at some point.

So, keep the CMake property mentioned with a comment in any case.

Fixes: QTCREATORBUG-29340
Change-Id: I9dacae5c693ec2e23a9cf8bad660ad939303dbf3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-07-06 07:14:00 +00:00
Eike Ziller
a490625394 Merge remote-tracking branch 'origin/11.0'
Change-Id: Ie4b1f249d1a5b7835022f367ee6b1c8a3c953f0b
2023-07-04 12:57:47 +02:00
Eike Ziller
0c31474ed3 Wizards/CMake: Make sure GNUInstallDirs is included
Qt 6.4 automatically includes GNUInstallDirs, but before that it didn't.
And for the "plain" projects Qt isn't even used. Since the project
templates use CMAKE_INSTALL_LIBDIR etc, they must ensure themselves that
these are actually available.

Fixes: QTCREATORBUG-29067
Change-Id: Id304b829301a33720d8f6c4a9c89157e8fc1c4a9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-07-04 09:29:20 +00:00
hjk
1d1eb9c3a2 Templates: Use C++17 compact namespaces in the plugin template
Change-Id: If4c8540e4d1d9b42efcd1c039c28f85bd0fb98fd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-04 06:52:07 +00:00
Eike Ziller
ea56417410 Merge remote-tracking branch 'origin/11.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: Ide0650d70d5dbd32a5492c8db24089925251af12
2023-06-12 12:33:26 +02:00
David Schulz
a0969feadf Python: use one line for each file in the template project files
Change-Id: I4fd921b11a488346cd3b53c9953881111c664764
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-12 09:54:24 +00:00
Eike Ziller
375db16ac4 Merge remote-tracking branch 'origin/11.0'
Change-Id: I87b22a73427cf9fc1b96075dc0db769ed3d3621c
2023-06-09 11:24:29 +02:00
Alessandro Portale
335b70de5d Application Templates: Fix QDS compatible project
This adds the newly introduced insight file to the file list.

Fixes: QTCREATORBUG-29234
Change-Id: I1d10e48a03d1147c4633b77e2a7384a073b5c1de
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-09 05:00:56 +00:00