Commit Graph

807 Commits

Author SHA1 Message Date
Eike Ziller
4b3a746332 CMake build: Fix remaining issues with Devel package
On Linux (and Windows) we should not create toplevel files (README.md
etc) or directories (doc/, scripts/ etc).

On macOS, move the whole Devel package contents into the app bundle,
because that is installed toplevel in the Qt installers, and we
shouldn't even create include/, lib/ or any other directory at the
toplevel at all.

Since the prefix path must now point to the Resources folder inside the
app bundle, adapt build_plugin.py to also accept --qtc-path pointing to
the app bundle (Qt Creator.app) itself, and also to the app bundles
parent directory. Adapt the Qt Creator plugin project template
similarly.

Task-number: QTCREATORBUG-25414
Fixes: QTCREATORBUG-25415
Change-Id: Ic756237fb920b54b1ec95d076649ad947b39a7e8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-04-06 10:59:27 +00:00
Friedemann Kleint
cc92c5001b Brush up the Python wizard code templates
Fix the spacing and introduce pathlib.

Change-Id: I240291d91cae7c233b2d3ec5c0dfaeede09ad47d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-03-23 11:58:56 +00:00
Alexandru Croitor
27f299d9b5 CMake Wizards: Advertise manual finalisation
In qmake projects it is possible to run arbitrary qmake commands after
the whole project is parsed, which is used extensively by Qt to do
things like importing qml plugins, generating android deployment
files, etc.

In CMake this feature was implemented in 3.19+ and we leverage this
feature to do all the things described above when such a version is
used.

But when projects are built with earlier CMake versions, it's better
for users to do these steps manually, rather than letting them to
happen at qt_add_executable call time, which limits certain
configurability.

That can be achieved by adding a call to qt_finalize_executable at the
very end of the directory scope where the target was created,
in addition to adding the MANUAL_FINALIZATION option to the
qt_add_executable call.

Augment the wizard templates to advertise the existence of
qt_finalize_executable, as well as making sure that projects created
by Creator can work reasonably well with older CMake versions as well.

Change-Id: Icf60eae993cf815f6cce6ed659fe35264b016f62
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-17 13:12:18 +00:00
Alexandru Croitor
af184fdd4c CMake Wizards: Add Qt 6 specific static qml plugin importing
For Qml / Qt Quick projects to work with static Qt builds, the
application targets need to link to the static Qml plugins, which
is done by calling qt_import_qml_plugins.

Starting with Qt 6.1 and CMake 3.18+ that will be done automatically in
qt_add_application via qt_finalize_executable, as per
c71c48f5125c116f01f615f51f10e4f2877b2b1d

But for Qt 6.0 and lower CMake versions, we need to call
qt_import_qml_plugins manually, thus we include it in the
Qt Quick wizard template so that it works with all Qt 6 versions
and lower CMake versions.

Amends b72c1d11e6.

Task-number: QTCREATORBUG-23574
Change-Id: Id8db3352ecbb8441eda9f5c9638c7ea6ac1fee96
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-15 08:45:12 +00:00
Eike Ziller
b72c1d11e6 CMake Wizards: Add properties that are required for iOS
Running applications on iOS requires declaring a bundle identifier and
version numbers in the application's Info.plist file.

Unconditionally add them, since they also make sense for desktop
applications, even if they are not strictly required.

Fixes: QTCREATORBUG-25297
Task-number: QTCREATORBUG-23574
Change-Id: I2269bec2d4eaf3e8dd3332a027b284049b3b8b42
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-02-15 08:21:58 +00:00
David Schulz
5860addcd2 Python: Adjust wizards to PySide6
Fixes: QTCREATORBUG-25340
Change-Id: I8f22eac283893b2778b6854e1dcd4ae6048d4c84
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-02-12 10:00:49 +00:00
Christian Kandeler
f19baeb9a5 Wizards: Extend translation support
Don't just create the ts file, but also make sure it is embedded in the
application (if supported by the build system) and make the application
load it if it matches the current locale.

Task-number: QTCREATORBUG-25079
Change-Id: Ie3a0b1975531b12acb008e8c1312dab97f158751
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-25 14:21:33 +00:00
Christian Kandeler
e735e95f06 "New Class" wizard: Check custom base class for QObject parent
That is, if the user specifies a custom base class, we check whether its
constructor takes a "QObject *parent" parameter, and if it does, we give
the derived class one as well.
This is technically a heuristic, but the pattern is pretty stable in the
Qt world.

Fixes: QTCREATORBUG-25156
Change-Id: Ie64440929df61cca7258d6d692c5de62970f9a65
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-25 08:58:24 +00:00
Eike Ziller
4bc2b4741d Merge remote-tracking branch 'origin/4.14'
Change-Id: I842a7c7358fd0ff6d85c151806e440043914e09a
2020-12-14 14:19:15 +01:00
Kai Köhne
ca992488c0 Fix use of translations in Qt wizards for Qt 6
qt_create_translation was introduced in Qt 5.15. But we also still
support older Qt versions, so we cannot use it unconditionally.

Fixes: QTCREATORBUG-25070
Change-Id: I81de7e19b42e0e8cb9cb23e14909e71c534dc0da
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-11 16:48:19 +00:00
Eike Ziller
1283b15117 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	doc/qtdesignstudio/examples/loginui1/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui2/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui3/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui4/qtquickcontrols2.conf
	share/qtcreator/debugger/dumper.py
	share/qtcreator/debugger/qttypes.py

Change-Id: Id44a67cdeeb0889ff96eddcdf409d20ca7cbdd0b
2020-12-10 13:02:02 +01:00
Christian Kandeler
b83bbfa754 Wizards: Add placeholder text
... to class name field in "New Class" wizard.
This way, users understand right away that the class name can include
namespaces.

Change-Id: I84aaf2aca532a97ba40f72fd2385fcab40788970
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-10 08:27:23 +00:00
Kai Koehne
480edb9151 Fix Qt 5 specific comments in Qt applicaton wizards
Change-Id: I031c8d8284efe87009073b5ea0abf99f81a45615
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-07 14:57:31 +00:00
Kai Koehne
193becffbb Fix Qt Quick wizards with Default style and Qt 6
The Default style got renamed to 'Basic' style in Qt 6.0. The 'default' is now
to use the style of the system, if available.

This however caused the projects generated by the wizard to not start with Qt6:

  QQmlApplicationEngine failed to load component
  qrc:/main.qml: module "Default" is not installed

Work around this by not hardcoding the 'Default' style if set. It should be the
default for Qt 5, anyhow.

Fixes: QTCREATORBUG-24905
Change-Id: I71aff50b84e3d096b9a87b7e5b49e2df6821f938
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-07 14:57:18 +00:00
Alessandro Portale
6c14b4dfaf QtQuick Application Wizards: Set default Controls Style to "Material"
The Controls Style "Default" that is currently by default in the
generated qtquickcontrols2.conf is not present in Qt 6. That leads to
QML runtime errors and aborting applications with Qt 6.

Let's switch the default to "Material" which is available since Qt 5.7
and present in Qt 6.

Fixes: QTCREATORBUG-25027
Change-Id: Ic8b631b771487624d7459a276d290b80c7ad8be0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-02 07:38:25 +00:00
Christian Kandeler
013f2a9d73 Wizards: Prevent deprecation warning in generated QtQuick application
Fixes: QTCREATORBUG-25002
Change-Id: Ic118e98a48913acc2abc841b985685059ef3741a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-27 12:31:16 +00:00
Eike Ziller
9ff91ef0d9 cmake build: Fix building with PCHs
- fix target name
- build pchs without extensions like all other targets
- require CMake 3.10 for plugins

Amends c038abb0ab

Change-Id: I0eae58a9e7ce91c0df6103790cb91a5229d06051
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-16 10:00:58 +00:00
Eike Ziller
1543060ffb Change Qt Creator plugin wizard to CMake
Doesn't make sense to put more qmake-based projects out there
for Qt Creator, so exchange the qmake version completely.

Also adds a README.md, which explains how to build and run a plugin,
since plugins no longer are built directly into a Qt Creator build
(which is a good thing).

Since we do not yet have a way to specify detailed build settings
from a wizard, keep the hack that the project file has a hardcoded
path to the Qt Creator development package. That way developers can
at least directly build the new plugin without fiddling with
build settings.

Fixes: QTCREATORBUG-24073
Change-Id: If6650d9e3c393ee9ac2a358923dfb072ec510850
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-11 15:35:01 +00:00
Assam Boudjelthia
1f9124c976 CMake: update project templates to work with Android for Qt 6
Qt 6 introduces qt_add_executable() function, which for Android
make sure to call few Android specific functions like:
* qt_android_generate_deployment_settings()
* qt_android_add_apk_target()
* qt_android_apply_arch_suffix()

Using add_library() only the user would otherwise need to reimplement
what's already implemented in add_qt_gui_executable().

Task-number: QTCREATORBUG-24681
Change-Id: Iec3984139844fe1cbac2d9a583b3c40bdaa308a0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-26 10:42:06 +00:00
Eike Ziller
cc6f35016a Merge remote-tracking branch 'origin/4.13' into 4.14
Change-Id: I6aa2cb51dcbb4d76238a2ed8603bf57a35ee4fd6
2020-10-21 09:10:50 +02:00
Eike Ziller
f21d0b531f Fix github actions for Qt Creator plugin wizard
For Qt Creator 4.13
- rename directory to 'workflows'
- use MSVC 2019 for Qt
- fix Qt Creator platform names
- don't use GitHub's now deprected set-env

Fixes: QTCREATORBUG-24412
Change-Id: Ifdd3e95da74fef4ad9f65ae2c084ff82b2ca1972
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-19 13:48:56 +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
Kai Koehne
432247357e Fix 'Qt Console Application' without translations for Qt 6
Augments c0bbbc2f70.

Change-Id: Ia6a6855dc93d5f89c546bc95f3426b3f05f83b37
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-15 13:50:51 +00:00
Eike Ziller
3b76714290 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RowSpecifics.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml

Change-Id: Ie5deacd39ae4f3c0966e7cb41a8fd832dcefbb09
2020-09-03 12:18:02 +02:00
Henning Gruendl
6d51955451 QmlDesigner: Fix mobile scroll wizard template
Change-Id: I00d0467ce4ed28d0135e16c6ae9802ed66a1ff7d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-02 14:00:34 +00:00
Eike Ziller
a71dbd4b33 Fix different UI aggregation styles for widget project wizard
This got lost during the transition to JSON.
Amends 241efa353d

Fixes: QTCREATORBUG-24422
Change-Id: I51dec2e84adb3c5944ecaf83697f3e776bd3d7f1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-08-14 07:37:24 +00:00
Christian Kandeler
45dd017853 Wizards: Offer auto-completion in "New C++ Class" wizard
That is, offer existing namespaces for the class name line edit and
existing classes for the base class line edit.

Fixes: QTCREATORBUG-10066
Change-Id: I276036864626eff92997e40e4e22ab16c4f4d617
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 10:11:37 +00:00
Christian Stenger
5b4b09481a Wizards: Improve python class wizard
Some minor fixes, simplifications and improvements.
In detail:
 * create valid Python code
 * allow creating a Python class also without a Qt package
 * hint about the need for a Qt package depending on the
   base class
 * remove QDeclarativeItem as base class as this is not
   present in recent Qt packages

Change-Id: I7198f315b3a9eec9a04f52d7438d05ccce40c3f7
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-07-02 06:58:51 +00:00
Christian Kandeler
59b84c8d19 Wizards: Update templates in regard to deprecation warnings
The QT_DEPRECATED_WARNINGS macro has no effect anymore, so let's remove
it along with the huge chunk of comments that took up an inordinate
amount of space in the resulting project file. The concise comment for
the QT_DISABLE_DEPRECATED_BEFORE macro is perfectly sufficient.

Fixes: QTCREATORBUG-24244
Change-Id: I549c16c2c037bb64c2833e4807047ab3a8b2103f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-30 12:13:41 +00:00
Tobias Hunger
c0bbbc2f70 Wizards: Update CMakeLists.txt files to handle Qt 6 and Qt 5
Update wizards to produce CMakeLists.txt files that can work with both
Qt 5 and Qt 6.

Bump minimum CMake version to 3.14 since that is the first version that
accepts Qt with major version 6 in AUTOMOC/AUTOUIC.

Task-number: QTCREATORBUG-24206
Change-Id: I2ff462e67f01d84939c02be579579f358bc0b20e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-06-29 07:29:31 +00:00
Alessandro Portale
3eaf52256a Icons cleanup: Remove unused icons and deduplicate identical pngs
Accordingly Adjust the svg element Ids to new png locations in the
source tree.

Change-Id: I717dd7165c571e69322a1cce8d609f49c6bc75bc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-22 07:12:07 +00:00
Alexis Jeandet
77d7bb5014 Meson build plugin initial support
Most basic project management is implemented:
- Project config/build
- Build options accessible to user
- Lists most build targets
- Meson and Ninja added to kit setup
- Basic project file tree with files known by Meson
- Some basic meson and ninja process output parsing
- Some project templates

Missing features, that will come later:
- Configurable project tree layout
- Locators for Meson
- Build importer
- Access to Machine files for better user fine tuning
- ...

Fixes: QTCREATORBUG-18117
Change-Id: I2811e71562c113fb0fc6b6177bcf0698fa71ef63
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-08 09:55:17 +00:00
Eike Ziller
24777becb9 Plugin Wizard/GitHub: Don't assume jom to be in Qt Creator package
It is no longer part of the qtcreator.7z for master/4.13, but instead
packaged separately in the installer.
Get jom from its own download location.

Change-Id: I642da3f560087982612d25d288eb7a960103854b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-05-28 09:05:20 +00:00
Christian Stenger
6a1d678db7 Wizards: Fix typo
Amends 829faf7eef.

Change-Id: Id09b5eca3a2c6a4a90d4402383723b8a03a59594
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-20 14:37:06 +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
Eike Ziller
10114dc036 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/android/androidmanifesteditorwidget.cpp

Change-Id: I8143d9e02837dcd78a637da7b333a6eeebb105cb
2020-04-07 11:13:58 +02:00
Christian Stenger
c98f213ae9 Wizards: Add support for PySide 5.15
Fixes: QTCREATORBUG-23824
Change-Id: Ia0a2785d6371f771fcf83d3b326e76455143f8a5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-07 07:52:13 +00:00
Andre Hartmann
ca22b33ddc Git: Add remote URL history completer
To checkout wizard and to remote add dialog.

Change-Id: I8e4e011a41a862a40d6c1eadd0eaf3ce55f6db80
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-05 07:46:14 +00:00
David Schulz
398930d3cf ProjectExplorer: Set temporary flag on scratch buffer document
Task-number: QTCREATORBUG-23509
Change-Id: Ieb3922030cb1dd4984b91ac24d0396bb19a4a711
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-24 12:55:44 +00:00
Mitch Curtis
e96b00bfb4 Qt Quick templates: move visible assignment after width and height
This is more common; visible and enabled are usually after size-related
bindings.

Change-Id: I2148491d8a8fdbf4f7bc2b261bd6472bae697969
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-03-20 12:52:33 +00:00
Christian Kandeler
b0779ad5f8 Wizards: Make it more obvious to users that they can create C files
Technically, almost any "new file" wizard could be used to create a C
file, but conceptually, it makes the most sense to turn the "C++"
category into "C/C++".

Fixes: QTCREATORBUG-23621
Change-Id: I002365fa35cc6c9bf7c71039e122f72890f66b1a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-10 13:23:57 +00:00
Christian Kandeler
829faf7eef File wizards: Optionally show the default suffix
In wizards that create a single new file, there's almost always a
default suffix that gets appended if the user provides only the base
name. However, there's currently no visual indication on the page that
such a suffix will be appended. Therefore, we add an optional field to
the FileWizardPage that displays the default suffix if the wizard
provides one.

Change-Id: Ia1c8966e7de14b484d065dbd4a41aa74f484f085
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-10 09:53:53 +00:00
Christian Kandeler
bcc2b5e08d "New Class" wizard: Try to find a base class header
If the project has a header file whose name suggests that it might
declare the base class, then add an include statement for it.
While we cannot guarantee that the include statement is resolvable as-
is, it's at least a basis for the user to adapt accordingly, while
without any include statement the class will definitely not compile.

Fixes: QTCREATORBUG-3855
Change-Id: I55ec43d58a9a13b9b59a5bbe6415a457b974b654
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-27 13:28:23 +00:00
Eike Ziller
fa59e02f89 Merge remote-tracking branch 'origin/4.11' into 4.12
Change-Id: I8cc80483cdb10309bf73aba5cfab52c1d90e1bbc
2020-02-26 08:14:47 +01:00
Thomas Hartmann
34f417a2e4 Qml tooling: Support Qt 5.15
...and keep the default at 5.12

Change-Id: I15439c2d71a0610971dc39246e8b98e9653b8f04
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-19 13:22:24 +00:00
Andy Shaw
e22eea1cf3 Fix the Python templates
This fixes the templates so that they do not produce any warnings
and also includes QQuickItem in the choice of base classes

Change-Id: I58bbd462052f5d2a64bb8c4bea5bbdcd15e66700
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-02-18 16:13:20 +00:00
Eike Ziller
086b4eef07 Plugin wizard: Enable building against Qt Creator snapshots in github workflow
Change-Id: I36a6ffb878c5bc6a59219424cab5b71bdc12bf33
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-02-17 14:51:04 +00:00
Alessandro Portale
08c606b882 Python: Add PySide 5.14 to the QtQuick application wizard
Change-Id: I03e93aa8bb72b48e93c196e56656e7f7321e33fe
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-28 18:48:48 +00:00
Christian Stenger
03ddc603cf Wizards: Split Application category
It lately became messy and it feels like it is
time to clean up these a bit.

Change-Id: I7b5da97cd7ad4231e28db13c98db16c656c8a6b0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-27 07:00:57 +00:00
Alessandro Portale
676db89e03 QtQuickPrototype wizard: Set example importPaths to "asset_imports"
"asset_imports" is the default subpath where the QmlDesigner resource
importer will create QML modules with imported 3d assets.

Facitiltate the inclusion of these assets by having the asset_imports
directory as example importPath.

Change-Id: I6977ff2f2cc1c6d34f5def005bfef99313021ee7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-01-22 09:00:55 +00:00