Commit Graph

38 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Christian Kandeler
aed001650a Project wizards: Do not use CMAKE_INCLUDE_CURRENT_DIR
This is an anti-pattern that lets uneducated and/or careless developers
get away with using the wrong type of include, so we should not
encourage its use.
It's also not needed by the wizard-generated code.

Change-Id: Iae508025bcd6659ed5aeb546a3da5f8f72e75059
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-26 13:55:16 +00:00
Christian Kandeler
07dfd7c0b3 Wizards: Bump QtQuick import version in file wizards
Use 2.15 as default, plus a little heuristic to use the same version as
other files in the project.

Fixes: QTCREATORBUG-27614
Change-Id: Ic84db5da97a9f35a2ad0e57fd47b75fb32a0b7f8
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>
2022-06-16 08:23:14 +00:00
Christian Stenger
0614d9ba4d AutoTest: Enhance QtQuick Test wizard
The wizard can now generate setup code as well.

Fixes: QTCREATORBUG-26741
Change-Id: If67ba0556001c5acd9ad6e5d98458771589f2ebd
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-12 12:02:46 +00:00
Kai Köhne
b098b8ffe4 Change wizards to use find_package(... REQUIRED COMPONENTS) idiom
Task-number: QTBUG-98867
Change-Id: I7812898c411d5366d1d2452f01bd856d194fde84
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-12-09 13:09:10 +00:00
Christian Stenger
7e965629b0 AutoTest: Fix cmake wizard
If ctest is going to be used we need to enable testing. Do it globally
instead of per framework which already led to forgot it.

Change-Id: Ifdb0e94708a26e2496d708361d5b8163aa2912ad
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-13 09:29:05 +00:00
Christian Stenger
f6f2ffde4e AutoTest: Fix generated files for gtest
When using gtest as test framework the wizard generated
a header file containing the test code which had been
included inside the main.
As this works generally it is on the one hand not
recommended and on the other hand it lets us fail when
using cmake as build system.
Create a cpp file instead and use this accordingly.

Fixes: QTCREATORBUG-26253
Change-Id: Ibec8489258de0def27ee116eacbfc1bb22d3206b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-13 08:54:48 +00:00
Kai Köhne
e030d04892 Auto Test Project: Prefer Qt6 over Qt5
Be consistent with the other wizards, and prefer Qt6 over Qt5,
if both are available.

Change-Id: I3a2f1c04c372a98ae6dacd884344fdd8d2ea2deb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-14 11:15:38 +00:00
Kai Koehne
1b09888ba9 Auto Test Project: Make CMakeLists.txt file Qt 6 compatible
Change-Id: I2289c60e44e8e97de7634342de166bf299934e76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-18 15:06:24 +00:00
Jochen Seemann
9f981e7e23 AutoTest: Wizard: Add Support for Catch2
Done-with: Christian Stenger <christian.stenger@qt.io>
Change-Id: Idc59cf962e54845746a645efb5e931502deae38e
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-04-20 08:43:45 +00:00
Christian Stenger
2375dcab67 Wizard: Fix test registration to ctest
Change-Id: Ia30cdf1ce690a2ebbc2e991e4e3f8a029e4768ed
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-12-05 11:55:16 +00:00
Christian Stenger
90189ec3d1 AutoTest: Wizard: Soften condition for gtest repository
Make the need for the googletest repository optional. The user
may have gtest installed inside the system instead.

Change-Id: I4959878fa893d6b8ed53fd612934d7cd4504a6b7
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-12 08:50:36 +00:00
Cristian Adam
36135aa261 CMake: Small clean-up of CMake Wizards
* Updated CMake minimum version to 3.5 (Ubuntu LTS 16.04)
* Lowercase commands
* Used the target name instead of ${PROJECT_NAME}, which nobody uses in practice
* No string quotes around the source filenames, which do not contain spaces

Change-Id: Ide9b3eb85535213798c6c35e08624cae080ebd9d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-06-12 13:34:58 +00:00
Christian Stenger
675ac662e9 Wizard: Fix AutoTest wizard for Boost with CMake
While at it use the same environment variable used for
Qmake or Qbs based project.

Change-Id: Ieefb4e1da4ce4155863b80a1b275b67e664273c6
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-24 06:58:41 +00:00
Christian Stenger
5c6eb0a2ba AutoTest: Further adaption following official terms
GoogleTest started using the term Test Suite for grouping
related tests and Test Case for general tests.
This patch adapts the visual strings as well as some
internal API which used the same terms.
This completes 6189745a3b.

Change-Id: I0307c10b8b5f8574f31a68ee4320732f3e829532
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-24 06:24:44 +00:00
Christian Stenger
a0b94384a6 AutoTest: Add wizard for Boost test
Task-number: QTCREATORBUG-21169
Change-Id: I77936e3e47911cf724705c858b9897c74875c41e
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-23 12:19:36 +00:00
Filip Bucek
aaa8beab88 Wizards: Support using #pragma once instead of include guards
Allow users to choose #pragma once instead of #ifndef include guards in
generated header files.

Fixes: QTCREATORBUG-12166
Change-Id: I3ba41c7570beb9c5958e174b5581fcc25855050f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Filip Bucek <fbucek@atlas.cz>
2019-01-23 09:10:42 +00:00
Christian Stenger
ad8e67cea3 AutoTest: Code cosmetics
Change-Id: I49a73b83b1b6857c34913db8f7c6818cf7a1a129
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-06-19 07:40:09 +00:00
Christian Stenger
d90da11f07 AutoTest: Update Qbs/GTest wizard
Instead of using undefined objects pass the needed objects around
to access them inside the JavaScript file.
Also update deprecated function use.

Change-Id: I4c0cafc319047d0b72a0f9310e5335f793f800ac
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-03-09 15:47:57 +00:00
Christian Stenger
e43668f603 AutoTest: Provide missing QtQuick test template
The Auto Test Project wizard had minimal templates for
QtTest and GoogleTest. Provide the QtQuick minimum
template as well.

Task-number: QTCREATORBUG-19579
Change-Id: I0efc1915c3bd0c251d8b94c50ed7ed6341812242
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-01 09:23:07 +00:00
Christian Stenger
38d5c585af AutoTest: Fix wizard for gtest on Windows
Change-Id: Iab9711df2455fc2efb678bfd85e8a95b2de7587c
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-08 14:20:02 +00:00
Andre Hartmann
57e35274c2 Wizards: Prettify template QMake project files
Having each source/header/form file on its own line
makes further moving around (e.g. sorting) much easier.

Also bring indentation for source/header sections to
the same level.

Amends commit cf40d98dc9

Change-Id: I95ad9c9298ae01e548a595b29d7f7651220adadd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-17 10:29:41 +00:00
Christian Stenger
9df203f314 AutoTest: Add missing CMake build system to wizard
Task-number: QTCREATORBUG-16916
Change-Id: I4dca90dd458789b7385013229d8447d6a8e6d360
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-21 14:07:00 +00:00
Christian Stenger
ae63f89f35 AutoTest: Reduce auto test wizard to useful parts
This patch reduces the former wizard to the test project part.
The wizard appeared more or less useless as there was no easy way
to add test cases later on and you normally do not need to have the
full skeleton of the project including a test sub project - except
when starting a TDD project.

Change-Id: I404d843b29f058876ea9696b7881f2e5e11b6af2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-21 06:17:05 +00:00
Christian Stenger
ae98cd6f2b AutoTest: Enhance wizard to support Qbs
Task-number: QTCREATORBUG-16916
Change-Id: I9f77dc2d4601ca8ff8db6847ee23d7f49e3bce81
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-01-26 13:51:38 +00:00
Christian Stenger
9487bb0e89 AutoTest: Fix condition in pro file template
Change-Id: I89c4e5f8d1df98f474bb843a80ecd709b3fbcc9d
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-26 12:28:19 +00:00
Tobias Hunger
9e72dc343c Wizards: C++11-ify code generated by JSON wizards
Task-number: QTCREATORBUG-16983
Change-Id: I1f936f25f4e9756239e04d677cec92316e3dc75b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-28 11:07:23 +00:00
Christian Stenger
63e158b4d4 AutoTest: Enhance wizard to support GTest
Initially this adds basic gtest testing - to be improved later on.

Change-Id: I2121cd24493a8d65c5acd0be5c9dd5858702645d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-27 10:00:49 +00:00