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>
The "import qbs" stanza has not been required for probably a decade now.
Change-Id: I92aadc9fd7a95c3fddd38b8a1d86e473ce421b48
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
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>
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>
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>
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>
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>
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>
The wizard can now generate setup code as well.
Fixes: QTCREATORBUG-26741
Change-Id: If67ba0556001c5acd9ad6e5d98458771589f2ebd
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
Initially this adds basic gtest testing - to be improved later on.
Change-Id: I2121cd24493a8d65c5acd0be5c9dd5858702645d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>