Commit Graph

932 Commits

Author SHA1 Message Date
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
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
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
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
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
Christian Kandeler
8e75381fce CppEditor: Give C++ file name settings a per-project variant
Fixes: QTCREATORBUG-22033
Change-Id: If37517bb091438e70c5af5102bf833ed46d0c951
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-08 08:23:01 +00:00
Eike Ziller
6e7bb28f09 Tr: Add missing full stops
Change-Id: I2debc56d0740eaa30c7d597eae18910f319c1d98
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-26 13:50:18 +00:00
Christian Stenger
caa85795df AutoTest: Provide wizard for adding a test case
Task-number: QTCREATORBUG-28846
Change-Id: I6716540b8bf62479bf45d16230ec91f0ed157001
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-24 08:54:59 +00:00
Alessandro Portale
07b2a30dfe Qt Quick Application Wizard: Unify Qt version combobox entries
The "compat" variant, which was around for a long time, had a Qt version
combobox with entries following the "Qt x.yz" scheme. This change adds
the Qt prefix also to the combobox of the new wizard.

Fixes: QTCREATORBUG-29126
Change-Id: I4cd59f09248ba487077c2dcdd0828222311dd9a7
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-05-17 14:12:20 +00:00
Alessandro Portale
9b00ab8d79 Qt Quick Application Wizard: Fix a property assignment
The option "BuildSystem" does not exist, anymore.

Amends: fe45294357

Change-Id: I76aa3fe05cf1a4a4f74944d67d3fa7c6c273af6a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-11 13:24:52 +00:00
Alessandro Portale
fe45294357 Wizards: Remove build system step from Qt Quick Application wizard
Qbs is now covered by the "compat" wizard

This reverts commit 13cf1ee948.

Change-Id: Ic11a6bd4847d08b60f77421ecbc168bc46c50c6a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-05 15:16:26 +00:00
Eike Ziller
7724f8653f Merge remote-tracking branch 'origin/10.0'
Change-Id: I7a3925ad8e4f97461b64a70217102ed900430253
2023-05-05 10:39:47 +02:00
Christian Kandeler
dbfd378f5c Wizards: Fix "New Class" with QML_ELEMENT and no QQuickItem include
Amends 2f94e93334.

Fixes: QTCREATORBUG-29092
Change-Id: Ic27729a601534f5b4ed98451f637b9d49029a33a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
2023-04-28 12:52:46 +00:00
Leena Miettinen
e7b5e64a70 Doc: Remove detailed info about wizard templates
Improve descriptions of some wizard templates.

Task-number: QTCREATORBUG-28996
Change-Id: Ib53fa38918120af60a03f3850fed7db1e6f0c391
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-26 12:18:57 +00:00
Eike Ziller
c9696fbabb Merge remote-tracking branch 'origin/10.0'
Change-Id: I8b36c1812b61dbe08fe3e7930f950e6b8e8a7079
2023-04-24 08:52:35 +02:00
Alessandro Portale
1e02f6bf98 Resuscitate the "legacy" Qt Quick Application wizard
Users still want to create new Qt Quick Application applications
targeting Qt 5 and with other build systems than cmake.

Fixes: QTCREATORBUG-28964
Change-Id: Ib87b7128f0b34eb4126ec771f324c70a960b2a03
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-21 18:42:21 +00:00
Eike Ziller
a353e9fde1 Markdown: Reuse Markdown highlighter from change log viewer
Change-Id: Ief1b0c135a34bfd5e9b5220e9fbf93f281d8e95a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 11:48:15 +00:00
Eike Ziller
b5d7b24733 Add wizard for markdown file
Fixes: QTCREATORBUG-29056
Change-Id: Ia2ba9aef86aab3e156e3c36d8e28c9f37d7da8b3
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-19 09:28:26 +00:00
Eike Ziller
2bc37de42b Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/python/pipsupport.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/examplesparser.cpp
	tests/auto/examples/tst_examples.cpp

Change-Id: I00273622423fa99d41621969f6ecbbdaa0e18664
2023-04-13 15:59:08 +02:00
Christian Stenger
66f939c758 Wizard: Fix generated project file
Change-Id: Ibef37ad8ecc696a35766bbda94a113e747d69771
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-05 14:25:34 +00:00
Christian Stenger
0bb8cd2d68 AutoTest: Tweak wizard a bit
Provide a version for creating Boost tests using the
shared library approach.
Add second variant for creating Boost tests.
The former version is the header only variant and can
not get extended with further cpp files without
modifying project files and the existing cpp file.

Task-number: QTCREATORBUG-28846
Change-Id: Ie7ecc339dcbe11804ce19bdba20e8db36b893a50
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-05 13:52:05 +00:00
Alessandro Portale
c53c9592fa CMakeProject templates/examples: Fix the install line
The installation command needs to define
  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}

Fixes: QTCREATORBUG-28999
Change-Id: If3f6ed15ef248eb07628bdc9fa4d11a678839a27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-04-05 08:47:20 +00:00
Eike Ziller
b635e99086 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/libs/utils/multitextcursor.cpp

Change-Id: I54b00ea5e6953078beed7673b5de31114f983bfa
2023-03-31 15:58:09 +02:00
Christian Stenger
7eafcf3259 AutoTest: Fix generated pro file
Change-Id: I2b10ad89e32cbf118823c32bf9561ba9d7a8819f
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-31 06:09:38 +00:00
David Schulz
1811c31490 Python: add interpreter selector to the python project wizard
Change-Id: I7ea1df34fa0096a84a0d611b401f991508c826c1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-14 05:44:46 +00:00
Eike Ziller
c7e94d80c7 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/shared/qbs

Change-Id: I33e13270c8c15a51b4ce4eaa6b4584041ed124e0
2023-03-13 12:30:04 +01:00
Christian Stenger
87be1f6370 AutoTest: Tweak generated cmake project file a bit
Using Quick Test with cmake as "build tool" does not list the
important part for the testing - the test sources.
Explicitly add the qml files to the project and list them to
be able to see and access them directly.

Change-Id: Id136a017989a5bfb4b9058576e008edb792e5866
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-09 10:08:13 +00:00
Eike Ziller
c8567312f6 Plugin wizard: Fix missing include, add some test infrastructure
Just basic CMake setup that is needed for actually adding tests.

Change-Id: Ief778c28f27ff122c82a190a334b7a932bead658
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-01 14:06:24 +00:00
Friedemann Kleint
03e1c18f78 Qt Designer Custom Widget wizard: Generate XML as raw string literal
It makes it easier to customize it later on.

Change-Id: Ie4ac7830a5544746d621b5ba34d174b3f8e3676a
Reviewed-by: hjk <hjk@qt.io>
2023-03-01 09:16:24 +00:00
Friedemann Kleint
745de1b34d Qt Designer Custom Widget wizard: Update code templates
- Introduce nullptr, member initialization, override.

Change-Id: I1088e124bf554050f71f002e6af31a2432479f99
Reviewed-by: hjk <hjk@qt.io>
2023-03-01 09:16:16 +00:00
Friedemann Kleint
e538e8f2e7 Qt Designer Custom Widget wizard: Remove remains of Qt 4
Clean the .pro files and use Qt 5 plugin metadata instead of old
exports.

Change-Id: I24c96d90f5dc45ecd20064159eb175e0e0475a34
Reviewed-by: hjk <hjk@qt.io>
2023-03-01 09:16:05 +00:00