Commit Graph

163 Commits

Author SHA1 Message Date
hjk
e75b81b0a8 QtSupport: Use current aspect ctor pattern for Qml related aspect
Task-number: QTCREATORBUG-29168
Change-Id: I3779ed4075dc98ccafc2490009d1217e908ad83c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-07 07:55:32 +00:00
hjk
ebb2b9b73a QmakeProjectManager: Avoid endless loop on self-referencing mkspec links
Change-Id: I2b8fda49931c2f133f96c6e1c8001757d926af9e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-09 06:49:41 +00:00
hjk
cab81a5d03 QMakeProjectManager: Proliferate FilePath use a bit
Task-number: QTCREATORBUG-29140
Change-Id: I66511871789cd7428695eba8720e7ef6a2236497
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-08 11:30:24 +00:00
hjk
64c48af15b ProjectManager: Auto-register build settings aspects
Add the necessary contructor to TriStateAspect, too.

Change-Id: Ieb0f19cdf95f7492380d7c4e5663f455e4da3452
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-01 11:36:43 +00:00
hjk
318ac76339 QMakeProject: Use PagedSettings page for options
Also adapt to a few recent usage changes.

Change-Id: I33f45fe7c2b8738280a7c81ddb9110cb8714c45a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-16 08:10:08 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Alessandro Portale
3023b6ab03 Translations: Remove stray Q_DECLARE_TR_FUNCTIONS(...)
And handle the consequences in qmakebuildconfiguration.cpp.

Change-Id: Ic24d99927254e8d16decea49b880a2446bf322e6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-10 09:09:48 +00:00
hjk
44a9f5a63a Qmake: Use FilePath in QtVersion::reportIssues
Change-Id: Ia848248525238c316d6f6f120d915b9bdb28b8fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-12 15:13:02 +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
Eike Ziller
68388a38dd Merge remote-tracking branch 'origin/9.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp

Change-Id: I154a9ababa9e166cb06e98652d481fe6234f6399
2022-11-03 13:44:37 +01:00
Marcus Tillmanns
38c8e20071 QMake: Remove unnecessary build dir changed
Previously every time a qmake project was built, the
"buildDirectoryChanged()" was emitted, leading to a complete
reparse of the project file, tests, qml files and qml imports.

To keep "QmakeBuildConfiguration::updateProblemLabel" be called,
we re-introduce the "buildDirectoryInitialized" signal.

Task-number: QTCREATORBUG-27785
Change-Id: I32d881eacb8cf26050c33da643c74c2cab4dc22d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-26 11:47:49 +00:00
Christian Kandeler
13f40f5471 Utils: Add sorted() function
For simpler calling code.

Change-Id: Ia0a16a28770fd172f74d06a626148248bf5d3c0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-25 14:29:45 +00:00
Jarek Kobus
e54fb7ab64 Replace missing qAsConst with std::as_const()
Patch missing leftovers after recent batch patch.

Amends 8eb4d52342

Change-Id: I5469b8c10e6844cd1911f719ce3dddbb42697f95
Reviewed-by: hjk <hjk@qt.io>
2022-10-10 14:14:02 +00:00
Jarek Kobus
8741ce6afc QMakeProjectManager: Replace foreach with ranged for loop
Change-Id: Ibdb526ac3e0cfbb0568e17c21a1b73f7749a84ed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-07 10:11:36 +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
Alessandro Portale
76238bed6c QmakeProjectManager: Convert to using Tr::tr
Change-Id: I08393b1f27bf238c8ac0ccb99e63e56a9d21ecb5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-29 12:08:43 +00:00
Alessandro Portale
a917770053 Replace QtSupport::QtVersionNumber with QVersionNumber
Task-number: QTCREATORBUG-27786
Change-Id: I71a44709c264829f629c9dfce702076eda297a77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 12:08:39 +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
df358c7833 ProjectExplorer: Remove unneeded #include in projectexplorer.h
And fix side effects.

Change-Id: Ib6f0c5618092f80204b409edec0a92004f2350d2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-27 11:56:09 +00:00
Christian Kandeler
21c215f83c ProjectExplorer: Make BuildSystem:Name variable available
... for use in the default build dir template.

Task-number: QTCREATORBUG-26147
Change-Id: I1a32d60e0d5e2db514ac315c48c615c55ccda51f
Reviewed-by: hjk <hjk@qt.io>
2022-06-03 13:20:08 +00:00
hjk
b425273ea8 Pass BuildConfiguration to Qml related build aspects constructors
Less weird then before.

Change-Id: Ia36663721085132e6a2876783749d96d9a3983a3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-02 08:27:28 +00:00
Jarek Kobus
f630f49924 QtQuickCompilerAspect: Compile fix
Amends 5da8695dca

Change-Id: I532df0d3488750f5792f4ec09558d48d7e3ed752
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-22 12:34:06 +00:00
Eike Ziller
f562ebf239 Mimetypes: Make implementation switchable between new and old
- configure with QTC_USE_NEW_MIMEDATABASE to switch to the new one in
  utils/mimetypes2/
- added utils/mimeutils.h header for the Qt Creator specific static
  wrappers, that also includes the "public" headers for MimeType et al
  from the new or old implementation, depending on configuration
- change all utils/mimetypes/ includes to utils/mimeutils.h
- move the implementation for the wrappers to
  utils/mimetypes(2)/mimeutils.cpp
- also move the MimeDatabase declaration in the "old" implementation
  back to utils/mimetypes/mimedatabase.h

Change-Id: Ie8de229c035d6cd9a5e4739dc0fa78d9c17228e3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-25 07:19:58 +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
hjk
22ecef0444 ProjectExplorer: Streamline access to buildDirectoryTemplate data
There's only one kind of use, in the context of BuildConfiguration.

Change-Id: I09628ff443ef08e28738125a614c17d5d979189b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-24 16:27:33 +00:00
hjk
4ec490e77e Qmake: Proliferate FilePath use
Change-Id: Id9bdaf127b9b45ec01a12c21dccd8955e5fd2846
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-20 04:49:34 +00:00
Tim Jenssen
22121885fe baseqtversion: commands are FilePathes
also renamed the qmlscene* qmlRuntime*

Change-Id: Ifd522e21f5ce30aaa54060fdcebee2cd8b9463c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-14 09:50:01 +00:00
hjk
1db9dd058e QtSupport: Use FilePaths in BaseQtVersion::isInSourceDirectory
... and isSubProject.

Take the opportunity to rename them into isInQtSourceDirectory and
a isQtSubProject to make its limited scope clearer.

An open question is why this is only used for qmake projects.

Change-Id: If36f9457583eac17e149624ec46e5de10dd4a5a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 05:30:41 +00:00
David Schulz
5ec611b68e Utils: add FilePath::completeBaseName
Removing some FilePath::toFileInfo() calls again.

Change-Id: I6610beebf2c30754fde525b71f4c4a34ceb5e30b
Reviewed-by: hjk <hjk@qt.io>
2021-06-04 07:07:07 +00:00
hjk
f2f40efa03 Utils: Move process arguments class out of QtcProcess
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface

So move these items out of QtcProcess, later potentially to a separate
file pair.

Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 09:45:24 +00:00
hjk
cac3736b52 QmakeProjectManager: Un-export QmakeMakeStep
Not directly used in leaf plugins (iOS?) anymore.

Change-Id: I5fcf7e0d976e99b5d9eb8b0e6404651b35d5db43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-26 06:22:00 +00:00
hjk
d8770be95e ProjectExplorer: Aspectify Default Build Properties page
Change-Id: I3341ced5597f5b891b66da77e074fdf3217327ea
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-03-31 10:06:04 +00:00
hjk
c8829ff5b3 Utils: Use value/setValue instead of settings also for TriStateAspects
Change-Id: I3d0a58917cd6682e14894e4320d166a1c8de6a9a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-22 12:06:11 +00:00
hjk
27fe442f4f ProjectExplorer: Consolidate adding Qt host binaries to path
Change-Id: Ia301ae016d1d79e55040003280360aba095f2c03
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-12-15 07:52:24 +00:00
Christian Kandeler
dd62254e4e QmakeProjectManager: Make "system" execution opt-in
It has too many side effects.
Amends fcd6384f4d.
T_SYSTEM and E_SYSTEM are now treated the same.

Fixes: QTCREATORBUG-24551
Change-Id: Ib6df2762d329f2ddc0dd66190454159d446a9ac9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-16 10:40:45 +00:00
Christian Kandeler
1e452f1ad3 QmakeProjectManager: Compare the right set of arguments
... when determining whether to re-run qmake.
We need to look at the effective arguments, not the user arguments.
Of course, the whole approach is still a shaky heuristic, but it should
be more correct now than it was before.

Fixes: QTCREATORBUG-24538
Change-Id: I763f8095becacde0f9549890161b8a47c6344b6b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-09-09 11:34:23 +00:00
hjk
61bfd32438 ProjectExplorer: Introduce a ProjectConfiguration::kit() function
For convenience, and use it in some places.

Change-Id: I8f7cb502b37b2fbf4cf2d17cac9c6299558332dc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-09 06:27:21 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Christian Kandeler
b02f6b5d30 ProjectExplorer: Give the Task class an explicit summary
We'd like to create more useful tasks from compiler output, that is, try
harder to identify consecutive lines that refer to the same issue and
create one task for them, rather than one for each line. In such
"aggregate" tasks, the first line will not necessarily carry the main
information. Therefore, we make it explicit what this main information
is by introducing a dedicated summary member.
Also streamline the font handling for compile tasks.

Change-Id: I933f2643a13c710dab1ab548c56669b129026eb5
Reviewed-by: hjk <hjk@qt.io>
2020-05-14 08:23:59 +00:00
hjk
2e8e30a7fa ProjectExplorer: Move build step name mapping to BuildManager
... and add some translation hints. Looks like a more natural
place to live in.

Change-Id: I3e8917d826baaa7277dde744f3843d5ab7fe0afd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-04-23 09:26:54 +00:00
Christian Kandeler
daa58e899d Qmake: Do not repeat build directory in warning message
The build directory line edit is right above the label containing the
message, so repeating the build dir value just widens the label
unnesessarily.

Change-Id: I650a4ce76a82582b2710a4673c134dbb4faf306e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-24 07:17:45 +00:00
hjk
3f68292dbe ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChain
Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code.  Plus some code cosmetics nearby.

Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 15:59:12 +00:00
Tobias Hunger
39cddf5d03 DebuggerAspect: Simplify handling of Qml debugging
There should not be a need to have the linkQmlDebuggingLibrary Q_PROPERTY
anymore. The property is added for the benefit of the DebuggerAspect, which
can just check relevant BuildConfigurationAspect directly.

Change-Id: Ic47ca9e26911e096564fe77bd14bebe959b4f116
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 12:58:40 +00:00
hjk
278e981422 Qmake: Deactivate parse guard before it can cause trouble
... in the QmakeBuildSystem destructor

Change-Id: I23336cc0b72673fd2c63235b1c568439159d3d8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-06 16:45:04 +00:00
hjk
0334b6e491 ProjectManager: Add convenience Task subclasses
For Compile, BuildSystem and Deployment. Unclutters user code and reduces
binary size.

Change-Id: Ia18e917bb411754162e9f4ec6056d752a020bb50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-20 10:11:59 +00:00
hjk
b4ee6eb3c0 ProjectExplorer: Move some of the BuildInfo setup code to central places
Change-Id: I8893366acb187ea1a94a8ca272ded2c46cb521d1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-14 13:56:10 +00:00
hjk
1eaf44a270 ProjectExplorer: De-QObject-ify BuildConfigurationFactories
The QObject was not heavily used. Object name was for debugging only,
translation context can be taken from the corresponding BuildConfiguration
objects, the qobject_casts in the three big importers are replaced by
dynamic_cast, which is good enough in that context.

Take the opportunity to re-use translations from base BuildConfiguration
for the common cases and sprinkle in some 'final'.

Change-Id: I8e9727c98c6e943cb333556861c24e701c2bdf45
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-10 12:46:38 +00:00
hjk
a971da3bfe ProjectExplorer: Replace BuildConfigurationFactory::availableBuilds
... by a function object.

Change-Id: I9953ba6915c0177e7c4067d36dd755fc2ba5cf84
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-09 15:42:21 +00:00
hjk
c95bde6f6a ProjectExplorer: Pass Id to BuildStep constructor
Allows to use constants in fewer places, similar to what e.g.
RunConfiguration does.

Change-Id: I9d049128206c4acf0ce14b06b66d6c090a7c5242
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-09 11:26:01 +00:00