Commit Graph

266 Commits

Author SHA1 Message Date
hjk
d8de6c88e9 Avoid creation of temporary lists of ProjectNodes
Change-Id: Iac84f7f95291fb3b12a071a066d358aaab309c52
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-17 11:05:39 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
hjk
48990c9400 Qmake: Use FileUtils::commonPath instead of the string based version
Change-Id: Ib7dce9ed26b6ca280767e88ada2bcff52c8a5684
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-04 08:04:46 +00:00
Jarek Kobus
43f3b70437 QMakeProjectManagerPlugin: Limit the usage of qMakePair
Remove unneeded Utils:: scope.

Change-Id: I9d42aa2005214004b91686168e2bcaa420354a6c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-04 08:04:05 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
hjk
2496ffe3ce Code cosmetics
Mostly unused #include's, also sort them or reduce scope.

A few namespaces, ...

Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-06-24 14:44:13 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Assam Boudjelthia
91117a1c36 Android: Clean up for extraData constants
clean, rename and delete unused constants, we well as unify the
usage between qmake, cmake, and qbs.

Change-Id: I8827ac2f2f7660e337694fef17f744e727bd776a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-06 08:07:42 +00:00
Vladimir Serdyuk
5d1d6c83a4 iOS/CMake: Fix running non-Xcode targets and targets in subdirectories
Improve support for running iOS bundle built with CMake introduced in
3a294f670d.
Currently it supports only Xcode generator and does not work if target is
created in a subdirectory.

This patch adds support for non-Xcode generators (tested with Ninja) and
targets created in a subdirectories with any generators.

The solution is not pretty due to the need to keep qmake compatibility.
Would be glad to refactor if there's more correct approach.

Change-Id: Ieaf7e3186ab55cadc643d9bd3d94442f9ac72228
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-10 15:23:27 +00:00
hjk
2a20778937 ProjectExplorer: Use more FilePaths in ProjectNodes
... and related classes.

Change-Id: I50844a0b60e4b0769727b17d5b3d544cd6d10f0d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-10 08:24:21 +00:00
hjk
1bde4ddbec ProjectExplorer: Use FilePaths in project tree nodes
Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 13:45:06 +00:00
hjk
4a08edf78d QMake: Use FilePath::resolvePath to resolve files
Works with remote files, too.

Change-Id: I90244e456633aec1c2a750b4be3c707efeede42c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 06:48:50 +00:00
David Schulz
f66df921d7 Core: filepathify file renaming
Change-Id: I3d4f39e34e65cde3df7b7c19570e3a54d0625d53
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-17 11:13:51 +00:00
Alessandro Portale
9e2c6fbfca Android: Deduplicate string literals and use constants instead
Improves findability of identical string in code (via code model).
Reduces risk of typos.

Change-Id: I0e9d9af8eed5cd9b66bf303cfee99c53513bf314
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-02-10 10:32:15 +00:00
Assam Boudjelthia
33b06f5b81 Android: avoid adding ANDROID_ABIS to the project file
Use buildSystem::property()/setProperty() to keep track of the
selected ABI and avoid polluting the *.pro file with it.

Task-number: QTCREATORBUG-24674
Change-Id: I5516a77c9f2d1a8975045e1d7c383e72c52db9d7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-11-05 17:08:46 +00:00
Assam Boudjelthia
e9c9440653 Android: allow passing apps arguments via manifest on non-debug mode
Uses 00a1e5da7e1aea373a7e6be1d51e1573ff167dd8.

Task-number: QTCREATORBUG-23712
Change-Id: I9a7e134420b608815589578f3851abf150674fd3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-09-11 10:00:32 +00:00
Alessandro Portale
a650997448 QtSupport: Add supportsMultipleQtAbis getter
Introduce bool QtSupport::supportsMultipleQtAbis().

Let AndroidQtVersion respond according to the QVersionNumber.

This allows to replace the version arithmetics in several
places with straight forward (and better findable) function calls.

Task-number: QTCREATORBUG-24471
Change-Id: Ib6e39fd6485a54e08ad66f84d4e2582989043419
Reviewed-by: hjk <hjk@qt.io>
2020-09-07 07:10:26 +00:00
Assam Boudjelthia
7775334998 Android: regression fix for warning missing ANDROID_ABIS
Ammends 27514fa94d.

Task-number: QTCREATORBUG-23291
Change-Id: Iadf33f9c60a738c9ee4c810bb065667cab29aa92
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-23 15:16:03 +00:00
Assam Boudjelthia
27514fa94d Android: Warn if the selected device main ABI is not selected
Task-number: QTCREATORBUG-23291
Change-Id: I2ae13edaee30c6548a37e077c18f508a42b42d25
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-23 11:48:51 +00:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
hjk
2444595fbc Qmake: Move context build action handling to build system
Among others, this removes the wart introduced in 4d3d2d0dfb.

Change-Id: Iafa63f6e4cca327a1d1dd6a8bbcfaa10032327db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-30 10:21:55 +00:00
Eike Ziller
bac32dc740 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/coreplugin/dialogs/shortcutsettings.cpp

Change-Id: I1f21845350bb69268ca51bc77167a8244adce22a
2020-03-26 15:26:27 +01:00
hjk
6c1894b893 Qmake: Work around crash
The condition that's checked now triggered when playing around
with changing the JS expression that creating the default build
directory name.

Change-Id: I221be8cefb6918c10c383c23ee7cde73d3683e40
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-25 13:29:42 +00:00
hjk
80a766a2cb Qmake: Move buildDir() from ProFileNode to QmakeBuildSystem
More a buildsystem than a node thing in general and removes
one use of activeBuildSystem and one use of the ProFileNode
-> ProFile back pointers.

Change-Id: Ie007fcd0db9e9294a08b3a1cd68f825c7d3dc9b8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-23 07:42:15 +00:00
Eike Ziller
d80f3972a4 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ia8254720b2ba6e3e7b859017e1c2b6e289bed771
2020-03-20 08:16:19 +01:00
Assam Boudjelthia
db23f3e10b Android: Handle ANDROID.APK role in QmakeProFileNode
Change-Id: Ifac2377248f72c07f087fd4b294dc21e93a0ed7c
Reviewed-by: hjk <hjk@qt.io>
2020-03-19 12:00:19 +00:00
Eike Ziller
c8a2ea5433 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp

Change-Id: I2a0ccb84560174c5170d5baaff526c0e095f0ba0
2020-03-19 09:35:50 +01:00
Christian Kandeler
a102c11d00 Qmake: Add some debug output for file add/remove operations
This will help collecting feedback from users affected by bugs.

Task-number: QTCREATORBUG-22508
Change-Id: Idfc22245587dd2d71b229b4ab6c7562fb7a5ecfc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-16 11:13:32 +00:00
hjk
4672013595 QmakeProjectManager: Merge QmakeManager into QmakeProjectManagerPrivate
No need for two manager type classes talking mostly to each other.

Change-Id: I82a52385df08dc4cddac2d294661341a79b86a4d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-26 14:26:28 +00:00
Halfdan Ingvarsson
81a32df633 Fix build file when 'object_parallel_to_source' is enabled
If running 'Build File' and the 'objects_parallel_to_source' CONFIG
option is set for the project, make sure to modify the object file's
path so that it's target location is the relative to the build root
in the same way its source file's location is relative to the source
root.

- Add an accessor in QmakeProFileNode to check whether the
 'objects_parallel_to_source' CONFIG option is set.
- Modify the object directory in QmakeMakeStep::init to ensure that it
  has the same relative path to the object file from the build root,
  as its source file has relative to the source root.

Fixes: QTCREATORBUG-18136
Change-Id: I63ef3af1fd4b7ef9fc46959f44d88b8025e99238
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-09 13:58:53 +00:00
Orgad Shaneh
49f6b0146a Merge remote-tracking branch 'origin/4.11'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/mcusupport/mcusupportrunconfiguration.cpp
	src/plugins/python/pythonproject.cpp
	src/plugins/qmakeprojectmanager/qmakestep.cpp
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I22507be28fd80c49c9fee0dff5937a40db176a82
2019-12-07 18:39:54 +02:00
BogDan Vatra
6954e51174 Android: Don't add contains(ANDROID_TARGET_ARCH,..) scope for Qt 5.14
Starting with Qt 5.14 we don't need "contains(ANDROID_TARGET_ARCH" scope
as we are doing multi abi builds in one go, therefore
contains(ANDROID_TARGET_ARCH,...) won't work anymore.

Fixes: QTBUG-79948
Change-Id: Icc989e4dfd48c765340569dcb547e8d0d2b1e8f1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-03 14:12:58 +00:00
hjk
b74f4c9140 Qmake: Parse two AppMan specific variables
Effectively the same approach as for Android, but a bit more ugly
as we don't have necessarily access to the appman plugin headers
even at compile time.

Change-Id: I6d00e69b593470e059a16a1fcf6b57bdd550ae40
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-02 09:56:53 +00:00
hjk
2758682723 ProjectExplorer: Move BuildSystem owership to BuildConfiguration
... or Target.

This patch moves build system from conceptually "one per project"
to "one per target (i.e. per project-and-kit)" or "per
BuildConfigurations" for targets where the builds differ
significantly.

Building requires usually items from the kit (Qt version, compiler,
...) so a target-agnostic build is practically almost always wrong.

Moving the build system to the target also has the potential
to solve issues caused by switching targets while parsing, that
used Project::activeTarget() regularly, with potentially different
results before and after the switch.

This patch might create performance/size regressions when several
targets are set up per project as the build system implementation's
internal data are duplicated in this case.

The idea is to fix that by sharing per-project pieces again in
the project implementation once these problems occur.

Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-19 11:05:52 +00:00
hjk
6a878c7293 ProjectExplorer: Use a functor for BuildSystem creation
... instead of creating the BuildSystem direct. This will help the
shift of BuildSystem owner ship as a Project will have potentially
multiple BuildSystem instances (one per BuildConfiguration), but
still be responsible for creating them with the Targets.

Change-Id: I2dd71c7687ed41af9e42c874b3f932ce704e7ee3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-25 09:01:52 +00:00
hjk
66c7d75dbd Qbs, Qmake, Python, Generic: Introduce BuildSystem derived classes
... and move context menu action handling there.

This is a temporary measure to be able to move that functionality
alongside the actual BuildSystem to the BuildConfiguration.

There is a lot to be cleaned up left, to keep the patch small.

Change-Id: If4b0820a13b376fc97b70785052924972ce22705
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-25 07:55:10 +00:00
Eike Ziller
a0f3ce69bd Revert "Revert "Designer: Fix look-up of resources for UI files""
This reverts commit d907df0349.
The original change was pushed to 4.10 and reverted there for
binary compatibility reasons. Revert the revert here.

 Conflicts:
	src/plugins/projectexplorer/projectnodes.h

Change-Id: Ibfd84a30a6cfdd78e1fa1b1c61785d391a5a18be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-04 11:17:16 +00:00
Eike Ziller
4f0ffcecbe Merge remote-tracking branch 'origin/4.10' into 4.11
Conflicts:
	src/plugins/projectexplorer/projectnodes.h

Change-Id: Ibd255105a01c53a1f81a1ec7b30495dfef1877a9
2019-10-04 12:19:32 +02:00
Christian Kandeler
d907df0349 Revert "Designer: Fix look-up of resources for UI files"
This reverts commit 736eef24ca,
which breaks binary compatibility.

Change-Id: I696ad3e6efc6f02f595356c9864d69629eeef8bf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-10-02 12:44:06 +00:00
Eike Ziller
ac014e3875 Merge remote-tracking branch 'origin/4.10' into 4.11
Conflicts:
	src/plugins/projectexplorer/projectnodes.h

Change-Id: I10a749cca38c2d0929cf4d2b74ab089e14b6157b
2019-10-02 07:32:57 +02:00
Christian Kandeler
736eef24ca Designer: Fix look-up of resources for UI files
Commit 81a643ec99, fixing QTCREATORBUG-22412, was too restrictive: UI
files in applications have access to resources of library dependencies,
so we must consider those. We now only exclude resources from other
applications.
Note that this will potentially list non-applicable resources, e.g.
those from libraries to which our product does not have access. This
cannot be reasonably prevented, because not all build systems provide
this information. It's also not as bad as missing resources.

Fixes: QTCREATORBUG-22909
Fixes: QTCREATORBUG-22962
Change-Id: I51a87402b43c156618982813c408060f300e4e58
Reviewed-by: hjk <hjk@qt.io>
2019-10-01 09:27:10 +00:00
Christian Kandeler
46ef3f3027 "New class" wizard: Respect the project's "no Qt keywords" setting
Fixes: QTCREATORBUG-6812
Change-Id: I3f51c61f7a1ed1e4626be6bc31fa2e3affed2084
Reviewed-by: hjk <hjk@qt.io>
2019-07-22 15:43:19 +00:00
Ville Nummela
63e4180242 ProjectExplorer: Add special handling for removing files
... from a project which are pulled in via wildcards.
Such files cannot be removed from a project file, because they are
not listed verbatim. This kind of failure should not be reported to the
user if the file is also deleted, as the file list will have the correct
state after the next reparse.

Fixes: QTCREATORBUG-22586
Done-with: Christian Kandeler <christian.kandeler@qt.io>
Change-Id: I3dc66fe9a6594be7d0b86f46d830cd099ee49fd7
Reviewed-by: hjk <hjk@qt.io>
2019-06-25 11:53:58 +00:00
Christian Kandeler
1d589c259b ProjectExplorer: Remove dedicated "DuplicateFile" ability
Duplication works for any file node whose parent project node can add
files. No need to duplicate (!) this logic everywhere.
This makes the "Duplicate File" action available for cmake, qbs, etc.

Change-Id: Id1f0378c3b3d7e2dbca4d6bbcca5df1c2d33ee0b
Reviewed-by: hjk <hjk@qt.io>
2019-06-25 11:29:40 +00:00
Christian Kandeler
019447c535 New class wizard: Add Qt module dependencies, if necessary
Provide general infrastrucure and implementation for qmake.

Fixes: QTCREATORBUG-16067
Change-Id: I8c6368fe2724c9450dcbc3410b6ca459bbbdc043
Reviewed-by: hjk <hjk@qt.io>
2019-06-19 14:06:49 +00:00
Christian Kandeler
0c74f6cc21 ProjectExplorer: Add "build for current run config" menu entry
This lets users build the executable corresponding to the currently
active run configuration. It's functionally equivalent to locating the
corresponding node in the project tree and choosing "Build" from the
context menu.

Fixes: QTCREATORBUG-22403
Change-Id: Ic2b729c7ce17f1ad944dc06746bb9d6db90b6c61
Reviewed-by: hjk <hjk@qt.io>
2019-06-06 15:05:56 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Christian Kandeler
e59bcd9962 ProjectExplorer: Add a "product" tag to the ProjectNode class
A product is a project node from which a target binary is produced, such
as a Product item in qbs or a .pro file in qmake.

Change-Id: I6a0e6bed6c02684cb03b2b18fed6a1b493fa78b2
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 08:25:57 +00:00
hjk
36f4b9a81e Ios: Remove direct compile time dependency of IosRunConfig on qmake
Change-Id: Ieb0cbc71b525972afb66883b010cbf389657c406
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-06 08:37:31 +00:00
BogDan Vatra
26463a2219 Say hello to Android CMake support
Requirements:
 - NDKr19 or newer
 - Qt 5.12.1 or newer

QtCreator supports the following variables:
 - ANDROID_PACKAGE_SOURCE_DIR
 - ANDROID_EXTRA_LIBS

Be aware, that there is a lot of magic done on QtCreator side, and you
can't use only cmake to build an Android APK.

[ChangeLog][Android][CMake] Add Android support for CMake projects.

Change-Id: I1d351976ed56f424c2bc972f4ff7b5968147a2ed
Reviewed-by: hjk <hjk@qt.io>
2019-03-06 14:47:27 +00:00