Commit Graph

57917 Commits

Author SHA1 Message Date
Ulf Hermann
cc213dbe49 Tracing: Add context menu option to reset the flame graph
The double-clicking-on-blank-space method is really hard to discover.

Task-number: QTCREATORBUG-20732
Change-Id: I09e3189292c236fea0698e7cb68ea8340f9033fe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-25 12:00:05 +00:00
David Schulz
8d6ccb0822 Fix qbs compile
Change-Id: I6a1bb08fffc3e03aff15c30f3d81836d431bc042
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-25 10:20:23 +00:00
hjk
e6a184fe5c ProjectExplorer: Merge Qbs* into DefaultDeployConfigurationFactory
DefaultDeployConfigurationFactory used extra effort to not apply to the
Qbs (Desktop) case, with QbsDeployConfigurationFactory plugging exactly
that hole with essentially the same functionality, which is even the
default of the base class.

The only differences are the display name, which is dropped in this
patch, and the different keys in the .user file, which are updated
with this patch. Note that the display name "Qbs Install" for the
DeployConfiguration stays with this patch whereas a freshly created
one will get the default "Deploy Configuration" name.

Change-Id: I255371d0a0688fbc6303083eb6aa20563e876264
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-25 09:57:08 +00:00
David Schulz
49bd5b6c50 LSP: add a convenient function returning a TextDocument
...for a Utils::FileName

Change-Id: If490eba29a50f20c2f19f741e60f09244ee73cb6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-25 09:49:25 +00:00
David Schulz
1562674a06 fix compile after 0345bcb7cc
Change-Id: Ib51fb7f8b4a2229609fd76d482a4afb753681883
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-25 09:49:02 +00:00
Eike Ziller
dabeb0aa1e Move Help item from text editor to core
The functionality is not text editor specific.

Change-Id: Iee531572f14673e75129f4bfbb64a1437899d31e
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-25 09:46:21 +00:00
Nikolai Kosjar
65b0b99988 Clang: Fix return type
Change-Id: I6d97968c2aebe74c84cbd6cb56dfbbc743b0753d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-25 09:33:08 +00:00
David Schulz
c96b707cfb QmlJsEditor: fix completion item order
Items with assigned data were preferred over items without data, leading
to always preferring some special functions over objects like parent and
parentChanged.

Change-Id: I69e7e3ee2e80283daa16cd3df0260ebdb9a2b7f9
Fixes: QTCREATORBUG-21527
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-01-25 09:32:09 +00:00
hjk
80109f7ab5 TextEditor: Close popups with Ctrl-[
It's vim specific, but should not harm normal users, so make it
available unconditionally. This is already done for Ctrl-N and
Ctrl-P.

Change-Id: Idd5d8cd754e692b3a4cafadae590eaf598bd57c8
Task-number: QTCREATORBUG-21886
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-25 08:28:04 +00:00
Eike Ziller
0345bcb7cc Help: Rename handleHelpRequest to showHelpUrl
Since that is what it does.

Change-Id: I13ffe21cdb625a0df1313f2ff09bf84196f08768
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-01-25 08:23:18 +00:00
Eike Ziller
bbe0cd68fa Help: Remove unused method and related code
Change-Id: I4c4641290eceb441339cc237ee74a52c1018e3ae
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-25 08:23:11 +00:00
Eike Ziller
379aef60f9 Help: Unify showing a specific help url
Makes code paths easier to follow.

Change-Id: I6056862c15dbbaa8c63f0633ba70a178cfa910f6
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-25 08:23:03 +00:00
David Schulz
7b7a2ad630 TextEditor: Use callback in refactoring markers
Allows to trigger actions without adding specific handling into the
editor.

Change-Id: Ia63d65d3feca37bcefca1b6322ade039027a92d8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-01-25 06:13:11 +00:00
Christian Kandeler
a420374976 QmakePM: Do a "sorted insert" when adding files
Don't blindly append to the end of the list, but try to put files into
the right place with regards to lexicographical order.
We do not re-sort existing file lists, nor do we attempt to be fancy
with strangely formatted project files. But lists conforming to our own
style will stay sorted, in particular lists that have only ever been
touched by Qt Creator.

Fixes: QTCREATORBUG-553
Fixes: QTCREATORBUG-21807
Change-Id: I15db0e867a2d477fcf95e008f98ba468dcd83e45
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-24 15:31:53 +00:00
Eike Ziller
809416c993 Help: Simplify and unify code
The help widget doesn't need to resolve the external help viewer
instance manually, we have an entrypoint for that already.

Change-Id: I6875c434428baac3f1883813207cf318d7d3dc09
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-24 14:03:38 +00:00
Thomas Hartmann
7dded36d1d QmlDesigner: Add output to debug view
Change-Id: I7b59044a859281922014dc3a062d384bdcc6da7a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-24 13:41:11 +00:00
Mitch Curtis
f21b12c08b Fix grammar in puppet build dialog
Change-Id: Iafa12730e952e49617582e42e33a863f971b3153
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-24 13:39:05 +00:00
Marco Bubke
0f140ea194 UnitTests: Add .clang-format for tests
In the unit tests much test data is created. So relaxing the penalties for
long lines improves readability.

Change-Id: I22fbde8af76824908a066a049e58def95e0093f7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-24 13:18:10 +00:00
Ivan Donchevskii
6fa088589b Clang: Fix parsing files with Android toolchain
- filter out include paths from command line flags
 - do not search for MinGW parent toolchain in Android toolchain

Change-Id: I5f2566aa0bd10eb939380193e64e17b000743b73
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-24 13:12:41 +00:00
hjk
7f3de881e3 ProjectExplorer: Remove some Id use from DeployConfig interface
There's a 1:1 relation between the involved types, having either
the factory or the id implies having the other. So shorten interfaces
that used both so far. Also canCreate() == canHandle() && id matches,
so use that directly.

Also drop/QTC_ASSERT former canHandle() checks that are implicit
in preceding ::find() calls.

Change-Id: I686ea5774c5a01b05b3b4882b3d59080a812a677
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-24 13:09:13 +00:00
Marco Bubke
197f2b5f2a ClangSupport: Fix CommandLineBuilder
Forgot to add macros.

Change-Id: I4a5ab969a6b99c110b3ffd9e8f2b59560ccfc8b9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-24 12:54:09 +00:00
Marco Bubke
df8653dda9 PchManager: Fix generated file handling in PchCreator
Task-number: QTCREATORBUG-21843
Change-Id: I0517b87725117b7db7db14d32b737a0a6f2b3c35
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-24 12:48:02 +00:00
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