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>
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>
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>
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>
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>
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>
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>
... 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>
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>
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>
- 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>
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>
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>
This got lost during the transition to JSON.
Amends 241efa353d
Fixes: QTCREATORBUG-24422
Change-Id: I51dec2e84adb3c5944ecaf83697f3e776bd3d7f1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
"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>