Commit Graph

3443 Commits

Author SHA1 Message Date
hjk
488bd7eddb CMake: Check parseGuard.guardsProject()
... before overwriting the current guard, retaining the
state of the current guard in the error case.

Change-Id: I45ec43d48a9a13b9b59a5bbe6415a457b974b654
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-27 16:27:34 +00:00
Eike Ziller
61dc14b67f Merge remote-tracking branch 'origin/4.12'
Change-Id: I3e7049da2c3da6f784e3cb3407c22ada556e5d24
2020-02-26 08:35:05 +01:00
Kai Koehne
fda9955df0 Globally disable WindowContextHelpButtonHint
Do set the global application flag AA_DisableWindowContextHelpButton
to avoid having to unset the default WindowContextHelpButtonHint
in every single dialog.

AA_DisableWindowContextHelpButton was added in Qt 5.10.

Change-Id: I21fe8bc5ddfa4c01ec7a799b04bfb6ff1c9d6d86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-25 13:26:44 +00:00
hjk
0e48783c03 CMake: Use buildConfiguration() instead of target()->activeBc
In case it does the same, it is faster now.
In case it does't do the same, it was something  wrong.

Change-Id: Ic3c237a9349d490bcadb10a5e9f700d68a178dae
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-02-24 12:57:03 +00:00
Tobias Hunger
f8e6638069 CMakeBuildStep: Adapt variable name after moving functionality
Adapt the variable name after moving the functionality from the
BuildConfiguration to the BuildSystem.

Change-Id: I16006066841222ddd3607198413e2b55e6270c89
Reviewed-by: hjk <hjk@qt.io>
2020-02-24 10:47:02 +00:00
Tobias Hunger
0dcd380865 CMakeBuildStep: Remove dead code
Change-Id: I3ba8d5ece263f19c0b129e9de81888c9016583a5
Reviewed-by: hjk <hjk@qt.io>
2020-02-24 10:46:51 +00:00
Tobias Hunger
64c9c9e184 CMakeBuildStep: Document that the buildconfiguration will be non-null
Change-Id: I27be487f2a662df8cf41152d6c7ffd0f40151061
Reviewed-by: hjk <hjk@qt.io>
2020-02-24 10:46:42 +00:00
Tobias Hunger
e525dea898 CMakeBuildStep: Fix message
Change-Id: I6c373639273bdce17531e3e7fe5ec0f38e62b8b3
Reviewed-by: hjk <hjk@qt.io>
2020-02-24 10:44:39 +00:00
hjk
be899de35c CMake: Move CMakeBuildStepConfigWidget definition to .cpp
Slimmer interface.

Change-Id: I34b8c172864456f67216efce7a09967c0ffec8be
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-21 14:10:15 +00:00
hjk
1714ecf809 ProjectExplorer: Remove Task::buildConfigurationMissingTask()
It should not be possible to trigger the condition. Except for MakeStep
the function is only called from real BuildSteps, that always live in
a BuildConfiguration.

A MakeStep could live in a DeployConfiguration, but that belongs to
a Target. That target always has a BuildConfiguration in case the
project type requires one. So not having a BuildConfiguration can only
happen when the project type doesn't require one, but then the
situation is not an error that should be notified as a Task.

Change-Id: I2a5d90fdadd3916d3dae6a0fdc6e6ab2010a8111
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-21 11:11:18 +00:00
Eike Ziller
62aed34077 CMake: Fix build with older GCC
Change-Id: Ib606c91039a4389e7f3fbb3d9c733240106da441
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-21 08:58:59 +00:00
Cristian Adam
f65f260c91 CMakeBuildSystem: Don't re-update code model on CMakeLists.txt saves
Currently if you edit a CMakeLists.txt and then press save, the code
model will be reindexed.

On projects like Qt Creator this operation is quite significant.

Note that the code model is updated after CMake has run on the project,
which is what I would expect.

Saving the CMakeLists.txt and not running CMake has no effect on the
project, and the code model shoudn't be reindexed.

Change-Id: I61289fda60752ef002cf3625d339d4fcaf144d1b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-02-20 15:41:28 +00:00
hjk
3fe1911d46 ProjectExplorer: Introduce some BuildStep convenience accessors
... and use in ProcessStep and related classes.

Change-Id: Ie6f1403d0aa2b9f5bcde06e994809466700b1357
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 16:11:05 +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
57662de841 CMake: Remove tealeaf reader mode
*** This removes support for CMake < 3.7 ***

Change-Id: Iddb0bab1a61b814adb4cb7ffa217284e96cb1140
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-19 14:05:42 +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
5064bddff6 Work around QLocalSocket::error deprecation
Centralizing does not bring much benefit here, it's just six locations,
and having either a central #include <QLocalSocket> in algorithm.h
or a separe file does not sound better.

In any case, it is absurd, that deprecating functions to "make code
nicer" requires spilling #if QT_VERSION_CHECK over the code.

Change-Id: Ia9a8c0eb6ef7cabbaffb46cfe472247e26e7e2c2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-19 09:57:04 +00:00
hjk
afd8bc2c9e De-Q_OBJECT-ify various IEditorFactory derived classes
Change-Id: I1470b06d4e10073bb6e4f7ae735f9829fab3bb7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-13 12:38:35 +00:00
hjk
bbf3682c2c CMake: Connect CMakeBuildSettingsWidget only to "its" build system
Change-Id: I1259b3325d633cb89043ce65f8e33b7914f6f06e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-12 17:14:29 +00:00
Tobias Hunger
108ab4b715 CMake: Do not start several parsing runs in parallel
This should make the parsing a bit more robust.

Change-Id: I6a8b1758acefaf197a53a68ec4e569582765a0ea
Reviewed-by: hjk <hjk@qt.io>
2020-02-11 16:01:02 +00:00
Tobias Hunger
a7bb870321 CMake: Remove disabledReason
The current implementation does not help the user and is not in sync with isEnabled(),
so it is not helpful to have.

Change-Id: Iddde1ac3da24d50e8a16d2bd4c6aa56eef34ef50
Reviewed-by: hjk <hjk@qt.io>
2020-02-11 15:58:06 +00:00
Christian Stenger
43c17efe5e CMakePM: Fix possible crash on exit
The pathchooser might get deleted after the inner line
edit had been destroyed already (as its ownership was
transferred to the layout of the CMake build settings
widget.

Partially reverts 314ceb13bc.

Change-Id: I3ff990af55ed08978d9f0c079c4b98a019a6ec87
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-07 11:55:58 +00:00
Christian Stenger
54cd881a40 CMakePM: Fix handling of qml debugging
Add a respective aspect to the build configuration
for handling qml debugging from the build side
similar to what we do with qmake and qbs.

Qml debugging needs to get enabled on the build side
before the settings on the run configuration page
has an effect.

Fixes: QTCREATORBUG-23541
Change-Id: I86267747601015760737d8b21978712896892a37
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-07 11:55:37 +00:00
Christian Kandeler
beed0c7396 CMake/Qbs: Do not emit Project::fileListChanged()
...explicitly.
This is already done as part of Project::setRootProjectNode(), and the
signal is connected to some rather expensive operations.

Task-number: QTCREATORBUG-18533
Change-Id: I96ea2f49c866f2b60f599748c4d5b82c790ed2ca
Reviewed-by: hjk <hjk@qt.io>
2020-02-07 09:39:19 +00:00
Igor Sidorov
a9e40ad14c Add final specifies to classes
Warning -Wfinal-dtor-non-final-class in clang trunk

Change-Id: I2bf17064bf8898eab10b82b69583a283157766d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-05 09:33:55 +00:00
hjk
c3f7ef5340 Several SettingsPages: Code cosmetics
De-Q_OBJECT-ify, remove unnecessary #includes, final-ize, etc.

Change-Id: I461d3e73400dacac90c22e7c84a40e3ea1718b6e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-30 15:04:58 +00:00
Christian Kandeler
314ceb13bc CMakeProjectManager: Fix memory leaks
Change-Id: Ie1d046a4d736b02db9465062784730ebbab6a2ed
Reviewed-by: hjk <hjk@qt.io>
2020-01-27 15:08:43 +00:00
Tobias Hunger
12ee28f090 CMake: Fix snap-ed CMake installations on ubuntu
Snap packages apparently work by sym-linking the cmake binary to snap.

So keep the sym-link if it points to a file called "snap" on Linux.

Task-number: QTCREATORBUG-23376
Change-Id: I065457c26b32a191760e8dda1ef1bdc7a79712ad
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-22 13:51:33 +00:00
Tobias Hunger
2da7d205d4 CMake: Add LD_LIBRARY support
Extract all the information necessary for the "Add build library search path
to LD_LIBRARY_PATH" from fileapi and enable the relevant UI in the
desktop run configuration.

This allows to remove a workaround introduced for QTCREATORBUG-19354.

Note that this is only supported by fileapi at this time.

Task-number: QTCREATORBUG-23464
Change-Id: I390d26ed8cd559bd7ff8c2701cd3b1cb8e764339
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-22 12:23:22 +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
Cristian Adam
08202b9110 CMake Build: rename target qmljs to QmlJS
This is in sync with what qmake and qbs project have.

Change-Id: Id82bbd933a8331c3e2032e5068323c183b2a1814
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-16 17:32:24 +00:00
Alessandro Portale
9904464074 Make various Q_LOGGING_CATEGORY's static
Change-Id: I43d3a198b0863d85a7fb305c7cb768f68acbd139
Reviewed-by: hjk <hjk@qt.io>
2020-01-15 14:54:10 +00:00
hjk
c75923756a Core: Provide empty implementation for IOptionPageWidget::finish()
Having it pure virtual only lead to a lot of unnecessary
re-implementation.

Change-Id: I37f71d1a160e21b93c7c73a6304b0eb6d5f0441d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-15 12:28:29 +00:00
Tobias Hunger
c9a1be7fe4 CMake: Support nested source_groups
Support nesting of source groups based on the source group name, split
at "\\" strings.

Change-Id: I6c0e5c64b2b4ee84cd07cde1ff5accc5c3b853df
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-14 15:40:54 +00:00
Tobias Hunger
9280f7f757 CMake: Improve handling of source_groups
* Use a special icon for source groups, so that those can get
  destinguished from folders
* Simplify folder structure below source groups to not include
  common paths elements

Task-number: QTCREATORBUG-23372
Change-Id: Ifcb35af9b35805a6272f27b0801c2fe7dfce95ae
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-14 15:39:48 +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
fae66e781a CMake: Use IOptionPage convenience pattern
du -s .obj: 108344 -> 106748

Change-Id: I3c3ce0af0f0ba2e32e349d38e8a0a24feeb57485
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-14 11:01:29 +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
Eike Ziller
0f30adcc8c Merge remote-tracking branch 'origin/4.11'
Change-Id: I949f4f63abe12e11c4598c98295bfccc82e0ebdb
2020-01-09 11:18:44 +01:00
Christian Stenger
04b3c56a2b CMakePM: Fix license header
QC uses GPL nowadays.

Change-Id: I6229deb09fadb1f7b1b210ba17ac4d0f3858023d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-08 14:10:13 +00:00
hjk
64380e1177 Cmake: Use new settings page convenience for CMakeSettings
Following the pattern introduced in 809e62e373.

Change-Id: I3fc42afcdfd71634bd0749cb970c4bf94ed7932a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-07 14:04:38 +00:00
hjk
571fb04d59 ProjectExplorer: Register some initial build steps by id
Helps to cut down BuildConfigration::setInitializer() usage.
Plan is to have more of that where feasible.

Change-Id: I138fcffc743daaf7068b5236c2a19c9ca0e3e2d4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-07 11:51:13 +00:00
Alessandro Portale
801275669a CMakeProjectManager: Use Utils::InfoLabel in CMakeBuildSettingsWidget
Task-number: QTCREATORBUG-23346
Change-Id: I6f8928ad1ed8ac15d354c7105d95be941833ae0d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-03 12:28:40 +00:00
Eike Ziller
92546d0983 Merge remote-tracking branch 'origin/4.11'
Change-Id: I0657cee6b87eea7b3178548bebed85d5ac824519
2020-01-03 08:57:33 +01:00
Tobias Hunger
32018623a4 CMake: Nest nodes below SourceGroups in Project tree
Task-number: QTCREATORBUG-23372
Change-Id: I8eccc7b9ce812b3abc9bf3e0057aa9d572f4faf8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-12-20 15:46:11 +00:00
Christian Kandeler
5cebf2a79a ProjectExplorer: Move some build-related code to BuildManager
The projectexplorer.cpp file is a huge mixed bag, which could use some
cleaning up. The queue() function is very much related to the
BuildManager, so move it there.

Change-Id: Ibc6425cc27d44514803a5e7c6139f83ddd760382
Reviewed-by: hjk <hjk@qt.io>
2019-12-19 17:35:46 +00:00
hjk
84d0e3dda8 Utils: Use FilePath for PathChooser::m_baseDirectory
... and collapse the two accessor versions to one.

Change-Id: I282753a0092601cff073684053ff914016452645
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-12-19 07:59:13 +00:00
hjk
e109b731ad Utils: Rename FilePathList to simply FilePaths
The exact storage type does not really matter here.

Change-Id: Iefec40f0f5909c8e7ba3415db4a11962694e1b38
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-12-18 08:43:18 +00:00