Commit Graph

58212 Commits

Author SHA1 Message Date
Christian Kandeler
d45d5b79f0 QmlDesigner: Fix warnings about unused variables and functions
Change-Id: I97a969f10bf9679c36bee8571309d415a733e4b0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-02-07 15:18:34 +00:00
Eike Ziller
c6d3e106fe Add changes file for 4.8.2
Change-Id: I988aaa653b9829899317237343d0906807408c94
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-02-07 15:09:21 +00:00
Ivan Donchevskii
dd778bcb23 Clang: Use full paths in compilation database for symbol collector
We we FilePath and NativeFilePath so that compiler warns us if we mix them
up.

Change-Id: I33d7abc7e4e724dff2a9b2b9b23deea8b358ccfd
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-07 15:03:39 +00:00
Eike Ziller
5481a35b98 Bump copyright year
Change-Id: I532c92311fda448fc272ab31e26ad562d9fb3ce5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-07 14:34:26 +00:00
David Schulz
874dde6863 TextEditor: extract initilizing the generic highlighter
Change-Id: Ibdd37aeb761087118dd4974a06d82c0dbe1f1731
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 13:49:00 +00:00
David Schulz
67b0d9be2e TextEditor: return all definitions for a file name/mimetype/document
Change-Id: Ifd4ee9ab71b95a66cf11e30e2de688d421094a4a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 13:48:50 +00:00
David Schulz
c02ceb180e Syntax Highlighter: return all definitions for a file name/mimetype
Can be used to create user controls to switch between
multiple definitions for a file or mime type.

Change-Id: I5fd3744db1e819d0d6f8448a53adaf9d2c7c168d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 13:48:34 +00:00
Christian Kandeler
499ccca115 RemoteLinux: Fix jumpy cursor when editing custom remote exeutables
Amends 93a6dd0c67.

Change-Id: I88e4537112c4c4dc5a471b4baffe6a93ed3b76ba
Fixes: QTCREATORBUG-21030
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-07 13:35:22 +00:00
Robert Loehning
8e888df852 Squish: Update FancyToolButton
Change-Id: Ia8c8b270ee2147a63eb1b90d14ff0792bfa95cd2
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 13:34:44 +00:00
Christian Kandeler
72cb9e26a1 PathChooser: Move setTextKeepingActiveCursor() to FancyLineEdit
We want to re-use it elsewhere.

Change-Id: Iadb03e2e85bc25f9111a8817170b9ec1f2f0a7b1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-07 13:33:49 +00:00
Nikolai Kosjar
d122049aee ClangTools: Fix order of ExplainingStepItems
We sorted by line/column/text, but we should not change the order for
these items as the original order is crucial to understand the
diagnostics. For example, the clang static analyzer diagnostics provide
step by step notes to explain the main diagnostics and these does not
match the line/column order.

Change-Id: I1e7235b37eb5713b0b7135aab46124f590a1443a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 12:52:25 +00:00
David Schulz
e720a1f371 Doc: adjust highlighting documentation
Update text and screenshots to reflect the UI changes in the settings
made with the kSyntaxHighlighting backend change.

Change-Id: I9ba1ecfee13aedbfe15e3226e71378b5d349fbb8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-02-07 12:51:52 +00:00
David Schulz
f75934f297 TextEditor: shorten namespace noise
Change-Id: I16bc218ccefb7234cb9c1299ee3022549b178600
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 12:51:27 +00:00
David Schulz
f4a45884ca TextEditor: add convenient definition for document function
Change-Id: I8bbaec71a4682e36d3919924932b410e2e9d74a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 12:51:19 +00:00
David Schulz
1dd462ac4d TextEditor: update the infobar after setting up the highlighter
removes the need of public function and member carrying the
information whether a highlight definition was found.

Change-Id: I8a0f24c9b376c01246116b502f5bbc06b3c65d21
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 12:51:12 +00:00
David Schulz
bf6dfa0db9 TextEditor: remove senseless function call
updating the info bar only makes sense after trying to set
a generic highlighter, otherwise the member capturing the
information whether a highlight definition for the current
file is available might be uninitialized.

Change-Id: I5cce70ecf1df0ba34f43eeb01743c1fae729cc6b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 12:51:05 +00:00
Marco Bubke
4da11c355f ClangPchManager: Don't generate a PCH header file any more
We used an extra process to generate the PCH but now we use clang tooling
so we can utilize the in memory file system.

Task-number: QTCREATORBUG-21933
Change-Id: I1c1d39248e9513c87269d854c35d38b373b0f515
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 12:51:00 +00:00
David Schulz
aaec90c6bc Core: add combo info to info bar entry
This allows user to show a combo box for a
stringlist. Every time the user changes the selection
a callback is called.

Change-Id: I27e16843465e6006cccdc3502e76be852b584dfa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-07 12:49:29 +00:00
Nikolai Kosjar
f5867d0fff ClangTools: Fix showing location for ExplainingStepItem
In case the ExplainingStepItem refers to another file than the main
diagnostic, display the file name too.

Change-Id: I1df2781766dc0c7a58b451e3c96b78574d574e54
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 12:23:32 +00:00
Nikolai Kosjar
8d9d24bc65 ClangTools: Fix copy action
* Location of the main diagnostic was not included.
* No actual message/text of an ExplainingStepItem ended up in the
  tooltip.
* Copy file path for FilePathItem
* Copy location and text for ExplainingStepItem

Change-Id: I47b890f77f5ff680ce82a75b51b598681a481385
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 12:23:19 +00:00
Nikolai Kosjar
9cfc4a68db ClangTools: Hide file path items without diagnostics
...in case diagnostics are filtered out.

Change-Id: I8a78f8873577ca80fe5a3d4123f64a9432c0fb7f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 12:22:27 +00:00
Ulf Hermann
e25be3d5ee PerfProfiler: Allow creating trace points without valid project
We can still create trace points on the desktop device then.

Change-Id: I123bece2d11a6405883e0bcec9b066cec4e017b9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-07 12:14:32 +00:00
Christian Kandeler
8bc7e04012 ProjectExplorer: Fix build directory expansion
QDir::cleanPath() must be called on the expanded path, otherwise it
messes with the data. For instance, QDir::cleanPath("%{a:b}/..") yields
".".

Change-Id: If55b9c7a733097cb36f62fbdae49fe03b542fcdf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-07 12:06:35 +00:00
Ivan Donchevskii
8d4e550551 ClangTools: Do not format code after fix-its without ClangFormat plugin
Applying analyser fix-its triggers formatting after each fix-it.
In case of no ClangFormat plugin this instead lead to indentation call.

Do not trigger anything instead when ClangFormat is not enabled.

Task-number: QTCREATORBUG-21880
Change-Id: I2f9e6e69be0366d2bb0701228bb5d562ef0095f2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-02-07 11:37:34 +00:00
Christian Kandeler
3f10e77b4c ProjectExplorer: Close open files along with project
Fixes: QTCREATORBUG-15721
Change-Id: Ifb67b7c228facfce52a2fe7ad29a4ecc199d91f4
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-07 11:34:14 +00:00
Christian Kandeler
03f76770e1 ProjectExplorer: Allow to close all files in a project
[ChangeLog] Users can now close all open files of a specific project

Fixes: QTCREATORBUG-15593
Change-Id: Icb755511ae682042433030c33671a214c448b8be
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-07 11:33:39 +00:00
Raoul Hecky
06ff4c6c05 Fix include paths with subfolder
When an autotools project is using SUBDIRS it starts a new parser. The
new parser object was not propagating includes/defines/flags to the main
parser object, and thus the code model did miss those.
This commit fixes that.

Task-number: QTCREATORBUG-21618
Change-Id: I19ed4dd3820257378e888f3c4935ebd30e958828
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-07 09:16:27 +00:00
Eike Ziller
a0969a3c09 Merge remote-tracking branch 'origin/4.8' into 4.9
Change-Id: I216c7dcbef1e840751332e7a6558c9d633444af3
2019-02-07 10:03:28 +01:00
Nikolai Kosjar
0f40b1fb5c ClangTools: Fix "Go to next/previous diagnostic" action
...for some corner cases:

 (1) Prev: If the very first diagnostic is selected, select the very
     last diagnostic instead of doing nothing.
 (2) Prev: If the first child diagnostic is selected, select the main
     diagnostic and not the previous main diagnostic.
 (3) Next: In case a file path item is selected, select the very first
     diagnostic for that file path and not the next file path.

Change-Id: If5ec573911a92c5cfcc1f49ef26ed4dcf82d034b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 08:03:13 +00:00
Nikolai Kosjar
9cca455fc7 ClangTools: Generalize some variables names
Change-Id: I81f9fa2c2c0d91c78050db0004114d22779550cf
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 08:03:05 +00:00
Nikolai Kosjar
a60cd0ba30 ClangTools: Remove "in file included from" trace for header diagnostics
...as this does not add much value but rather noise.

Change-Id: I0bb8807c3f4df4114ea135bea74cde3fd21ab090
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 08:02:55 +00:00
Ivan Donchevskii
7d64c9e3ec Clang: Fix some issues with running indexer over Qt Creator
- fix qDebug channels on Windows
 - fix the number of perameters in the sql statement
 - fix nullptr access
 - speed up preprocessor a little bit

Change-Id: Ic9b32fbcc6b409c4064c4f522b94391cbff8654e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-07 07:45:24 +00:00
Eike Ziller
f369556dca Merge remote-tracking branch 'origin/master' into 4.9
Change-Id: I0768e59f13f2fae0bdf13047431de9fac870bf74
2019-02-07 07:43:26 +01:00
Eike Ziller
f973b4e94a Help: Move finding the best documentation link to HelpItem
Change-Id: I5032d380295d942cd4f334e4bf47e349dd5b0aea
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-02-07 06:21:05 +00:00
Eike Ziller
14f66e0eb5 Fix highlighting of regexp search results in editor
The highlighting in the editor was still done with QRegExp,
so if you used Perl regular expression features, highlighting in
the editor was incorrect.

Fixes: QTCREATORBUG-21940
Change-Id: I785f0b2413a291d9f06de5877b18067a30d58588
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-07 06:19:10 +00:00
Christian Kandeler
a0254ea7ee Kit settings page: Fix inconsistent labels
The widget expected the KitInformation display names to have a colon at
the end, which not all of them did. Instead, add the colon in the
widget, because it's not really part of the name.

Change-Id: I87d613031b462903bf4039eb7f8bdb99c15e37d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-06 14:14:34 +00:00
Alessandro Portale
672bee2ed1 Don't detach temporaries
[-Wclazy-detaching-temporary]

Change-Id: I278873fff8592249f0c4519a4e4a6faff2dff6e3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-02-06 12:28:10 +00:00
Ivan Donchevskii
4599d1ad4d Clang: Improve indexing performance on Windows
Do not use delayed template parsing (it's too slow).

Change-Id: I473c92394321920239fd90e6a37f0ce517f94e6a
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-06 12:04:19 +00:00
Nikolai Kosjar
e70a7fa6f1 .gitignore: Ignore .qmake.{cache,stash} for full tree
...and not just the top level.

Change-Id: I7ff7be5d8a9336e75faa82f52e66f949f33ea0f0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-02-06 11:32:26 +00:00
Christian Stenger
113260c8d0 AutoTest: Count blacklisted tests correctly
Amends 0af0f58a60.

Change-Id: I646b98fda5d1292a46a85e11a09506875e8a1606
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-02-06 08:43:40 +00:00
David Schulz
9e8ae42343 Core: consistent InfoBar member prefix
Change-Id: Ie0cfda51b3936d7745c7876181e6d4b5242860ff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-06 05:43:36 +00:00
Thomas Hartmann
2c583d6c98 QmlDesigner: Catch exception
Change-Id: I22db80a0d6e7a1c95f6e77f584a177aaa78253bf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-02-05 17:06:06 +00:00
Thomas Hartmann
d4726589f1 QmlDesigner: Fix error for Connections
Connections is actually in QtQml.

Change-Id: I88d33e273efa542535ef7f87a4020c23f172b15e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-02-05 17:05:57 +00:00
Nikolai Kosjar
f6c46ce35d Clang: Add tooltip action to remove specific warnings/checks
...from the diagnostic configuration.

If no custom diagnostic configuration is set in Projects Mode > Clang,
one is created and set for the current project. Otherwise the current
custom diagnostic set in the project settings is modified.

Change-Id: I5c48280c90f0e807e7333122d504dda302a8b0a9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-05 15:22:20 +00:00
Nikolai Kosjar
b9d3055e72 Clang: Allow to forward warnings flags from build system
Change-Id: I47ebb1ce4f3b5544408eb1d0f891ed5090394282
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-05 11:36:55 +00:00
Christian Kandeler
69565d6c88 QmakePM: Respect editor settings when adding files to project
If the user wants to indent with tabs, then consider that when adding
source files via the UI. But try not to mix: If the respective variable
already uses a different indentation consistently, then keep using that
one.

Fixes: QTCREATORBUG-8016
Change-Id: I037c9ac4d4e7fbbe5753a846e57d938bbb440d6a
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-05 11:31:52 +00:00
Christian Kandeler
6ab9078e87 Project tree: Do not pretend to support moving files via Drag & Drop
We claimed to support the move action, so on Windows the user could drag
files away to e.g. the Desktop or the Explorer. This resulted in
inconsistent state, because we do not (cannot?) handle an "external
drop" in any of our build system managers.
Instead, we now support only the copy action, which leaves our project
sources untouched. This is also more likely to be what the user wants.

Fixes: QTCREATORBUG-14494
Change-Id: Ie327780768f1ac68d6dbe95c3daa4aa4dc3f0f41
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-02-05 11:30:12 +00:00
Nikolai Kosjar
719749103a Clang: Remove some pointless "this" capture
Change-Id: I8ac56d0ec34128aa33263f171483c36dae608d01
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-05 11:22:39 +00:00
Nikolai Kosjar
c5e43d86d1 Clang: Make diagnostic tooltips consistent
Fix that triggering a diagnostic tooltip from the diagnostic
location/range itself (underlined text) did not show the icon on the
left and the actions/toolbuttons on the right in the tooltip.

Instead of showing the tooltip content itself, request the tooltip for
the corresponding text mark to get the extra decoration and actions.

Change-Id: I5e94aca117a761f7a798d4f4b33db6e386e54d84
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-05 11:22:27 +00:00
Marco Bubke
0082a82fc6 ClangPchManager: Merge system pch tasks
The merging of the include search paths is quite heuristic but we could
provide an option to disable pch merging so users can decide themselves.
Maybe we could give user feedback why we cannot merge but this is quite
advanced.

Task-number: QTCREATORBUG-21381
Change-Id: Iac6af0c587b631d2151f63d6d97215ed6919819f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-05 11:07:14 +00:00