Commit Graph

57895 Commits

Author SHA1 Message Date
Marco Bubke
693c896e5a PchManager: Use Generated Files in BuildDependencyCollector
Task-number: QTCREATORBUG-21843
Change-Id: I33c29d50943a914313a4c2e577b0210460f663d8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-24 12:47:30 +00:00
Nikolai Kosjar
b5f7e303ee Clang: Fix build with GCC 5.3
Change-Id: I066c1c076c900e4eb3282e64b0b928327d15484d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-24 12:24:46 +00:00
Marco Bubke
46749ad7ad ClangSupport: Remove not used interface
Change-Id: I0e7ea2ba6dfdf651bbb509a07e866be614e01554
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-24 12:16:36 +00:00
Marco Bubke
a179030a02 ClangRefactoring: Adapt project part in the database
Extend ProjectPartArtefact and use CommandLineBuilder everywhere.

Task-number: QTCREATORBUG-21842
Change-Id: Ibc78849bc543512eccec8a558a1c3f57fec33fa2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-24 12:10:27 +00:00
Marco Bubke
1c2d41a63e ClangPchManager: Remove special back inserter
It was there because we supported very old compilers but I think that is
not anymore the case.

Change-Id: I15ea32f95a75b787f2681b71ed693a1525e5b7d3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-24 11:52:13 +00:00
hjk
db32dfe7a4 Prepare for potential QVariant::QVariant(const char *) deprecation
Change-Id: I772f7b454e8f015c9e5bfc8e165e64deb2e3089a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-01-24 10:53:28 +00:00
Marco Bubke
f5c3007058 CppTools: Add sourceFilePath to AbstractEditorSupport
Provide the source path to track a generated file source. You can for
example get the modified time stamp for the source file and use it for the
generated file content.

Task-number: QTCREATORBUG-21876
Change-Id: Ia422e128c5cb7a3dce88960f126152c2f65afb41
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-24 10:03:45 +00:00
Ivan Donchevskii
2e19352177 ClangFormat: Fix applying global settings
The actual apply() method was never called for the widget.

Change-Id: Idff194a36591db437cbe5695377005ed5a0b25d4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-24 08:36:05 +00:00
Ivan Donchevskii
020d1aab0a ClangFormat: Add unit-tests
Test reported cases from bugreports.

Change-Id: I9aeb42dc476cbfe98abb837f2e941d8e2685235a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-24 08:35:51 +00:00
Nikolai Kosjar
7315d9a47c Clang: Make clazy UI more fine-grained
...so that specific checks can be enabled/disabled.

This replaces the level radio buttons in Tools > Options > C++ > Code
Model > "Manage..." > Tab: Clazy.

Task-number: QTCREATORBUG-21120
Change-Id: If468d79d3c309b287b4105d83ac31f0b1489c71c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-24 07:39:07 +00:00
David Schulz
4acf2a1df1 LSP: clear message buffer after everything was parsed
...otherwise it grows endlessly

Change-Id: I5e59a8ac07677d422fe55b3fb760ab3d148fc358
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-24 07:16:12 +00:00
David Schulz
bcda567392 TextEditor: skip painting overlays with invalid background
Makes it possible to turn of specific overlays by unsetting the color.
Such color resulted in a black overlay until now, which is also kind of
unexpected.

Change-Id: I90732ae496af62b573b2e3b8d8c7fe56632ca8d9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-01-24 05:37:31 +00:00
Tim Jenssen
8d9ac8d94b QmlProject: update mainFile after renaming it
Set mainFile at the QmlProject and replaces the string inside
the .qmlproject file.
If that file is open and modified just save that, it is not nice
but qmake projects haves the same at the moment.

Task-number: QTCREATORBUG-10629
Change-Id: Ia3916644bacfc65862802e3dc5361edd50951d35
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-01-23 14:35:54 +00:00
hjk
37c009e195 Android: Simplify AndroidBuildApkStep::findInBuild
AndroidBuildApkStep are only ever inserted into the build step list,
never the clean step list.

Change-Id: I9a56bd045bf2434ac50649f3ce68209942c1ddba
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-23 13:46:51 +00:00
Marco Bubke
4ee5d68b33 PchManager: Update only after generated files have been updated
Task-number: QTCREATORBUG-21843
Change-Id: I881e86dac4074438880d657a07f2e473489ab42d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-23 13:10:20 +00:00
Marco Bubke
36edaf9380 PchManager: Ensure that the build dependency collector is cleared
Change-Id: I7c09117673e34a88f4711a99d8e89406683246f2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-23 13:10:03 +00:00
Ivan Donchevskii
093673e9cf Clang: Fix how tweaked header paths work
We need to provide built-in includes only when we use tweaked headers.
Also let's require Clang resource directory because it has to be
placed on the specific position inside the built-in header paths.

Change-Id: Id581238660c680725201de759216cf33f69f6cc7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-23 12:04:40 +00:00
Tim Jenssen
87746b5906 QmlJS: improve code
- no behavior change

Change-Id: I61e515876be768309e5647261ffbe2732de423b9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-23 10:06:36 +00:00
Filip Bucek
aaa8beab88 Wizards: Support using #pragma once instead of include guards
Allow users to choose #pragma once instead of #ifndef include guards in
generated header files.

Fixes: QTCREATORBUG-12166
Change-Id: I3ba41c7570beb9c5958e174b5581fcc25855050f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Filip Bucek <fbucek@atlas.cz>
2019-01-23 09:10:42 +00:00
Orgad Shaneh
2781c2a900 ClangFormat: Remove #pragma once from source file
Detected by GCC8.

Amends commit d7058e1afe.

Change-Id: I06c6f23dc69ab729a45f3bf9a8aff53e41b35cfa
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-23 06:22:54 +00:00
Christian Kandeler
13b0106dcd ProjectExplorer: Add history completion ability to SelectableFilesWidget
... and make use of it in project contexts.

Fixes: QTCREATORBUG-19781
Change-Id: I4618b6e4a64b1aaa1352afcc98e4cc6e5fac1859
Reviewed-by: hjk <hjk@qt.io>
2019-01-22 15:58:11 +00:00
hjk
90e31668d6 Android: Code cosmetics
Remove unused functions, inline rarely-used code, ...

Change-Id: Ib3b0645cebf6bfabea1f4f2b4c5a582afca18101
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-22 15:14:58 +00:00
hjk
e9ba3e1b7c Debugger: Execute LLDB path substitution at similar times as GDB
There have been some event sequencing changes between LLDB 6.x and 7.x,
leading to QTCREATORBUG-21615. This change here is moving to a similar
sequencing on the Creator side as a first step.

Change-Id: I13a0901f96ae523b57ad03d8d251890f9c71d46c
Task-number: QTCREATORBUG-21615
Task-number: QTCREATORBUG-17468
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-22 15:14:40 +00:00
Ivan Donchevskii
def5248db2 ClangFormat: Reduce the amount of electric characters
Adding '.' or ',' very ofter makes the statement invalid.
Do not force the formatting in such cases.

Change-Id: I7e58e5af6eed065a3bc0df29698aececa579feed
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-01-22 14:18:10 +00:00
Ivan Donchevskii
7f9931b3f9 Fix MSVC2015 build
- error C3431: 'LanguageExtension': a scoped enumeration cannot be
redeclared as an unscoped enumeration

 - add constructors to SlotUsage

 - do not use pointers for back_insert_iterator.

Change-Id: Id6df08436de639b70fdf6ccc4914f8dee2cb8628
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-22 12:57:08 +00:00
hjk
537a4ba285 ProjectExplorer: Remove registerDeployConfiguration
Since the types are all the same now, no template is needed, and
effectively only m_configBaseId is set, so rename the function
accordingly.

Change-Id: I79bbf488a0549d78b6f3f0408e6744f71a5dc190
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-22 11:44:37 +00:00
Christian Kandeler
0949d09db7 Fix XML-based wizards
We returned bogus values for everything provided via combo boxes and
check boxes due to 3e8e82b2e3.

Task-number: QTCREATORBUG-18670
Change-Id: I1b8e507ee089b99e6172b6382aceefc036da5d9e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-22 11:28:16 +00:00
hjk
23c578c478 ProjectExplorer: Make DeployConfiguration final
There are no derived classes anymore.

It turns out that the isEnabled() and disabledReason() functions
are unused. Remove them.

Change-Id: I0e79729e87cb68d938115e704fb8e45c24ba1013
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-22 11:08:19 +00:00
Andre Hartmann
bb72406dad CppIncludeHierarchy: Replace foreach with range-for
Change-Id: I501a0a504175307ccce3cc4781645de9ae1679a8
Reviewed-by: hjk <hjk@qt.io>
2019-01-22 09:56:20 +00:00
Ivan Donchevskii
d7058e1afe ClangFormat: Refactor indenter to allow ClangFormat unit-tests
We do not build texteditor files in unit-tests so some tricks
were required to make ClangFormatIndenter available.

First simple unit-test proofs it builds and runs.

Change-Id: I81d5ea099bd27fd1c1ed8b5b7877299dcc62a67f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-22 09:52:15 +00:00
hjk
8b5beeb952 Qbs: Remove unneeded QbsDeployConfiguration class
It was an empty shell around the base class.

Change-Id: I4e6dce0a559a940d20f90a25e02ce79166c17e3b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-22 09:41:33 +00:00
hjk
59ac20b8d5 RemoteLinux: Replace RemoteLinuxDeployConfiguration
... by base DeployConfiguration and adapt remaining users.

Change-Id: I6e2a0ab0c9b682b221de0089f8768b5e621e0025
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-22 09:33:54 +00:00
hjk
a8d2546dad ProjectExplorer: Allow specifying deploy config widgets in the factory
Keep the generality of creating any widget, but also add a convenience
function handling the single special case that was ever used.

Change-Id: Iab4cbe62de04b9fcc6cb0bb305eaf9a48649d991
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-22 09:33:19 +00:00
Andre Hartmann
d89ad246be Include Hierarchy: Allow refreshing when current document changes
Realized by a "sync with editor" tool button like in the Projects
side panel. Store and restore the current "sync" state in the settings.
Default setting is off.

Fixes: QTCREATORBUG-12022
Change-Id: I567a83a4cf6e3b56e746c682f44573d0b6cc9440
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-22 09:29:30 +00:00
hjk
8f7211b1c6 ProjectExplorer: Remove DeployConfiguration::initialize
... and adapt remaining users.

The function is now not needed anymore, all setup from the factory.

Change-Id: Ibe77c3e55265309064bc8b840fd1129368cc70c1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-22 09:21:52 +00:00
David Schulz
bb5fdc70fa LSP: use correct json value in 'initialized' notification params
The protocol defines an empty object instead a null for this
notification.

Change-Id: I897ac0733c1f50a3fdb1950f21cc4cb4141b6fa8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-22 08:36:57 +00:00
Christian Kandeler
754da1031d FancyLineEdit: Do not overwrite content with non-existing history data
Change-Id: Ia51417b599e0e3847a0ade54ab5633c87c2ab48c
Reviewed-by: hjk <hjk@qt.io>
2019-01-22 08:35:09 +00:00
Alessandro Portale
1fe621ca27 Tracing: Don't clear a temporary container
Change-Id: Icfa3c6bb7f6a64968106c7b3f65b1f2c32def0a4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-01-21 19:00:40 +00:00
Orgad Shaneh
b46fc4a3b9 ProjectExplorer: Simplify Project::isKnownFile
Use std::binary_search instead of lower_bound. The iterator is not needed.

Change-Id: Ie40441c0780bcf0b912644c4cdfd2d73068fb441
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-21 16:24:25 +00:00
Andre Hartmann
3cc6db090f Use the same regex pattern for Autotest and QtSupport
Change-Id: I67e969da2b785ceeb501ec0bb61d67b8f973edca
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-21 16:20:24 +00:00
Marco Bubke
dd366b68de PchManager: Split pch tasks in project and system pch tasks
Like you can see in the task numbers this patch is touching many different
areas. So I will only touch the main parts. It is using a clang action
instead of an extra process which will be enabling the handling of
generated files in PCHs. The flags from the project part are now not
anymore transformed in a command line but they are saved in the container
semantically aware so that they can later be merged. Most of this patch is
simply polishing of other patches.

Task-number: QTCREATORBUG-21346
Task-number: QTCREATORBUG-21380
Task-number: QTCREATORBUG-21382
Task-number: QTCREATORBUG-21383
Task-number: QTCREATORBUG-21693
Task-number: QTCREATORBUG-21778
Change-Id: I9b0c02d8149b554254e819448fbc61eeaa5b7494
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-21 15:27:10 +00:00
Tim Jenssen
a78e3e5dd5 use initializer lists
Change-Id: I82b04601f1db52197b3dc625b6b7e0f143c1c8b6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-21 15:10:54 +00:00
Orgad Shaneh
620086109a VCS: Make "Keep Editing" the default only when closing the editor
If the prompt is displayed on button press, the default is Commit.

Task-number: QTCREATORBUG-18799
Change-Id: I706a2700e08bb45f44019a0fe8d44365438ee9f3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-01-21 14:00:49 +00:00
Orgad Shaneh
06da56335a VCS: Add mnemonic for Close when closing submit editor on Windows
The default style on Windows doesn't have mnemonics.

Task-number: QTCREATORBUG-18799
Change-Id: I785ff327a4099cd56cdc081ebdaa14734d9a82a3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-01-21 14:00:24 +00:00
Tim Jenssen
ca4378c499 QmlDesigner: remove not used include
Change-Id: I9a1ee2d902e672b4a066852b45d92e42ad385114
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-01-21 13:35:52 +00:00
Nikolai Kosjar
dd4eace7a5 Make scripts/generateClangTidyChecks executable
Change-Id: I52400415794691b706be25cf46252b91a4515f90
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-21 13:11:06 +00:00
Orgad Shaneh
ba558143c2 CppTools: Fix GCC8 warning
cppcodemodelinspectordumper.cpp:669:97: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]

Change-Id: Ie991ca958ca3f09c31bfe88c922a314a3b8d5677
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-21 13:06:14 +00:00
Tim Jenssen
c3a04c1873 GenericProject: fix memory leak
Change-Id: I5f5811229c6311fa19432a5018a1da33ead7894a
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-21 12:44:30 +00:00
hjk
372fbf9c05 Use new DeployConfigurationFactory::addInitialStep in some cases
Less code, less classes.

Change-Id: I3ba9920f4f389e14c67cd8c5d937a4b4659865e7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-21 12:05:28 +00:00
hjk
910496130c ProjectExplorer: Add a mechanism to specify initial steps
... in a deploy configuration.

The idea is to replace DeployConfiguration-derived::initialize()
functions by that. This can also be used to cut link-time ties
of "derived plugins" by using step ids instead of creation of
real class instances when specifying deploy config contents.

Change-Id: Id7c613b054e37fe5d03463b9b0aa7dfef44a8e13
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-21 12:00:44 +00:00