Commit Graph

62421 Commits

Author SHA1 Message Date
BogDan Vatra
fd0291df92 Make TextDocument::cleanWhitespace super fast
On documents with a lot of lines of code (e.g. ~30k) saving the
documents takes ages (+6 seconds).
With this change the time is reduced to less than 150ms.

Change-Id: I8a40253a91ae40a6681d5acf1f09711c9b63bd6f
Reviewed-by: hjk <hjk@qt.io>
2021-10-29 12:17:53 +00:00
Eike Ziller
a8bc9774f9 Qt 6 build: Fix Restart button for Link to Qt
Qt 6 ignores the call to close() for the main window, if the options
dialog is still open, so explicitly close it if the user chooses
"Restart Now" from the "Link to Qt" button in the Qt options.

Fixes: QTCREATORBUG-26279
Task-number: QTCREATORBUG-24098
Change-Id: Iaa1c4774dde5e20a7f40b03e0b8768fc9c22dd6c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-29 12:08:42 +00:00
hjk
84f6b8891b Core: ExternalTool: Use FilePath also for executables
Change-Id: I6ec914b68ae41f9ee5eb28416c29d0431c5ab880
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-29 11:54:29 +00:00
Knud Dollereder
6d32550459 Improve 2d view navigation
- Get rid of lag when two-finger-swiping
- Enable one finger swipe and scroll gestures for the magic mouse
- Fixed a bug where the toolbar zoom slider from the transition.-
and timeline editor where not updated when zooming with a gesture.
- When scrolling the curve editor, its toolbar was scrolling together
with the rest of the view. This is now fixed in order to be
consistent with the timeline view and transition editor.

Change-Id: I611015af134976588fbcada0bc5ccfdcf8039c27
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-29 11:35:40 +00:00
David Schulz
d5467917d0 Editor: Collect keyboard selections to the clipboard
Fixes: QTCREATORBUG-26492
Change-Id: I36c3ae73d8d5b2ea92cee3fd7c568b958c3235ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-29 10:57:53 +00:00
hjk
17a545115b QmlJS: Proliferate FilePath use, part 3
Change-Id: I3c293a9974414b669a1af8b98afb76a4eb4fbd11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-29 08:55:29 +00:00
hjk
45a716bd0c Debugger: Use FilePath in DebuggerEngine::gotoLocation()
Change-Id: Ic3a278de7f70af677547f00bc6de4d7bd15502bd
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-29 08:40:34 +00:00
Christian Kandeler
c3a1193969 TextEditor: Add highlighting category for namespaces
... and make use of it in the built-in code model and with clangd.

Task-number: QTCREATORBUG-16580
Change-Id: I8c331f56aa1bbf91c9f768be82a779a72f40c4c7
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-29 08:36:20 +00:00
Miikka Heikkinen
dc9dc6b002 QmlDesigner: Adjust ComponentTextModifier offsets on doc text change
ComponentTextModifier offsets were set at modifier creation time, and
were not adjusted for changes on the document before the subcomponent
code. Added rudimentary change detection logic for code additions and
removals before subcomponent code and adjust offsets accordingly.

Fixes: QDS-5305
Change-Id: I816adc1fc867b7135b992fb50a5d96e2cfd3f0d2
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-29 07:39:15 +00:00
Thomas Hartmann
4ad8890b88 QmlDesigner: Use AuxiliaryData as cache for NodeHints
Evaluating the NodeHints can become a bottle-neck in large scenes.
The columnCount depends on the filter and is called many times
during painting.

For large scenes with many nodes this becomes a real bottle-neck
turning QDS unusable.

Task-number: QDS-5277
Change-Id: Ifbd9ec8024e30541bfaafba4c44db47f5c426bfc
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-10-28 19:00:23 +00:00
hjk
761ce1feb1 QmlJS: Proliferate FilePath use, part 2
Change-Id: I631df6ba5e782e2db9e03de4e5df843d15c19f37
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-28 14:08:13 +00:00
David Schulz
b59c374217 Utils: sort the cursor before copying or inserting text
The user shouldn't care about the order of the individual cursors inside
the MultiTextCursor, so the order of selected texts should always be the
same as in the document.

Fixes: QTCREATORBUG-26494
Change-Id: I0d5199bda4e48f8482e20018b8f05020e16da3f6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-10-28 13:26:27 +00:00
David Schulz
a442d275fc Editor: hide old proposal if new proposal is empty
amends 28447355ba

Change-Id: Ica1b95e205be4328e675714dbf81f813a76ec9a3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-28 12:18:02 +00:00
Christian Kandeler
1311244832 ClangCodeModel: Do not always consult clangd for the symbol name
... when doing "find usages".
The symbol info request follows typedefs, which will result in confusing
search window contents. So do the symbol info request only if the cursor
is not on a normal identifier.

Change-Id: I0d3bd8bfd47879c59e6656a4da73344406c97a21
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-28 11:27:12 +00:00
Mahmoud Badri
5d3bc6a0c3 QmlDesigner: Execute assets adding in 1 transaction
When dropping external assets, create the items in 1 transaction so
that 1 undo press undos all assets creation.

Change-Id: I45b38542f41964a18fd6095eea9bf61b9dca4392
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-28 11:23:37 +00:00
Miikka Heikkinen
1f7ada8066 QmlDesigner: Remove default properties removed from model also from QML
If default property has actual value, binding, or inline node set,
it should be removed also from the QML doc when removed from the model.

Fixes: QDS-5239
Change-Id: Iffc27685321f96af46148ab877566c2026cc47d5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-28 11:23:13 +00:00
hjk
d70bc79809 Qnx: Merge qnxbaseqtconfigwidget.{cpp,h} into qnxqtversion
Not worth a file pair of its own.

Change-Id: I5a7e64d142e38a075f726ca6d6a8cb2e4a39e57b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-28 11:20:43 +00:00
David Schulz
399a5cb713 Debugger: make inappropriate debugger warning silenceable
Task-number: QTCREATORBUG-14539
Change-Id: Idb119736816c933509fac5748beb547696a991c0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-28 11:02:47 +00:00
Christian Kandeler
a437539096 CppEditor: Fix doxygen comment magic before templates
Fixes: QTCREATORBUG-9620
Change-Id: I65a434d72adbe72d449783a917444c2ee216fc5e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-28 10:05:43 +00:00
Christian Kandeler
d8d4739bc4 TextEditor: Allow special highlighting for static members
Task-number: QTCREATORBUG-9659
Change-Id: Idae529fd876ba5f555c76e4d282efc9263263d6c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-28 10:04:57 +00:00
Eike Ziller
1a00bb50d4 Android: Fix lupdate issues
Change-Id: I08bdc81eabb082a091f27d2dea44369573946c49
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-10-28 09:41:08 +00:00
David Schulz
204a2daac0 Debugger: show info when installed qt misses debug symbols
Pointing the user to the relevant package that has to be installed in
order to get the full dumper functionality.

Task-number: QTCREATORBUG-26456
Change-Id: I0e80f06e1cadcaa9ad2f8a734ca4dda026fc95db
Reviewed-by: hjk <hjk@qt.io>
2021-10-28 08:38:32 +00:00
Eike Ziller
e6130c9446 Merge remote-tracking branch 'origin/6.0'
Change-Id: Ie46e0028f0dca9f3ddc45ed8794ba6cddd97df26
2021-10-28 10:31:51 +02:00
hjk
fdfc558946 ProjectExplorer: Use FilePath for CustomExecutableRC::executable
... and clean up #includes.

Change-Id: Ia9c4c1d366b633e1cd017eabd07244891ab7ca57
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-28 07:56:33 +00:00
hjk
c6bc5583d6 Utils: Don't expose FilePath::mapToGlobalPath anymore
The indirection is triggered via scheme and host. And if it already is in
that form we do not need to add these information.

Change-Id: I13c2bd0864a956c5cdaa5e2e6b324bb7f67c93e3
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-28 07:53:37 +00:00
Miikka Heikkinen
982f23be38 QmlDesigner: Allow invalid property value for QVariant type properties
Invalid QVariant is a valid value for properties of type QVariant, so
propagate the value change from puppet to creator in that case.

Also change the property editor to notify controls of value change in
case of invalid value set, and clear LineEdit when invalid value is
set.

Fixes: QDS-5304
Change-Id: I02c7daaf3cde06317690a32e7ac8a82da754bd58
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-28 07:50:20 +00:00
Miikka Heikkinen
41f96fe05b QmlDesigner: Reset puppet on repeater model change when necessary
This is a workaround for Qt bugs QTBUG-97583 and QTBUG-97586.

Fixes: QDS-5235
Change-Id: I37de4829fea63b0c488815975ae2dd58ceb36b71
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2021-10-28 07:50:14 +00:00
Eike Ziller
53714b2b1d UpdateInfo: Use new MaintenanceTool semantics
It's been available since a while, and is the preferred way to use it
nowadays.

Task-number: QTIFW-2349
Change-Id: Ic55f209ab7068d1d093cf92cb21e33794c0b04f1
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
2021-10-28 07:31:06 +00:00
hjk
5d190fcfaa Utils: Make FilePath::mapToDevicePath() private
User code is supposed to use .onDevice(...).

Change-Id: Ia14198bbd472db05f5177f06f832dfc468415ba1
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-28 05:23:57 +00:00
Jarek Kobus
2ac65f863b Refactor the lifetime of future watcher inside QmakeProFile
Create future watcher only prior to starting an async task.
After the task is done, clean the watcher in order to release
the resources kept inside its QFuture's result.

Make setupFutureWatcher() a private member. Provide
a corresponding cleanupFutureWatcher().

Change-Id: I9d2b058250a3f749a2c9ad51323d2d38f66ee98d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-27 14:42:42 +00:00
hjk
13807ff021 CMake: Drop use of FilePath::mapToDevicePath()
That's implicit in .onDevice() since c82e3cf6a8, doing it twice
is not good.

Change-Id: I8c1d5d31d155d3a7c4af8bd874fbba5ab3e8cf72
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-10-27 14:24:32 +00:00
hjk
6ae36127bf ProjectExplorer: Search netstat in PATH on Windows
As well as all other commands called via DesktopDeviceProcess.

Fixes: QTCREATORBUG-26485
Change-Id: Icfd3ab69de771bf58d5e9202fe1879e4063d5204
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-27 13:52:15 +00:00
Christian Kandeler
0814af1503 CPlusPlus: Fix build
Amends 05e698a478.

Change-Id: Ie33c233b89cad40f7e6a29a26582990ba9029f44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-27 13:28:25 +00:00
Christian Stenger
44c8116597 Qmake: Fix stripping of std c++ flags
Change-Id: Ie2f0dbd63e7ecd53b7d034ab2930e5d05f0e01ea
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-27 12:35:06 +00:00
hjk
b153aa5459 RemoteLinux: Use more FilePath in AbstractPackagingStep
Change-Id: I66533efd39f58f9bcc4a57334d427aa225bc73d8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-27 11:57:13 +00:00
Christian Kandeler
05e698a478 CppEditor: Fix "insert def from decl" for template return types
Fixes: QTCREATORBUG-26397
Change-Id: Ia215f2c2b5da708b0fd7c894987683b305f4ccec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-27 11:23:36 +00:00
Christian Kandeler
a1f088376a ClangCodeModel: Mark output arguments also for lambdas
... with clangd.
This required rewriting getAstPath(), because the previous
implementation did not do the necessary backtracking and could therefore
miss the AST branch containing the node fully matching the input range.

Task-number: QTCREATORBUG-22381
Change-Id: Id5caf2a401b920c0e76f742bec97b5ca6977b4df
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-27 11:22:52 +00:00
David Schulz
27ff70fd88 Editor: remove moved file from syntax-highlighting.pro
Change-Id: I30b5bb884274dc2526291826ce5cc823cc5e921d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-27 10:20:42 +00:00
Christian Kandeler
2ecbbb126d ClangCodeModel: Do not let clangd insert header files on completion
... by default.
This feature often doesn't do what you'd want it to, so we make it opt-
in.

Change-Id: I631eae9c154ddcb0e8feeac44c5d5c0265706a67
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-27 10:17:39 +00:00
Eike Ziller
b5fd63b431 Merge remote-tracking branch 'origin/6.0'
Change-Id: I9b824b8bb7b0b5d76e9e8f28f909b542adf773f0
2021-10-27 12:05:08 +02:00
Eike Ziller
6bf8e5dfce Revert "Update Qbs submodule to the top of 1.21 branch"
This reverts commit 9edecd1c94.

Reason for revert: Broke the build on Windows: LINK : fatal error LNK1104: cannot open file 'lib\qtcreator\qbsvariant.lib'

Change-Id: I393a8eb90ed21344d6ff6d9e87a5b421b5cb9491
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-27 09:49:11 +00:00
Christian Kandeler
49a8b021d9 CppEditor: Make pure virtual functions opt-in
... in the "Create implementations for all member functions" quickfix.

Fixes: QTCREATORBUG-26468
Change-Id: I0965290c38cc66cffaf5dd3871eb96b6ff24b4d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-27 09:19:22 +00:00
Christian Kandeler
78d6c0a15e ClangCodeModel: Adapt test to upstream fix in clangd
See https://reviews.llvm.org/D111224.

Change-Id: Id880468976e9036aa0c6212905101050ff43e34b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-27 09:18:58 +00:00
Christian Kandeler
560d16a096 CppEditor: Follow symbols in generated UI headers to .ui file
Fixes: QTCREATORBUG-2374
Change-Id: I784fe39c11c834525cdd37ca719efa65efcb307c
Reviewed-by: hjk <hjk@qt.io>
2021-10-27 09:17:49 +00:00
Eike Ziller
dc5717bd06 Move File System view to Core plugin
So it can be accessed from a wider range of places.

Change-Id: I282883addecf7bb070a65d9f4f7b8e6e2e4b5e47
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-27 09:02:23 +00:00
hjk
d68bb4687c QmlJS: Proliferate FilePath and QtcProcess use in QmlJSPluginDumper
Change-Id: Ie483bb2e9b5d812d380470949564a6bc57801fa9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-27 07:57:13 +00:00
David Schulz
d6c3a7297d Editor: fix clipboard collecting via mouse selections
Fixes: QTCREATORBUG-26471
Change-Id: I08264204c5ea5753b326417e5ba3a451cc6ef8f6
Reviewed-by: hjk <hjk@qt.io>
2021-10-27 07:56:45 +00:00
Jarek Kobus
0556eec9b7 Use a new enum indicating various start failures
Before the m_startFailure flag was used to detect the case
when the process failed to start because of wrong filename.
As this flag was set on any possible error we have always
detected the wrong filename case. Replace this flag with a
new enum describing various start failures.

Don't report again the crashed message. Check if we have already
reported the stop and we don't report it again. The
processExited() handler is being called twice: directly from
localGuiProcessError() and through the delayed localProcessDone().

Fixes: QTCREATORBUG-26467
Change-Id: I3cc6aa0c0b702256cefd77ba95793cd31e82ae10
Reviewed-by: hjk <hjk@qt.io>
2021-10-27 07:53:53 +00:00
hjk
de2423f514 Docker: Remove DockerRunConfiguration
This was a helper in the initial work on docker support which has
been commented out for a while already.

Using "docker runconfig" would technically work, however, this is
conceptionally the same as the old "matrix problem": We'd need
docker-specific almost-duplicates for every existing non-docker
runconfig. This does not scale.

Change-Id: Idf96abb6487903fdb89e7168a5ed78b9dc9dcecf
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-27 07:24:35 +00:00
Jarek Kobus
4b6b9f4dec Don't instantiate QTimer and QEventLoop for every QtcProcess
These two objects are only used when QtcProcess::runBlocking()
with m_processUserEvents option set is called, otherwise
they are unused. Create them only when they are needed.

This also solves the issue that these two QObjects were not
moved together with QtcProcess when it was moved to another
thread.

Change-Id: I7de6a92a51fc249184fc5811dac7a7bbf05d351f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-10-27 06:43:01 +00:00