Commit Graph

47434 Commits

Author SHA1 Message Date
Cristian Adam
d3595110f1 CMakeProjectManager: Fix importing Qt6 projects
The code that detected the qmake path for the project stopped
working with Qt 6.0.

The new code will run a small CMake project that will output
the path of qmake from the CMake world, and not something that
Qt Creator does from outside.

Fixes: QTCREATORBUG-25100
Change-Id: I9071648c2e60eb89d0dc8f08aed793167b42a365
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-06 17:10:13 +00:00
Henning Gruendl
bebd70573e QmlDesigner: Add signal list dialog
* Add signal list dialog, delegate and view
* Add context menu entry on items which have a trigger signal
* Add specific model node operations
* Add qml Connections util class
* Add utility functions to signal handler property
* Fix property processing in node meta info
* Fix source code in connection editor and navigator

Task-number: QDS-3138
Change-Id: I362ceef230efdb14f2050995b1693937e5e73c41
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 16:09:34 +00:00
Knud Dollereder
7c1e210d2c Allow designeractions to target specific views
This is needed for the "connect signal to event dialog" which resides in
a different plugin but needs to be opened from the connection editor.

Change-Id: I9e200791831fa46d65e5f833e14a0d893fc29432
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 14:55:49 +00:00
Eike Ziller
9b4e2aa71d cmake build: Avoid other LLVM libraries interfering with ClangFormat plugin
Make the static LLVM in ClangFormat really internal to the ClangFormat
plugin on Linux by not exporting symbols from it.

This was missed during the conversion of the qmake project to CMake.

Fixes: QTCREATORBUG-24998
Change-Id: If483f3c45d5cf7f63e7b8dde58efab6371414bdd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-06 14:15:48 +00:00
hjk
5d5a4ffbf8 ProjectExplorer: Provide a ToolChain::isValid() base implementation
It checks for an executable compilerCommand(). This was used in Gcc,
Clang and Nim before. MSVC still overrides with a different test.

The formerly unconditional 'return true' for Keil/IAR/Sdcc uses that
check now, too.

Change-Id: I433a5ac6784277dc77129b2671c28af6913327a7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-06 13:45:41 +00:00
Christian Kandeler
1a09f816a3 ClangTools: Support clang-tidy check options
Fixes: QTCREATORBUG-24977
Change-Id: I33ea247ba98788245ae1264262f60d084b73778c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-01-06 12:39:41 +00:00
hjk
13c9b42a21 Debugger: Move initial GDB breakpoint settings after target setup
While GDB can handle breakpoints set before specifying an executable
fine, it stresses the machinery unnecessarily and fails in corner cases
("wrong" dynamic loader etc). We can avoid most of that by moving the
breakpoint setting to a later point in the process.

Change-Id: I0450a0e43a81c80bfdfefb7b67f6799042e0ec26
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-06 12:37:25 +00:00
hjk
8753889c63 Debugger: Use handleInferiorPrepared also for AttachToRemoteProcess
Same pattern as the other scenarios.

Change-Id: I065783b9ced3ad31a1918b48b44116071bb98d75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-06 11:09:48 +00:00
Christian Kandeler
f7d8f8b704 ClangFormat: Do not refuse to build against unpatched clang
The plugin builds just fine and should be mostly (fully?) functional with
upstream clang, so it seems excessive to force-disable it entirely for
everybody not using our custom patch.

Change-Id: Id6a179c20325290a8205218c9514a16c1adc9076
Reviewed-by: hjk <hjk@qt.io>
2021-01-06 11:00:02 +00:00
Eike Ziller
6263a58ef3 Devices: Do not pop up general messages pane
That should only happen on direct user interaction.
Also use new message manager API.

Task-number: QTCREATORBUG-24430
Change-Id: I87297b2ec7191b88210d3a2037afe27b8a3f40e9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-06 10:52:08 +00:00
Kama Wójcik
a04f5ce3ea Refactor label drawing
Change-Id: Id95721b13454f0062a144263b1c518402a556e5f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 10:23:12 +00:00
hjk
c7e57ced3a Debugger: Simplify gdb startup
The reason for the special callback setup is lost in history.
A possibility is that the extra roundtrip was needed for synchronization
with earlier gdb versions and/or start up sequences. It seems to
works fine without nowadays.

Change-Id: I28c95aec2f065e9c6f0730f1ffbc3db1a3d819da
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-06 10:22:28 +00:00
hjk
824c30438b Project: Change File System view activation shortcut
From Alt+Y to Alt+Y,Alt+F. "Toplevel shortcut namespace" is a rare
resource.

Fixes: QTCREATORBUG-25124
Change-Id: I6268760f45e34f973b3b38b19d2577c0c655b000
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-06 09:22:37 +00:00
hjk
a2d1ff94b4 Amend "ProjectExplorer: Introduce and use a new MultiSelectionAspect"
This partially reverts commit 34798b3efd,
which breaks binary compatibility.

Change-Id: I17d55760fac599bfba1f5a9726d81898e6979926
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-06 09:22:13 +00:00
Eike Ziller
45c2634166 Merge remote-tracking branch 'origin/4.14'
Change-Id: I62523c4733e617c46131048f5f62a2ca9be47d80
2021-01-06 08:42:15 +01:00
Christian Kandeler
7d0be4882c QmakeProjectManager: Fix qmake getting re-run unnecessarily
... when separate debug info was disabled.

Fixes: QTCREATORBUG-25134
Change-Id: Ia527de39b9409f68d1aa4babd64a30e18bb1f1ae
Reviewed-by: hjk <hjk@qt.io>
2021-01-06 07:34:24 +00:00
hjk
d671983d81 Debugger: Drop GdbEngine::listFeatures()
The output of -list-features is nowhere near complete or usable to
determine the need of workarounds or such. We have never really
relied on it and the code was unused for a while.

Change-Id: Ide02f4d35d6075f534b756245ebe43c55ee69390
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-06 07:12:28 +00:00
Christian Kandeler
a30aa4421a Qmake: Prevent unresponsive processes from hanging Qt Creator
That is, processes run via qmake's system() function.
Fun fact disovered while implementing this: "Canceling" the loading of a
qmake project did nothing at all except making the progress bar red at
the end of the parsing procedure. Now at least we terminate the
currently running processes invoked by system(), so the parsing threads
can continue and eventually finish.

Task-number: QTCREATORBUG-24825
Task-number: QTCREATORBUG-25000
Task-number: QTCREATORBUG-25194
Change-Id: Ic92ef200d3a49bbdeff0429ae7038fe3f1935b38
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-05 15:40:15 +00:00
Tim Jenssen
2a37a5ae16 fix warning
Change-Id: I36ef0823a7e0b786b1315df4e3d48fabb99c16f4
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-01-05 13:31:05 +00:00
Christian Kandeler
d203032504 ClangTools: Re-add clang's own include path
Amends ef05f29940.

Fixes: QTCREATORBUG-25126
Change-Id: I1340916f3f3488b0d1171f04ae1c9f30149c0c5c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-05 12:57:56 +00:00
Jarek Kobus
353edf35e5 Remove unneeded include
Change-Id: Ia2d5482a15be28c3c8a3d63ba5c73a081e6ae571
Reviewed-by: hjk <hjk@qt.io>
2021-01-05 11:40:19 +00:00
Miikka Heikkinen
6e0aa98746 QmlDesigner: Allow importing assets by dragging from file explorer
Supported assets can now be imported by dragging files from external
file explorer to Assets tab in item library.

Fixes: QDS-3447
Change-Id: Id7c5a808c99e0e6b021414d4ca0541620e8d9f47
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-05 09:22:08 +00:00
Miikka Heikkinen
d7890aa473 QmlDesigner: Add default icons for sound, font, and shader assets
Also create proper icon sizes for hdpi screens for all assets.

Change-Id: Ie082030c7fe4893f90c5a75162b509416b73e5d4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-05 09:21:04 +00:00
Miikka Heikkinen
1547929037 QmlDesigner: Implement new asset drags
Drag image to existing image/texture type - Update source property.
Drag image containing multiple frames - Create AnimatedImage.
Drag sound - Create new SoundEffect or update an existing one.
Drag shader - Create new Shader or update an existing one.
Drag font - Create new Text or update font on an existing one.

Fixes: QDS-3389
Change-Id: I62cf964bbba7772ecbf6f1c6fadb0f9e41a86206
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-05 09:20:15 +00:00
Miikka Heikkinen
178ba90376 QmlDesigner: Add import support for sounds and shaders
All imported asset types are now imported to type specific folders
under the project, similar to what was already done for fonts.

Also refactored import registration a bit to reduce code duplication.

Fixes: QDS-3326
Change-Id: I2b321590a6339eae9859e9daf154341175842929
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-05 09:19:22 +00:00
hjk
14c3f5ba51 Debugger: Drop the EngineSetupOk state
Directly proceed to EngineRunRequested.

Change-Id: I8419086f554bae298624cab3b33e852e92ea54bd
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-05 07:40:12 +00:00
hjk
b0d2c0d45d Debugger: Drop base DebuggerEngine::runEngine()
The lines between engine setup and running have always been
blurry, so it looks more and more unnatural to enforce this
in the architecture. Remove the runEngine() call from the
end of notifySetupEngineOk, and do it on the user side.

Change-Id: I3a5e158e8b3fe9b0a288d064f798e24b2ac47f86
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-05 06:21:27 +00:00
Lukasz Ornatek
f5a49e6b0b Implement adding images in the rich text format to the annotations
Task-number: QDS-3306
Change-Id: I8372c3d10ad5beb1ec52d8d3d45a3f963711a63c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-04 16:48:12 +00:00
Jarek Kobus
72f850df3a Open type hierarchy from Type Hierarchy editor
Make it possible to open type hierarchy for different
class selected from Type Hierarchy editor.
Make it available under context menu or on double click
on class name (single click opens the class in cpp editor window
as before). Double click doesn't expand / collapse items anymore
(expanding available when pressing the visual arrow).
Make navigation to editor more up to date - e.g. when linked location
changed in meantime (source file was edited), it tries to find
linked symbol quickly again (we introduce a small delay, up to
100-200 ms, depending on source file).

Change-Id: Ifb4fd58e853589a17cd14be465b3a7695fa48193
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-01-04 13:58:47 +00:00
hjk
c427a0d281 CMakeProjectManager: Code cosmetics
Change-Id: I102f0c6104a36b0637e7e713ab4b06b2b97984fc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-04 12:55:12 +00:00
Eike Ziller
9277c58e42 Do not pop up general messages pane
General messages pane should only be opened on direct user interaction.

Task-number: QTCREATORBUG-24430
Change-Id: Ib4c72b1bb07c27aabc74eb62c56061d5548b677d
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-04 12:49:11 +00:00
BogDan Vatra
7a6bfbcfbe Allow the user to add custom parameters to meson
Don't use QtCreator's autogenerated native-file if the user passed a
custom one or a cross-file.

Change-Id: Ic1793df2578b6f5295cad88f0dc003666e5f16c1
Reviewed-by: hjk <hjk@qt.io>
2021-01-04 12:47:26 +00:00
Eike Ziller
efa0f74645 TextEditor: Do not pop up general messages pane
General messages pane should only be opened on direct user interaction.

Task-number: QTCREATORBUG-24430
Change-Id: I62f6849ca5a32f0a75c5a91a667ee704d3632d1a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-04 12:45:37 +00:00
Bernhard Beschow
c01c69fc99 Nim: Fix some nimble paths
Change-Id: I78a66d17931316d9baec5f2857cae12a6a62ab2c
Reviewed-by: hjk <hjk@qt.io>
2021-01-04 12:08:58 +00:00
Bernhard Beschow
f607f125f1 Nim: Remove unused method
... and its associated attribute along the way since it is not needed any longer.

Change-Id: I25a8c5fd9ee45de10b3764805c4df0500a5fd6cf
Reviewed-by: hjk <hjk@qt.io>
2021-01-04 12:08:48 +00:00
hjk
34798b3efd ProjectExplorer: Introduce and use a new MultiSelectionAspect
Only provide the minimum functionality to make it usable
for the target selection in Make steps.

Task-number: QTCREATORBUG-25088
Change-Id: I6458a0bd544d2fff596df3240c69e05d7bdea14b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-04 12:00:46 +00:00
Alessandro Portale
faec8f09cb QmlDesigner: Remove unused "split editor" icon pngs
The handling of form editor and code editor are now done via the docking
system, the png are unused.

Amends: 1a8c802f56

Change-Id: Iecddc4f68f605abcaad1b9072a128a247f344349
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-04 11:50:31 +00:00
Andre Hartmann
498f0939e4 SyntaxHighlighter: Fix typo
Change-Id: I6fca22438d97afde235ecb22da1083c6103021fd
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-04 10:32:45 +00:00
hjk
bb31da3937 Debugger: Give some hint on what to change if QML breakpoints fail
Fixes: QTCREATORBUG-8200
Change-Id: I464a577f14f1e0e03355b2f176e4f6e67cc8459b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-04 10:03:09 +00:00
Eike Ziller
d95e1f940a Merge remote-tracking branch 'origin/4.14'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I5b8d93f2f08b62626c3f3447728c64d198b601ff
2021-01-04 09:09:21 +01:00
Eike Ziller
5c7793b07b LanguageClient: Do not pop up general messages pane
General messages pane should only be opened on direct user interaction.

Task-number: QTCREATORBUG-24430
Change-Id: I526659110fc67c627cb60fe56e1f709f064667c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-04 07:30:07 +00:00
Andre Hartmann
c12a3909bb JavaScriptFilter: Fix copying to clipboard
It seems that QStrings stored in a QVariant
can always be converted to EngineAction,
therefore this check can be removed.

The conversion then always resulted in the
value zero, which got equal to
EngineAction::Reset in commit 8d09191d2d.

While at it, forbid copying an empty string
to the clipboard, when the engine was aborted
due to a timeout.

Change-Id: Iaa4d9af52d4afd0e82f3b542d5f4e79bc8f6bdca
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-01-03 15:42:58 +00:00
Andre Hartmann
6ebfc77d35 Git: Add missing emit
Found by clazy.

Change-Id: I1b74f28e86a1bddf1ef4c77aa20eda1141ec8045
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-12-27 14:59:22 +00:00
Andre Hartmann
7883110e45 Git: Clarify rebase and merge actions in branch view
While merge should be clear, it's sometimes
hard to understand which branch is rebased
on top of the other.

Let's be explicit and state that in the
context menu.

Change-Id: I9755a9220a0a5930ce96893e2fad06221d449d9c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-12-27 14:59:08 +00:00
Andre Hartmann
8c92f40db8 VCS: Add commit message verification
Help writing good commit messages by verifying
that the complete message is not too short,
that the first line (subject) is not too long
and that the subject is separated from the rest
of the commit by an empty line.

Change-Id: I296c036433767f2508630f409c0e4b4c241391d1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-12-23 15:26:55 +00:00
Alessandro Portale
b4c1e48fdc ProjectExplorer: Don't enforce FlatModel::data's ForegroundRole
Only return a concrete color for the "pseudo disabled" state of the
node, otherwise return QVariant().

This permits the theming of the projecty tree via palette or stylesheet
(as the QmlDesigner does).

Task-number: QTCREATORBUG-24402
Change-Id: I510faf4d58a12947dd665eef6f5c9da8845fc2dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-23 12:44:20 +00:00
Cristian Adam
5271a5c782 Utils: Add Qt6 to QtVersion enum
Change-Id: Idb00fde1459d00caaf263a21eecb96e6f6bd6fd9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-23 11:12:56 +00:00
Alessandro Portale
5badf2dab5 WebAssembly: Mark plugin experimental
The plugin was meant to be experimental, but was forgotten to be marked
as such.

Fixes: QTCREATORBUG-25130
Change-Id: I9286329bb960c100e96879b9bf7c00133c06dc7f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-23 10:17:51 +00:00
Cristian Adam
88d357e79f CMakeProjectManager: Select the expected CMakeLists.txt for targets
When using locator with "cmo <target>" do not select the deepest
CMakeLists.txt in the stack.

Fixes: QTCREATORBUG-25166
Change-Id: I25437c3ddc57b7bf12213aefa51eb5f4fd853326
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-22 16:08:35 +00:00
Cristian Adam
15a7e08eda CMakeProjectManager: Add "install/strip" and "package" special targets
The Ninja / Makefile generator supports these targets as seen at:

https://cmake.org/cmake/help/latest/generator/Ninja.html
https://cmake.org/cmake/help/latest/generator/Unix%20Makefiles.html

Fixes: QTCREATORBUG-22620
Fixes: QTCREATORBUG-22047
Change-Id: Id0105ae59b7d699f0da637efed4efa337769b601
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-22 16:03:20 +00:00