Commit Graph

3443 Commits

Author SHA1 Message Date
Christian Kandeler
73b1a765f3 Move evaluation of QtCreatorDeploymentData.txt to ProjectExplorer
We want to re-use it outside of the CMakeProjectManager.

Change-Id: I7550f86704bb7c2a683e831cf8827d5b0f6d90f6
Reviewed-by: hjk <hjk@qt.io>
2018-11-14 13:03:12 +00:00
Eike Ziller
3666e3aaeb Merge remote-tracking branch 'origin/4.8'
Conflicts:
	tests/unit/unittest/unittest.pro

Change-Id: I4f0ab05f96ee60900a3a35fad4c7331238367593
2018-11-09 13:30:40 +01:00
Ivan Donchevskii
8469e317c9 Utils: Adjust column numbers affected by convertPosition change
convertPosition change was introduced in 931ec39f64.
It changed 0-based column to 1-based which is how it
naturally is in Qt Creator.

This fixed some usages but broke many more. This is an
attempt to fix the remaining use cases.

Fixes CppEditor auto-tests.

Change-Id: Ia8d14da0ebb035cd2fdd6da4ff6ec89c1c5121a8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-09 08:51:21 +00:00
Cristian Adam
b8c5f918bd CMake: Do not generate build directories with spaces
Fixes: QTCREATORBUG-18442
Change-Id: I35aea2322801086d1ae11d123f53973dff7847be
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-29 14:14:50 +00:00
Eike Ziller
fd7cba88ef Merge remote-tracking branch 'origin/4.8'
Conflicts:
	doc/src/editors/creator-only/creator-code-pasting.qdoc
	src/plugins/android/androidbuildapkwidget.cpp

Change-Id: Iea8b7135643d14ffe49d10b14bedb8fa5ac48063
2018-10-24 13:58:45 +02:00
hjk
0f5d5dbfe4 ProjectExplorer: Make BuildStep::immutable use a data member
Default to false, remove all no-op reimplementations.

And rename the getter to isImmutable according to the rules.

Change-Id: I8cce79d88fb59badfa1cffcf30a46f7ff3b09e8b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-23 14:12:39 +00:00
Robert Loehning
4032f6383a Fix frequent typo
can not -> cannot

Change-Id: Ie872ada1bc9b4ed64bffb667c2e44dbb13b4ad11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-23 09:30:20 +00:00
hjk
d6c605d84c ProjectExplorer: Change BuildStepConfigWidget::summaryWidget()
From a virtual function to a normal one backed by a real data member.

That's essentially what several re-implementations did, the other
ones used a fixed value instead.

Change-Id: I61e45f1d4f7f0f80fe2eb1f2729785f37e7bb803
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-17 06:14:55 +00:00
Eike Ziller
511bd64f3f Merge remote-tracking branch 'origin/4.8'
Change-Id: I0ff6f659b7ccd4ff5a79e422a1d54488508fe05f
2018-10-16 07:11:57 +02:00
hjk
683e7aa6cf ProjectExplorer: Make BuildStepConfigWidget::displayName a value
Use BuildStep::displayName() as default.

This probably could be the only possibility, but currently there
are some discrepancies that are kept in this patch to make
the patch mechanical.

Change-Id: I2a1e5c2ff37ad95e25309eb16e07099e42191f60
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-15 12:08:22 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
hjk
cbb98bedcf ProjectExplorer: Merge SimpleBuildStepWidget into BuildStepWidget
The extra m_step member is not worth the abstraction, especially
since almost all non-SimpleBuildStepWidget have something similar,
too. Also, as several derived classes needed to correct
SimpleBuildStepWidget's setShowWidget(false).

Change-Id: I6e80d8c84c363b90dc27c70abd7fa6cefa1ed91e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-12 16:01:46 +00:00
Eike Ziller
7af8e9b3b4 Merge remote-tracking branch 'origin/4.8'
Change-Id: I8acb6582890fb2e103996cc4987f7543d22d7108
2018-10-11 10:41:25 +02:00
Christian Kandeler
dba4d7f669 CMakeSpecificSettingWidget: Remove unused variable
Change-Id: Ifc1fc41ea9949198504cafe4da12ff582b40ffdd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-10 08:32:35 +00:00
Tobias Hunger
a43331ba67 Move "builddirectory" template from Core to ProjectExplorer
Move Core::DocumentManager::buildDirectory to
ProjectExplorerPlugin::buildDirectoryTemplate.

Move the setter along.

Change-Id: I3f1739723e800d04d2934149369b8881208305b4
Reviewed-by: hjk <hjk@qt.io>
2018-10-10 08:31:16 +00:00
Nikolai Kosjar
5900766ecb Toolchains: Detect unspecified language version
We checked the command line from the project manager for "-std=X" and
friends to figure out the language version to use. However, if such a
flag was not provided, we assumed the latest version we support. This
could conflict with the actual version of the compiler and its
predefined macros.

Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the
predefined macros of the toolchain. The MSVC compiler is an exception to
this, as it does not seem to properly set the value - check for
_MSVC_LANG if possible, otherwise simply assume some versions as before.

While at it, add also support for C17/C18 and the upcoming C++2a.

Task-number: QTCREATORBUG-20884
Task-number: QTCREATORBUG-21188
Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-08 09:07:56 +00:00
Tobias Hunger
97a13ead72 CMake: Remove unused variable
Change-Id: I0b90a2f6736fa7943b5abc3d98ecfd6fa466f035
Reviewed-by: hjk <hjk@qt.io>
2018-10-05 13:06:26 +00:00
hjk
1c9410e353 ProjectExplorer: Rename 'extraAspect' to 'aspect'
Using aspects is the standard pattern nowadays, there's nothing 'extra'
to them anymore.

Change-Id: I446f9d7b1db58a4899e5e44df33ce51f655e7be4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-02 08:32:51 +00:00
Orgad Shaneh
2f6c6b632c ProjectExplorer: Remove versionControls argument from scanForFiles
Retrieving the list is cheap, there's no reason to store it and pass
it through all these functions.

Change-Id: I394b512c113af92f60cfb8c2f6561d1617d9cd36
Reviewed-by: hjk <hjk@qt.io>
2018-10-02 06:59:56 +00:00
Ivan Donchevskii
0bd095aa45 ProjectExplorer: Rename compiler includes from System to BuiltIn
System include are those used with -isystem keyword, built-in
includes on the other hand come from compiler and always
follow in the end of the include list (after system includes).

Change-Id: I95c2fec36d2e5b43f014fe0a88d59c6769edfa1f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-17 11:24:32 +00:00
hjk
32ba65c7f8 ProjectExplorer: Remove IRunConfigurationAspect::runConfiguration
... and adapt constructors to not take the now-unneeded
RunConfiguration pointer.

Change-Id: I53ff338f51334ff7b0c22d4bed92bfcfc8225ea7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-13 12:09:39 +00:00
hjk
5bc0b6ce33 ProjectExplorer: Make WorkingDirectoryAspect less dependent on runconfig
This was one of the genuine users of the run config pointer in the
aspect base class. Instead of using that stored pointer to retrieve
the relevant environment aspect pointer later, pass and store this
env aspect pointer at construction time.

Change-Id: Icbdeb9ad0fe341e4003fb544c542064801aa170f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 11:14:47 +00:00
Marco Bubke
3abaf647d0 Add system include path to HeaderPath and merge ProjectPartHeaderPath
System include paths are appended after other includes by the compiler. So
we should set them as system includes and not as normal includes. Otherwise
we change the include order. Headers in system include paths are not
cluttering the screen with unwanted warning and by the way improve
performance too.

ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them.

Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 09:31:32 +00:00
hjk
06b6fff25e ProjectExplorer: Simplify LocalEnvspect's BaseEnvironmentModifier
The run configuration is known at setup time, and fixed.

Change-Id: Iad7837bf39fb5eeed49bd71b7f14b9692014ea9d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-06 12:12:53 +00:00
Tobias Hunger
a1ba378d8c CMake: Do not try to use icecream for cmake configuration runs
Task-number: QTCREATORBUG-21003
Change-Id: I166fdf2e540238d9ddd8694a0a7ad65e238e3331
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-09-05 11:41:28 +00:00
hjk
4192d7d62f ProjectExplorer: Compactify runconfiguration aspect creation
Change-Id: I12394d3df8deb7666be6ac3f112082f915454e82
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-09-04 12:45:21 +00:00
hjk
25400751a4 ProjectExplorer: Remove RunConfiguration::fillConfigurationLayout
Instead of using a hard-coded list of well-known (optional) aspects,
add all aspects, so there is no need for special treatment of
RunConfiguration with unusual/custom aspects needed.

Price and benefit is that the individual run configs are again
responsible for the aspect display order which is determined
from the aspect construction order.

Change-Id: Iff2656b2e358c0f0f789d4c006a5c44d0a1536a5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-09-04 11:02:49 +00:00
hjk
98f3b961c6 Unify key names for various fields in stored RunConfigurations
This replaces various versions of the key name of the arguments,
working directory, use terminal and use dyld image suffix fields
by unified versions ("RunConfiguration.Arguments",
"RunConfiguration.WorkingDirectory", "RunConfiguration.UseTerminal",
"RunConfiguration.UseDyldImageSuffix").

The different names for the fields are technically not needed
(as proven by several cases that already now used the same key),
partially outdated ("Qt4ProjectManager.MaemoRunConfiguration.Arguments")
make RunConfiguration constructors less uniform and more complex
than needed.

The "RunConfiguration." prefix in the new names is not needed, but used
by several other settings, so having it there looks more uniform now.

In (the unexpected case) that different keys would ever be necessary,
the default key name could still be overridden by using setSettingsKey
from user code.

Change-Id: Ifb74ad74e0a9c724c8bf5e71e1bb2424d5d1831b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:00:46 +00:00
Eike Ziller
98479ba312 Merge remote-tracking branch 'origin/4.7'
Change-Id: I00b0009867322be55c215351054acc7de5b9e335
2018-07-12 14:56:13 +02:00
Tobias Hunger
c17a1ce249 CMakeTool: Move introspection data into separate class
Change-Id: I53dd2f6f09f164042fe796761678b93f1f99bb75
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-12 12:21:40 +00:00
Tobias Hunger
e6cfe06dfc CMake: Fix building on current executable target
Task-number: QTCREATORBUG-20763
Change-Id: Ie25c0993c1c2051de3f6a15fca56b56caaa04b00
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-12 09:57:20 +00:00
Alessandro Portale
ad474f5fcb Fix: member initializer for 'm_fooBar' is redundant
warning: member initializer for 'm_isValid' is redundant
[modernize-use-default-member-init]

Change-Id: Icd521e7d77054512bc0ed6b95cf08440320b0ce0
Reviewed-by: hjk <hjk@qt.io>
2018-07-12 08:19:00 +00:00
Tobias Hunger
ba70df8be7 CMakeTool: Fix reading from SDKtool file
Change-Id: Ie1efbfe579c8d41ffd0795deaa3ee3759938862b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-11 10:21:20 +00:00
Tobias Hunger
7478c4aef1 CMakeTool: Split parsing out of data retrievel methods
Change-Id: I237d90310bc032b7537ab33e0cb181e2163be5a7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-11 08:30:50 +00:00
Tobias Hunger
942bd5f74b CMake: CMakeTool de-QObject-ification
Change-Id: I7c9dde72b8672be67f6771f98b54b31fa44a9166
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-11 08:30:41 +00:00
Tobias Hunger
05fb67fee7 ProjectExplorer: Use unique_ptr to store KitInformation
Change-Id: I406b6bed005fb7455e6ee41d81a2f314584a051a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-11 08:29:19 +00:00
Tobias Hunger
abc177efbc CMake: Use SettingsAccessor to read/write CMakeTools file
Change-Id: Idcb0d97c8ef4037ea97d8498f935f8631ca30bc5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-10 09:00:14 +00:00
Tobias Hunger
58ebcbe0ec CMake: Use unique_ptr to store CMakeTools in CMakeToolManager
Change-Id: I4dfb76b40e22da745b80c359d544fa2b6d3dac52
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-10 09:00:06 +00:00
Tobias Hunger
ccfb7c6aa4 CMake: Make handling of default CMakeTool more consistent
Change-Id: Idc2ba2c51122855f0b335f89ca5f916dea7665c5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-03 08:33:37 +00:00
Tobias Hunger
a15a7052c4 CMake: Simplify CMakeTool registration in CMakeToolManager
Change-Id: Ida5e6aea8c39ef21f535e06c8fed11b130f875e9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-02 09:54:34 +00:00
Tobias Hunger
2127f96f5f CMake: Remove CMakeTool::addCMakeTool method
Change-Id: I9c6abb58711acc14ae78d79b6f077034389c0a6f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-02 09:54:26 +00:00
Tobias Hunger
dca645f4c0 CMake: Fix header-related issues in CMakeToolManager
Just reorder some lines, make it clearer where the headers are actually
used.

Change-Id: Iec5cf98e7cfad7ee1bdd98df85df38b03c54dff4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-29 13:43:11 +00:00
Tobias Hunger
1c014c7573 CMake: Remove handling of legacy settings for CMake
Remove the code that reads CMake tool location from the Qt Creator settings
and then removes them from there.

This code was added in QtC 4.1 to ease transition to the (back then) new
cmaketools.xml settings file.

Change-Id: Ice96628159f4171716882cfdefc8991ec2341556
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-29 13:43:03 +00:00
Tobias Hunger
9c1fd4c2aa CMake: Move CMakeTool merging into separate function
Change-Id: I7c70e0aa09def8c7483d183791a76e56be18a0a4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-29 13:42:51 +00:00
Tobias Hunger
f5d51dcb69 CMake: Simplify restoration of CMakeTools a bit
Change-Id: If62acc96bb64e8e0c2767e35d4f2bca43cc23c65
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-29 13:42:41 +00:00
Tobias Hunger
be7109d732 CMake: Move code around a bit
Change-Id: I6129ee26ddd6ef2af713ad249dc884e63c1d5d6e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-29 13:41:56 +00:00
Tobias Hunger
88438a0e79 CMake: Small simplification
Change-Id: Ib89f95febeb45628e99e3c6a473853da4dcde3d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-29 13:41:49 +00:00
Tobias Hunger
8128d89a0b CMake: Remove cmake autodetectionhelpers
No user in-tree and the Ubuntu SDK for which this code was added
is no more.

Change-Id: I5b0c5f6faccf1adb451c4043378a204bfc350e50
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-27 13:07:43 +00:00
Tobias Hunger
9763851dc5 CMake: Fix SOFT-ASSERT on cmake tool removal
Change-Id: I721e71547976ecad57ed85080c67fb28fda4f8c4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-06-04 09:41:12 +00:00
Tobias Hunger
73f617ab34 CMake: Simplify code
Emit signal in addCMakeTool method directly instead of later.

Change-Id: I4640ffdf76d22f80a8c1ee14f8d79cc7885ddd70
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-06-01 14:03:19 +00:00