Commit Graph

194 Commits

Author SHA1 Message Date
Marcus Tillmanns
e61a59d8aa CMake: Fix semicolon handling
Change-Id: I63fb5eeb644b955e54ba9047a056169e47bb12f9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-10-10 08:55:04 +00:00
Tim Jenssen
1e53f104d4 Merge remote-tracking branch 'origin/qds/dev'
add QWidget include in src/plugins/qmldesigner/libs/designercore/model/model.cpp

prepare src/plugins/lua/CMakeLists.txt if lua plugin is not built

Necessary change in:
src/plugins/qmldesigner/components/toolbar/messagemodel.h

Because Utils::Id is a friend of qHash now, QtCreator API
removed uniqueIdentifier().

std::unordered_map<quintptr, ProjectExplorer::TaskCategory>
->
QHash<Utils::Id, ProjectExplorer::TaskCategory> m_categories = {};

other resolved Conflicts were in:
	cmake/QtCreatorAPI.cmake
	cmake/QtCreatorAPIInternal.cmake
	share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl
	share/qtcreator/templates/wizards/projects/qtquickapplication/wizard.json
	src/plugins/effectcomposer/effectcomposerview.cpp
	src/plugins/effectcomposer/effectcomposerwidget.cpp
	src/plugins/qmldesigner/components/assetslibrary/assetslibraryview.cpp
	src/plugins/qmldesigner/components/assetslibrary/assetslibrarywidget.cpp
	src/plugins/qmldesigner/components/contentlibrary/contentlibrarywidget.cpp
	src/plugins/qmldesigner/components/edit3d/edit3dview.cpp
	src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp
	src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp
	src/plugins/qmldesigner/designmodecontext.cpp
	src/plugins/qmldesigner/designmodewidget.cpp
	src/plugins/qmldesigner/qmldesignerplugin.cpp
	src/plugins/qmlprojectmanager/buildsystem/projectitem/converters.cpp
	src/plugins/qmlprojectmanager/qmlprojectmanager.qbs
	src/plugins/studiowelcome/examplecheckout.h

Change-Id: Ia6c204460baf4de886e45666d859ca048d578bcb
2024-09-25 15:20:01 +02:00
Eike Ziller
e4431beb8c Build: Get rid of custom dependency tracking for plugins
Instead of PUBLIC_DEPENDS, our build system would keep record and track
recursive plugin dependencies manually, by attaching a custom property
to the targets that reference the targets it depends on. Then it used
DEPENDS to add all these recursive dependencies.

Get rid of this custom reimplementation of PUBLIC_DEPENDS and just use
that instead. This needs a fix that we should not separately export the
licensechecker plugin when doing a super-repository build. Otherwise
external plugins configured with the result cannot find the licensechecker
target, which is referenced by the vxworks target that is exported
together with the QtCreatorConfig.

Change-Id: I1444a0b16e5519f5310f9c0ffdfc49481ac228a4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-09-18 05:55:36 +00:00
Marcus Tillmanns
d0ec82f54d ExtensionSystem: Allow .md files for License and LongDescription
Change-Id: Ic5f6ebf72ee97f30c0bca01a046f04aeff319c1f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-09-11 08:09:57 +00:00
Eike Ziller
88f8d5c5e0 Build: Only state direct dependencies in plugin spec
There is no need to state dependencies in the plugin meta data
recursively, they are resolved recursively in the end anyway.

This reduces the effort that we do in CMake during configure time.

Change-Id: Ic3161a405f6c13ba09cfc3211f03c4b4426afbc8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-09-05 13:51:09 +00:00
Eike Ziller
6cd306a992 Fix property used for writing plugin dependencies
Amends 6f2572a5f5

Change-Id: Ied88f97f0a94c83edf2375dde130f51c3c2beeba
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-09-03 12:21:57 +00:00
Eike Ziller
6f2572a5f5 Export Qt Creator's special properties
That we add to plugin targets, so these are also available when building
external plugins. Helps for e.g. recursive PLUGIN_DEPENDS.

Change-Id: I89b10a58a9aa3ceb720c0dff4b76564d1cb06ca3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-09-03 10:52:14 +00:00
Marco Bubke
40f462cf07 Enforce that plugins can't be used as library dependencies
We want to use the libraries in different projects where the plugins
are not present.

Change-Id: I51382ac7cfcf06871ac99a6b53b84840ca39bf00
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-09-02 14:24:58 +00:00
Marcus Tillmanns
5eb5e54b23 Extensions: Make dependency id lowercase
Change-Id: Icda5b426e7a3e15519e793789c117eabcd753316
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-09-02 13:29:21 +00:00
Marcus Tillmanns
587cf11530 ExtensionSystem: Add PluginId and VendorId
Change-Id: I4f47f95e1f4ff4af73c2b81320087b4592007993
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-09-02 11:43:36 +00:00
Thomas Hartmann
88323e429f Revert "Enforce that plugins can't be used as library dependencies"
This reverts commit f5bb913c9d.

Reason for revert: This breaks snapshots build for the license plugin

Change-Id: I52a9f0b40081d648de68a5bdc3d9b3962e19061a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-08-30 12:08:17 +00:00
Marco Bubke
f5bb913c9d Enforce that plugins can't be used as library dependencies
We want to use the libraries in different projects where the plugins
are not present.

Change-Id: Ia3b183dcf57c7c63c75a17e9d5e3c3ef672e668e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-08-29 10:13:33 +00:00
Orgad Shaneh
f95d904d0e Build: Suppress moc warnings when building without tests
Many source files have Q_OBJECT inside #ifdef WITH_TESTS. Automoc uses
a very basic parser that detects this file as mocable, but moc shows a
warning: "No relevant classes found."

Just suppress the warning on this case.

See also upstream issue:
https://gitlab.kitware.com/cmake/cmake/-/issues/26224

Fixes: QTCREATORBUG-31492
Change-Id: Idea7b05b4faf4011d7e1ecb44495341d73654170
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-08-28 09:30:23 +00:00
Tim Jenßen
93588dbee2 Merge remote-tracking branch 'origin/14.0' into qds/dev
Conflicts:
	doc/qtdesignstudio/src/how-to/qtdesignstudio-live-preview-desktop.qdoc
	qt_attributions.json
	src/libs/sqlite/CMakeLists.txt
	src/plugins/qmldesigner/CMakeLists.txt
	src/plugins/qmldesignerbase/QmlDesignerBase.json.in
	src/plugins/qmlprojectmanager/CMakeLists.txt
	src/tools/qml2puppet/qml2puppet/instances/qt5import3dnodeinstanceserver.cpp
	src/tools/qml2puppet/qml2puppet/instances/qt5import3dnodeinstanceserver.h

Change-Id: If33e41d8951a49acaba0a74c3e5848eef52bb945
2024-07-10 18:11:28 +02:00
Eike Ziller
f5dde31558 Move the shipped Lua plugins to the resources directory
On macOS, files in Contents/PlugIns/ need to be codesigned individually.
Since Lua plugins are not really binaries, per Apple's documentation
that is to be avoided (and we currently only sign executables there).

Just move Lua plugins generally to the resources directory, like we do
for other scripts like the debugger Python scripts, and load them from
there.

Change-Id: Idabd6b7c0c7c6e842b1752488cb7073f00e7be49
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-20 07:40:46 +00:00
Marcus Tillmanns
ddd137f3b1 Lua: Move lua plugins into normal plugin folder
Change-Id: I14ab0bb755a4279bc255673596fe084cd556433c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-13 10:26:29 +00:00
Marco Bubke
700c77cdd6 Remove INTERFACE_COMPILE_OPTIONS
Change-Id: Iea2692d2d6569da3154a6fa64c3b00286a1724c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-29 08:01:14 +00:00
Marco Bubke
95fc49c4ac Add compile options to cmake declarative interface
It offers an clean interface to disable warnings

Change-Id: Ia19360994d7ca439d067d2370d001d5aeae3999d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-05-28 18:22:11 +00:00
Eike Ziller
62896a1dd6 Fix Lua plugin installation
- remove stray ;
- add check for wrong arguments
- use qtc_copy_to_builddir which fixes the location and incremental builds

Change-Id: I57fcac03bc9572caf506472ad92046332367e70a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-04-17 11:21:48 +00:00
Eike Ziller
8502b82efd Lua: Avoid CMake 3.20+ API
Amends 08d9cb86a9

Change-Id: Ia44daca4fafaee3aeb0037c3ce0576d5c01746c4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-04-17 10:31:30 +00:00
Marcus Tillmanns
08d9cb86a9 Lua: Add first plugin
Change-Id: I207b986e7ce17aad544f1bdaba29fd4930ad679c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-04-16 13:53:05 +00:00
Eike Ziller
c19f97bd23 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/cmakeprojectmanager/cmaketool.cpp
	src/plugins/python/pythonutils.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: Ia3e35c763ff9475d17ad922718b54152209893b8
2024-03-14 11:35:07 +01:00
Eike Ziller
cdad61d08a QmlDesigner: Add optional dependency on LicenseChecker
It is important that the LicenseChecker's initialization (if that is
available) happens before QmlDesigner's, so add an optional dependency
to reflect that.

Add a PLUGIN_MANUAL_DEPENDS option to add_qtc_plugin, which explicitly
specifies the name, version and type. The existing PLUGIN_RECOMMENDS
requires the plugin target to exist to extract the plugin's version.

Change-Id: Ie2cf84e75964ce91ed8bbcdbeee9fa9770bed641
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-03-13 17:19:07 +00:00
Eike Ziller
ff04dc53ef Require Qt 6.4.3 for building Qt Creator
And remove unneeded conditions from CMake files

Change-Id: Ibb4646f83599c5a91fbd18ce3489103e4150c49f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-03-04 11:15:36 +00:00
Cristian Adam
edb8b0aeb7 CMake: Add QTC_USE_LLVM_LINKER option
llvm-link is faster on macOS than ld64. llvm-link can also be used with
MinGW GCC's ld which is very slow in debug mode.

Change-Id: Ie519f3111e05cfc7dffab2676108a0d53ebe08b2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-01-09 14:28:12 +00:00
Cristian Adam
f90f60bb32 CMake: Fix QTC_STATIC_BUILD
Change-Id: Idfcd36f2d5fdaf09c958ff101aa5e83e0a29cb58
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-10 10:11:18 +00:00
Tim Jenssen
1a3a8ecc96 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: Id242ab4ca485527defdcc1555d204e12e50ddb7a
2023-09-14 17:37:24 +02:00
Marco Bubke
9e60df9f7f CMake: Silence warning in third party code
Adding SYSTEM_INCLUDE for which you get no warnings. Fix
PUBLIC_SYSTEM_INCLUDE to work for all cases where PUBLIC_INLCUDES works.

Change-Id: I7059c2879004743c13c368220596081dd054407a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-07 08:53:43 +00:00
Christian Kandeler
fb4177a540 cmake build: Set the WITH_TESTS macro also in the tests themselves
Otherwise plugin and test code might parse header files differently.

Change-Id: I0243a7780b7095a4c518da26cc3cf23fd9f76cf5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-31 13:05:04 +00:00
Cristian Adam
8642dd3b68 CMake: Fix build for Windows
The `env_with_default` function is part of Utils.cmake, which would need
to be deployed. But it can't be part of QtCreatorAPIInternal.cmake due
to its usage before the inclusion of QtCreatorAPIInternal.cmake in the
main QtCreator CMakeLists.txt file.

A sepparate function needs to do the task.

Amends 1036c776f5

Change-Id: I95344dd98c5fa0258303ed8d02855584a1945144
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-17 07:55:11 +00:00
David Schulz
1036c776f5 CMake: add environment variable for ccache support
Add another environment variable whether CMake should check for ccache
and adjust the compiler options accordingly when building Qt Creator.

Change-Id: I796f29d7f6ad4a1f054f978d50dbd0120b873aea
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-16 07:29:09 +00:00
Marcus Tillmanns
973f74bad3 Tests: Add NEEDS_GUI flag to add platform argument
Tests that create a QApplication need to be started with
"-platform minimal" so that they won't fail on build servers
without Display.

This also keeps them from distracting you if you run them while working.

Change-Id: I05df258b2204a3abd3cdea446d6a52f3e57a4a62
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-10 12:15:12 +00:00
Eike Ziller
a419670ff5 Build: Change plugin json.in files to CMake style
They were still using variables in qmake style.
Directly use CMake variables in the json.in files and remove the no
longer needed escaping of quotes.

Adds a fatal message if it detects the old style in a .json.in file for
easier porting.

Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-25 13:21:16 +00:00
Eike Ziller
b11a6900e6 Build: Remove feature from the olden times
We don't set this to anything else anymore, so remove the option to set
it.

Change-Id: I9e2aced8909d557e3a4f0b8ca8fff70ac6ec2e1d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-07-25 12:28:33 +00:00
Cristian Adam
0dbc208a07 CMake: Add -fPIC also for OBJECT libraries
add_qtc_library would have set the POSITION_INDEPENDENT_CODE property
for STATIC libraries on UNIX based systems.

The OBJECT libraries need the same treatment.

Change-Id: Ia333a36ea0f35d7db3ed876cdde5b895b47644c7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-12 12:49:05 +00:00
Tim Jenssen
adb664f521 Merge remote-tracking branch 'origin/qds/dev'
Conflicts: src/libs/utils/filepath.cpp
  src/plugins/qmldesigner/qmldesignerexternaldependencies.cpp
  src/plugins/qmlprojectmanager/cmakegen/generatecmakelists.cpp
  tests/unit/unittest/CMakeLists.txt

Change-Id: I017a6075db41a5233487ac855ffe23de2b2bb0ee
2023-03-30 13:30:42 +00:00
Eike Ziller
b36287731e Merge remote-tracking branch 'origin/10.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp
	src/tools/perfparser

Change-Id: Ie5643100e0eb00e0933359dce320169b876f5634
2023-03-29 12:21:50 +02:00
Tim Jenßen
feabda3aa7 Merge remote-tracking branch 'origin/10.0' into qds/dev
bigger conflicts resolved at:
  src/plugins/qmldesigner/CMakeLists.txt
  src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
2023-03-26 16:26:18 +02:00
Eike Ziller
d99128e5e6 Build: Fix CONDITION with multiple parts
for add_qtc_test and qtc_add_resources.
The condition needs to be wrapped in () because otherwise conditions
that contain AND or OR themselves break.

Change-Id: Iff64ad15c5f5b6e5a9db5a97c975bd8854c59c02
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-23 12:10:34 +00:00
Eike Ziller
c7e94d80c7 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/shared/qbs

Change-Id: I33e13270c8c15a51b4ce4eaa6b4584041ed124e0
2023-03-13 12:30:04 +01:00
Marcus Tillmanns
67f7968e9b CMake: Add feature info for executables
Change-Id: I4cfa2168b6e03730c02ca089f3c6f86fc07a6a01
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-12 09:24:15 +00:00
Eike Ziller
d686d241d2 Build: Avoid installation of huge static QmlDesignerCore library
It is not used as a public interface, just to share with tests. Do not
install it.

Fixes: QTCREATORBUG-28673
Change-Id: I669ffd468291b8150568d0193a33e5795d58f017
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-07 14:23:02 +00:00
Marco Bubke
121e300527 cmake: Add PROPERTIES to add_qtc_test
Change-Id: I66d4437866ae2b107fede78760284dc35a1fb8f0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-02-16 12:27:24 +00:00
Eike Ziller
a89d1e5958 Build: Don't add QT_RESTRICTED_CAST if QT_NO_CAST is already set
as directory property.
It is not allowed to set both, but perfparser adds QT_NO_CAST_FROM_ASCII
as a directory property now.

Change-Id: I6dbc8911521c737dd38c58777b8cd785e8cfe135
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-25 15:04:47 +00:00
Eike Ziller
06c4df37b9 CMake build: Remove usages of Qt5_VERSION
and remove checks for Qt < 6.2, since that is our minimum version.
Except for sdktool and qml2puppet.

Change-Id: Id36cd1a15a5a6e5480e4ae5d0a8ffaea4b2a1864
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-24 15:35:46 +00:00
Eike Ziller
55fa109b59 CMake build: Use version-less Qt targets
Since we do not support Qt < 5.15 anymore, and as a first step
for getting rid of our special FindQt5.cmake.

Change-Id: Icc5dbaf9b0a3a622b1f609ff114b9decb6d2856c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-01-05 10:13:16 +00:00
Tim Jenssen
98a40b3690 CMake build: Make errors of execute_process fail the build
Instead of silenty failing and resulting in broken builds/packages.

The property is only available since CMake 3.19, so limit the feature to
that.

Change-Id: I82b06e78540e81a809f7fdfe130648becfc9672e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-28 08:29:42 +00:00
Marcus Tillmanns
66eca4cb4b CMake: Fix WITH_SANITIZE
Adding qtc_enable_sanitize to add_qtc_executable to also instrument applications

Changing qtc_enable_sanitize to use target_compile_options instead of trying
to modify CMAKE_CXX_FLAGS_DEBUG and hoping that nobody else overwrites it,
which previously erased the added flags.

Adds support for MSVC /fsanitize

Change-Id: Ida80cfd7ef7ea91b2d6473fdc047cb7132cdfec6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-09-20 10:17:31 +00:00
Eike Ziller
b338405477 Require Qt 6.2 for building Qt Creator
Change-Id: I43f7bf123e359b4e312269f645a9d26aeeeb6d7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2022-07-11 13:36:18 +00:00
Eike Ziller
f950a5d86c Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/libs/utils/terminalprocess.cpp
	tests/auto/qml/qmldesigner/coretests/CMakeLists.txt

Change-Id: Ifc5b37dadd46af752f0771a2685da1ac9a6260bd
2022-07-07 13:47:12 +02:00