Commit Graph

858 Commits

Author SHA1 Message Date
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
Eike Ziller
87645d7355 Fix Qt Quick Application wizard for Qt >= 6.2
Wrong variable used in the template's CMakeLists.txt resulted
in errors when configuring.

Amends db2cc2ba27

Fixes: QTCREATORBUG-27725
Change-Id: Id644ba83e118de1f12f4cdb4caa6368bd418419d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-16 06:18:02 +00:00
Eike Ziller
db2cc2ba27 Add install command to wizard generated CMake files
Add a default install(TARGETS ...) command.
It doesn't hurt on desktop and mobile targets, and it is required for
deployment on remote Linux devices.

Change-Id: Ib39c6130b63a9a699ff5cd81756c2913b1246142
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-14 07:45:00 +00:00
Cristián Maureira-Fredes
ba22a5bdf9 python: add wizard project based on uic
This includes a new template that allow users to create
a UI based project, but without a dynamic loading.

To get the initial empty window, the user needs to use
a 'uic' tool to generate Python code from a UI file first.

This tool is different for PySide2, PySide6, PyQt5 and PySide6.

Change-Id: Ic12fe23696bf3b18eaf240ffac03e9bd92a5455b
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-02 07:05:15 +00:00
Cristián Maureira-Fredes
c926ca2321 python: update wizard code style
- Updated the current code to use recommended code style
- Modify description of current wizards
- Adapt the documentation to reflect the new names of the applications
- Adapt exec() call for PySide6 (and leave exec_() for PySide2)

Change-Id: Iad662523b8a0e56ac622b21cee60f7928d419354
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-01 12:06:46 +00:00
Eike Ziller
2577ce8ba1 CMake: Add 'Profile' configuration
Get rid of the hardcoded QML Debugging for Debug & RelWithDebInfo from
the project template, because RelWithDebInfo is actually a good
configuration for doing releases (we use it for Qt Creator), and
enabling QML debugging for releases is a bad idea.

Instead enable QML Debugging in Qt Creator for the Debug configuration,
and add a 'Profile' configuration that is 'RelWithDebInfo + QML
Debugging'.

When importing a build, we only set the "QML debugging" option of the
build configuration, if it is enabled in the imported build, even if it
uses CMAKE_BUILD_TYPE=Debug .

One drawback: When not importing a build, but just setting the build
directory of a "Profile" or "Debug" configuration to an existing build,
Qt Creator asks if it should apply "-DCMAKE_CXX_FLAGS=-DQT_QML_DEBUG".
The user can choose not to, but then is asked the next time again, and
it is not obvious that the "QML debugging" option is responsible for
this.

That is somewhat orthogonal to this change though: Even without this
change, if the user changes the QML debugging option from "Leave at
Default" to "Enable", the same happens, and it is also not clear to the
user how to get rid of it. The user might not even have realized that
they changed the option (e.g. on platforms where the mouse wheel cycles
combo box values).

I think the correct solution is to 1. make clearer where the CMake flags
came from in that dialog, 2. allow the user to cancel a build from that
dialog, 3. allow the user to discard these changes (by changing the
setting) from that dialog. But that is for another patch.

Amends 3300182d40
Amends 77fed0b0fd

Change-Id: I95de59473b67c5afd6a53ea7f49838dbaef770d4
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-24 13:34:29 +00:00
Artem Sokolovskii
9f63aeb781 Wizard: Remove warning
Fix misspelling

Fixes: QTCREATORBUG-27220
Change-Id: I279ec8982a23aecae099e0062c77e7f1128beb71
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-25 09:54:04 +00:00
Artem Sokolovskii
09264b6da3 Wizard: Fix misspelling
Change-Id: Iabf0655fd9d8690e7d18d0cc2366bcbf43835916
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-03-23 11:41:32 +00:00
Artem Sokolovskii
b06db48869 Wizard: Improve QtQuick2 extension plugin
- Added options for Kit version
- Added CMake support for Qt6.2
- Added options for creating example project,
which uses the plugin

Task-number: QTCREATORBUG-26982
Change-Id: I808c01bce6e4015a679f2fd69767c13179a25ee5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-21 12:47:11 +00:00
David Faure
25d70414ab Improve item model templates
* Add missing "return true" in insert/remove Rows/Columns
* Use C++11 syntax for a vector of ints containing just "role"
* Make items not only editable, but also enabled+selectable, as expected
  by default

Change-Id: I8ed529d2534a495f2c924906fe51ada474f9347e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-16 21:33:04 +00:00
Alessandro Portale
a0d19e088e Wizards: Remove the .ui.qml wizard
Qt Creator does not offer editing .ui.qml documents, so it should not
produce them. For creating and editing .ui.qml, please use Qt Design
Studio.

Fixes: QTCREATORBUG-27085
Change-Id: I8bce9379a4bff8762a694067c25a0b266c41c417
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-02-18 15:55:22 +00:00
Christian Kandeler
b31a569b36 Project wizards: Use more recent default C++ standard version
Fixes: QTCREATORBUG-27045
Change-Id: Ia637c6f364d4f651c56f7ffab649fa8e62b5a2cb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-14 14:02:06 +00:00
Christian Kandeler
b243a8d728 Wizards: Modernize qbs project templates
Change-Id: Ib6f6315f9730425d4fd3b566f66ed26aa1718695
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 15:40:33 +00:00
Eike Ziller
79fd6510a3 Merge remote-tracking branch 'origin/6.0' into 7.0
Change-Id: I8b1cdfb72b0e3e583c94447f13d0161b99fa93c1
2022-01-27 09:37:39 +01:00
Eike Ziller
f9de2f2b23 Qt Creator plugin wizard: Bump checkout github action to v2
v1 has security concerns

Change-Id: Ia88cf55197a64af819abe07bdac698a29bec8aeb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-27 08:06:28 +00:00
Alessandro Portale
43a9423a9b Wizards: Make wizard icons a bit lighter
Changing the Wizard icons into themed ones turned them quite dark (in
non-dark themes). This change mitigates the issue by making the dark
lines thinner and shaded areas smaller and brighter (vice-versa for dark
themes).

Amends: 05e89384e2

Fixes: QTCREATORBUG-26565
Change-Id: Ie1d251d6443576c4e5db26a2b1485b4f4ab63f82
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-25 17:44:21 +00:00
Eike Ziller
7a94cca007 Merge remote-tracking branch 'origin/6.0'
Change-Id: Ia208fc746333e3d36868c580aa7794da9627c3e0
2022-01-14 10:24:10 +01:00
Christian Stenger
1463c5d09f Wizards: Allow QtQuick tests for Qt6 as well
Change-Id: I476ad3519ed685ada4f1451906b5ba2fdfe8969b
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-13 10:06:59 +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
Eike Ziller
7d92375b2f Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/clangcodemodel/clangdclient.cpp

Change-Id: I75c954d2e573d65089205d2542747bba3276be2a
2022-01-03 14:14:12 +01:00
Eike Ziller
7630965c7a Wizards: Fix some properties for Qt GUI applications
Make them GUI applications on Windows and bundles on macOS.
Add some bundle properties for 6.2+ Qt Quick applications.

Change-Id: Icc4650a8c486c6b6cefed7f479185a5babf80b14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-12-17 13:15:41 +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
Kai Köhne
a50cf058d1 Wizards: Use CMake by default
We focus on CMake as the preferred build system in Qt 6. qmake
is still supported, but we shouldn't advocate for using it anymore
for new projects.

[ChangeLog][Wizards] The wizards by default now use CMake
instead of qmake.

Fixes: QTCREATORBUG-25685
Change-Id: Ifa2a6a046d65015124229bbb278ec5dd317afa35
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-08 10:27:45 +00:00
Eike Ziller
a759a4e8da Plugin wizard: Make github workflow work with Qt 5 and 6
The new default build of Qt Creator is Qt 6 based, so we need to make
sure that that actually works.

Change-Id: I6195f9d46cd020175daf8bc4caaa003fa7ae2b52
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-11-03 14:56:38 +00:00
Artem Sokolovskii
691e340b81 QtcWizard: Fix build empty project
Added TargetName parameter for executable file name
in order to avoid names conflict between qml resource folder and
executable file name.

Fixes: QTCREATORBUG-26375
Change-Id: I7f59b8001246d175a87309a9b31ff7110d76b148
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-10-28 07:26:20 +00:00
Leena Miettinen
cd80f0a096 Wizards: Fix description of Qt Application template
The applications can also be run on the mobile device platforms
listed in the wizard dialog.

Task-number: QTCREATORBUG-26477
Change-Id: I845d95c5ca46804691613177d7e285246b1593ba
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-10-25 15:00:01 +00:00
Alessandro Portale
6fd8336b7f Wizards: Remove unused QtQuick.Controls-style preview thumbnails
These were never used. And updated ones are upcoming with the new QDS
application wizards.

Change-Id: I998c3c0b8cfa3033d8be46524db3ed978738e729
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-21 13:16:30 +00:00
Alessandro Portale
f3276a96e9 Wizards: Adapt QtQuickPrototype wizard to recent template changes
Handle the new isQt6 property.

amends: 77fed0b0fd

Task-number: QTCREATORBUG-26373
Change-Id: Iff6fb8f91954aa116b8f1c461c7db45f321325fd
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-10-06 13:21:33 +00:00
Alessandro Portale
05e89384e2 Wizards: Turn icons into themed icons
Turn the current un-themed icons into icon masks which now get recolored
according to the current theme.

Change-Id: I435f9a43dae04797ad0b948992f77179d93164a8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-28 11:31:16 +00:00
Christian Stenger
29413a0e44 AutoTest: Soften dependency of wizard
Make the auto test wizard available also without the AutoTest plugin
being loaded.
For the wizard it suffices to depend on the presence of CppEditor
and all of the projects generated are basically C++ based.

Change-Id: I76b8d397e819b2865ad597f487084ad4c618c6a5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-24 13:24:30 +00:00
Loren Burkholder
6c0f2b1c63 Use a more logical code style
This adds C++11-style initializers and breaks the initializer list into a new line, since most classes will have other members to be put in new lines as well.

Change-Id: I7b6d6bf6f32dbd58a744405aefabb02be9f45316
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-22 16:38:41 +00:00
Alessandro Portale
c2aeec7e86 Wizards: Reduce QtQuick wizards to essentials
The new/upcoming way of co-authoring and sharing a project in Qt
Creator and in Qt Design Studio, as-well as the disabling of the
QmlDesigner plugin in Qt Creator are a substantial step in the
offering.

The QtQuick application wizards must not stay behind, but rather also
reflect that change:

Keep one essential Qt Quick wizard in Qt Creator (which will eventually
support the project sharing approach). Leave the competence to create
Qml UI code to Qt Design Studio.

The removal of wizards for mobile-oriented ui code (for further hand
coding) also re-enforces the motto that application wizards should
create essentials, rather than example code.

Task-number: QTCREATORBUG-26160
Change-Id: I9775d70b45f97290ab65936ff6e373b6fc177c85
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-21 17:32:10 +00:00
Artem Sokolovskii
feb7b011df Wizard: remove .ui files
Task-number: QTCREATORBUG-26277
Change-Id: I2ec4dd241f4c3f6c2b4ecae832ca7b608b86fc35
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-09-20 09:04:01 +00:00
Artem Sokolovskii
a1cb438fdf QtWizard: Fix qmake and qbs build for Qt6.2
Change-Id: I250e02ade6df908b0c6e200b6ea3f0b8d5bac4e4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-14 09:00:46 +00:00
Eike Ziller
3d4d7c7e14 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/clangtools/clangtoolssettings.cpp
	src/plugins/clangtools/executableinfo.cpp
	src/plugins/clangtools/executableinfo.h

Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
2021-09-13 17:03:55 +02: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
Artem Sokolovskii
77fed0b0fd QtWizard: Create new project templates for Qt 6.2
Task-number: QTCREATORBUG-26170
Change-Id: Ifbe1055bbed24937929bc846e1f036a1306557b4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-09-13 08:53:49 +00:00
Aleksei German
d7b42e5455 Python: Fix for Wizard generated file names
- Changed generated project filenames
 - Added default Class name

Task-number: QDS-4897
Change-Id: I16318cf7cbdcf078f4da01016ebeef8036a85eb0
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-19 08:06:34 +00:00
Eike Ziller
ffe03c7870 Fix Qt Quick Extension wizard's kit selection
Do not require kits to be Qt 5, instead require it to support QtQuick 2.

Fixes: QTCREATORBUG-26082
Change-Id: Icf34644eef704b28e80ef7b130fd2a68539347e7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-08-09 12:50:34 +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
Tim Jenssen
453f4996db use "qml" as QML runtime
Since Qt 6.2 qmlscene is deprecated by Qt.

This patch also removes QMLViewer as a last
QtQuick 1 artifact in external tools.

Task-number: QDS-639
Task-number: QDS-4535
Task-number: QTCREATORBUG-22385
Change-Id: I5f67040954f8ef438961f7166a53bd96d5b73f4d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-13 15:38:46 +00:00
Christian Stenger
111f1465c8 Wizards: Fix QtQuick Stack wizard
Amends 1e80ed9b78.

Change-Id: I2a30c38ff84a9793452a66265b584d47938444a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-01 14:08:12 +00:00
Assam Boudjelthia
7722ec5f0d Fix CMake templates information for Android
The CMake templates still point to information that apply only to Qt 5
when it comes to settings Android properties. This updates the template
to show the right way to define Android target properties on Qt 6 as
well.

Task-number: QTBUG-94597
Change-Id: I28e3dbd93eca352502b3d1b584f02924e2478c07
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-22 08:25:12 +00:00
Eike Ziller
f83be6debe Merge remote-tracking branch 'origin/4.15'
Change-Id: Ia6558fc2423fd9cd84ca2282bfa60d102dff682e
2021-05-19 09:54:07 +02:00
Christian Stenger
2e24d4b0cc Wizards: Fix generation of dynamically populated models
This was implemented for QAbstractItemModel based classes, but
forgotten for QAbstractListModel and QAbstractTableModel based
classes.

Change-Id: I807f445e48d2906580abd0a65bb794d6e766c1a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 09:41:11 +00:00
Eike Ziller
b87c3cc03e Fix Qt Creator plugin wizard's GitHub action
for the changed location of build_plugin.py

Fixes: QTCREATORBUG-25727
Change-Id: I6bda26b1820b86ac4cf12a55821eed879ee818bc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-18 07:27:49 +00:00
Eike Ziller
6bb918adab Merge remote-tracking branch 'origin/4.15'
Change-Id: Ic839ab43a723ab22cc83e5b0d823ec6121cb6701
2021-05-10 13:50:58 +02:00
Kai Köhne
1e80ed9b78 Qt Quick Wizards: Remove Qt versions older than Qt 5.12
That doesn't mean we don't support older versions. But I don't think
we should advertise creating new projects for it.

Change-Id: Ia9b97cc072232238baffd10b159f604f1a6413d1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-07 13:18:41 +00:00
Kai Köhne
53c0b82a93 Add "Minimal required Qt version: Qt 6" option to QQ application wizards
Provide a Qt 6 option that does not use any versioned imports.

Also make Qt 5.15 the new default.

Fixes: QTCREATORBUG-24973
Change-Id: I43714e5e344d1d91d35c5ad298edf28bc32ff7d6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-06 15:00:24 +00:00