Commit Graph

71171 Commits

Author SHA1 Message Date
Christian Kandeler
7e614b599e CppEditor: Transform deprecated -gcc-toolchain option
See https://reviews.llvm.org/D108494.

Change-Id: I85b2a0ea077d2a622fac16bda009a7ee71da0e90
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-03 10:18:45 +00:00
Jarek Kobus
c13d828c99 Remove unneeded includes of QProcess
Change-Id: I017e020c8b2a53d6f4a2422a0a0856044e768247
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-11-03 08:13:18 +00:00
David Schulz
426fde79d6 LanguageClient: support semanticTokens/refresh
Fixes: QTCREATORBUG-26499
Change-Id: Icd5879609bb856797fa223394357a1f15554d2cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-03 07:46:50 +00:00
hjk
d3345320c7 QmlDesigner: Squash warning
src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp:497:51: warning: ‘QDir& QDir::operator=(const QString&)’ is deprecated: Use QDir::setPath() instead [-Wdeprecated-declarations]
  497 |         m_filePathDir = {newDir.absoluteFilePath()};
      |                                                   ^
In file included from /data/dev/qt-5/qtbase/include/QtCore/qdir.h:1,
                 from /data/dev/qt-5/qtbase/include/QtCore/QDir:1,
                 from src/plugins/qmldesigner/designercore/include/subcomponentmanager.h:39,
                 from src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp:26:
/data/dev/qt-5/qtbase/src/corelib/io/qdir.h:110:11: note: declared here
  110 |     QDir &operator=(const QString &path);
      |           ^~~~~~~~

Change-Id: I307e5243a3334257ea4285b23ef0e0453e1e17e8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-03 07:22:46 +00:00
Miikka Heikkinen
1d1b18ae1d QmlDesigner: Copy main document model metainfo to inFileComponentModel
This is necessary to have all component library items available when
editing in-document subcomponents.

Fixes: QDS-5352
Change-Id: Ib7553d8e36a5b9ece7afb3c01681148f6268e7f2
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
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-11-02 15:43:50 +00:00
Miikka Heikkinen
5ef4e2f5ac QmlDesigner: Add default template to Component item in library
The default template includes an "Item" child node under the component.
Also added "Component 3D" item that will have a "Node" child.

Task-number: QDS-5308
Change-Id: I254f18a2ec7b623d8cd4a72e6e727d0d17a1a91d
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-02 15:43:20 +00:00
Leena Miettinen
5f191126c1 Doc: Describe "Auto-save files after refactoring" option
Task-number: QTCREATORBUG-26278
Change-Id: I7c9a1ead665ab3506f7cb7a8eb13fb14c5863c8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-02 14:42:33 +00:00
Kai Köhne
75b6266694 Document third-party components by their upstream name
Also use a paragraph from the upstream documentation for
third-party code that missed it so far.

Change-Id: I2609d32eafca9810116f7a9ac2df9221541acb15
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-11-02 13:22:51 +00:00
David Schulz
b272d441cb Utils: disable multi cursor add keyboard shortcuts on macOS
They work inconsistently and interfere with system shortcuts

Change-Id: Ibd85483904144ca697bb372746c7999299b7b1f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-02 12:41:39 +00:00
Leena Miettinen
f48c7f4df6 Doc: Update Qt Widget based application tutorial
- Describe new wizard dialogs
- Update screenshots

Task-number: QTCREATORBUG-26278
Change-Id: I66407a2f799e05aa1d01e9c9d1ddd509ab07cadb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-11-02 11:54:50 +00:00
Leena Miettinen
d177dab95d Doc: Describe exporting and importing color schemes
...in Tools > Options > Text Editor > Fonts & Color.

Also describe the new formatting options for code elements.

Task-number: QTCREATORBUG-26278
Change-Id: I41540658ec13e7fdcbba9492840c99316fbe1251
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-02 11:51:18 +00:00
Leena Miettinen
8f98f61ed4 Doc: Update info on developing for Android devices
Task-number: QTCREATORBUG-26312
Change-Id: Ic95a7c6ea4b0ab092a1b1feb07bba3dd368a3584
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-11-02 10:41:58 +00:00
David Schulz
4ecb6a9dc0 Utils: Allow combining add multi cursor events with shift
The old block selection shortcuts were used with alt + shift + up/down,
but the new multi text cursor were just expecting alt + direction key
for adding new cursors. In order to not break with habbits also ignore
shift modifier when checking for alt + cursor move key events.

Fixes: QTCREATORBUG-26503
Change-Id: I064e666a04b88c3b90d10ea35688613159f7d4a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-02 08:31:14 +00:00
Christian Stenger
a8d5929be3 Utils: Do not update pathchooser value from displayed string
The displayed string may differ from its "real" resulting path
depending on having a base directory or not.

Fixes: QTCREATORBUG-26408
Change-Id: Ic569671899329249559a2bfb3ecd30190f166dba
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-02 08:09:15 +00:00
Jarek Kobus
6e8dcbcfd2 Fix a crash when modifying pro file
In some unlikely case it may happen that between finished() signal
is emitted by a watcher and when the queued handler is being called,
someone could have called CppProjectUpdater::cancel() and delete
the watcher immediately. In this case the handler could operate
on deleted watcher instance.

Add a QPointer in order to guard the watcher inside the queued
handler.

Amends: e3b639047f

Fixes: QTCREATORBUG-26507
Change-Id: Idb4a953e9017ce672adc64becb3061bd80c8c378
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
qds/v2.2.2
2021-11-01 15:19:15 +00:00
Christian Kandeler
f08d0e3d3e ClangCodeModel: Prevent restarting the same clangd client more than once
Change-Id: Ifd81a26506e48817b97c8ed1e5fa16ebb31d8c69
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-01 14:20:02 +00:00
Christian Kandeler
bcebf65bb1 ClangCodeModel: Make sure clangd sends all results
... for textDocument/references. The --limit-results option was recently
split up; we have to set --limit-references as well now.

Change-Id: I979aa21a11a08e829b6e843c0c135098aac7d3f5
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-01 14:19:46 +00:00
Christian Kandeler
4dfdbf91f6 CppEditor: Do not use clangd < 13
We will shortly need to use a command-line option that is new in clangd
13. Rather than starting to add checks for versions that won't work as
expected anyway, we simply refuse to use clangd < 13 now.

Change-Id: I42ec679e0f58449a2593cf92b4be7ed3101fa787
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-01 14:19:27 +00:00
David Schulz
a2cb1edb69 clangd: assert on starting client for project that already has a client
Change-Id: Ia50662063f7f7bdc26e5a842f7c25af4f4f4efdf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-01 12:56:48 +00:00
Robert Löhning
91f4559720 Squish: Don't wait for nothing in tst_simple_debug
Change-Id: I74bb40b03fa13568571f4009618c523bf9c13c63
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-01 12:39:32 +00:00
Eike Ziller
662135bc07 FileSearch: Add some logging for search progress
Change-Id: I453b04eb3701035138900d699d4e69d5fd9b99df
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-01 12:11:42 +00:00
Jarek Kobus
3562c5e96e Remove unneeded includes of QProcess from cpp files
QProcess wasn't used in these files.

Change-Id: I24900bcf312eb6ea1ca3bc0c753cebb505ec552b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-11-01 12:04:41 +00:00
Mahmoud Badri
fe20c60c69 QmlDesigner: Support dnd bridge files to the assets lib
Fixes: QDS-5278
Change-Id: I2e77ddcbdd6d97ca9d63ee2c8e4871302e8636b1
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-01 11:15:45 +00:00
Mahmoud Badri
7ca826e2f3 QmlDesigner: Close component library's context menus when layout change
Fixes: QDS-5351
Change-Id: I06e02b7c137d2398528e6d4120d9ffbc7632c7a7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-11-01 11:07:35 +00:00
David Schulz
33cfb7ebfc LanguageClient: add a human readable version of client state
Change-Id: I650e4b4932f32ad86505e9be2fc85eef6bcd6edd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-01 10:22:11 +00:00
Eike Ziller
a64912dad8 Keyboard settings: Update item in list when resetting
Explicitly update the item in the list when resetting a single shortcut.
This was implicitly happening if the action has a shortcut by default
(via the update of the shortcut input), but not if the action's default
shortcuts are empty.

Fixes: QTCREATORBUG-26502
Change-Id: Ic48accf6d2061e692ece9a1b756d004bac92f609
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-01 10:08:27 +00:00
Christian Kandeler
691acb8f87 Fix build after qbs submodule update
Change-Id: I195111ecb26dd0d313aeed5b8df3806a394d8d00
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-01 09:56:02 +00:00
Christian Kandeler
6e5ec9a939 ClangCodeModel: Prevent indexing with fallback client
There is no project to index.

Change-Id: I6d3ad2f894a45e2a7934cfb3c10c525299bfd34b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-01 09:38:31 +00:00
Christian Kandeler
4fe5be2565 ClangCodeModel: Try harder to find out whether a function is virtual
... when following symbols with clangd.
The textdocument/implementation request is expensive, so we'd like to
make sure we only run it if we are sure that we're really dealing with a
virtual function. We re-use the information gathered during highlighting
for this purpose.

Change-Id: Id92a9a92fe2ac7fd5acf903a9ade711223ee401b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-01 09:38:13 +00:00
Christian Kandeler
b403258c87 ClangCodeModel: Try to correct unexpected ClangdClient count
Ideally, it should not happen that there is more than one client per
project, but if it does, try to fix the situation by choosing the "best"
one and shutting down the others.

Change-Id: If00924925afabf6bc7efe7f33da693db323a00d8
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-01 09:37:39 +00:00
Eike Ziller
00eabac565 Merge remote-tracking branch 'origin/5.0' into 6.0
Change-Id: I35236948503b2a15a56766018d3ba1c4d2530c83
2021-11-01 09:29:51 +01:00
Miikka Heikkinen
7ea6492a17 QmlDesigner: Add imports to subcomponent manager whenever they change
Possible imports were never added to subcomponent manager after
initial design mode activation, and imports added manually via text
editor were also not added to subcomponent manager.

The old implementation also added duplicate imports to subcomponent
manager if imports were removed and readded to the document via
item library.

Fixes: QDS-5345
Change-Id: If45884f50b68282630af1d472af2816640b81c04
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-11-01 08:09:14 +00:00
David Schulz
3b62755061 LanguageClient: additional log output for the semantic highlighter
Change-Id: Idc4d71bd988b9a23a6718932b4102a00fb94488e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-01 07:16:25 +00:00
Jarek Kobus
91605c3613 Use QtcProcess inside fake vim handler
Change-Id: I14af193bbf9e7fda9e5b0ba0a1647e19069c40e2
Reviewed-by: hjk <hjk@qt.io>
2021-10-29 18:54:05 +00:00
Jarek Kobus
80798f4bf4 Use QtcProcess in PdbEngine
Change-Id: I997aa8bee3422992620dcf58679e77e5b280f3ef
Reviewed-by: hjk <hjk@qt.io>
2021-10-29 18:53:31 +00:00
Ivan Komissarov
403da35f9d Update Qbs submodule to the top of 1.21 branch
Change-Id: Id5fc2c8ad40a5252582a118b1792977c0f03b988
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-29 15:45:24 +00:00
Assam Boudjelthia
4e3658cfa4 Android: report am start errors in case process returns success
Somehow "am start" command can output to stderr even if the process
reports success, this can cause the activity launch to fail silently.

For example calling "am start -n package/activity --user 2" can fail
if the device has no user 2, however the process result will be success,
and the stderr will contain something like:
 Error type 3
 Error: Activity class {org.qtproject.example.scroll_example/
org.qtproject.qt.android.bindings.QtActivity} does not exist.

And the app won't start.

This concerns mostly extra am start args provided by the user, but not
sure if it might happen in other cases, so make sure to report the
stderr nonetheless.

Change-Id: I9317e118fcf4fe0c3ed83dcc53c1c00564c5148e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-10-29 15:08:24 +00:00
Eike Ziller
38af447ee0 Fix context help for e.g. CMake
CMake documentation links do not have Qt's version style. So, if our try
to find "the highest version" fails, we still need to provide the link
to open.

Amends 128c7dfbef

Fixes: QTCREATORBUG-26455
Change-Id: I3e7588cac5d4ef8ee912b3f5511e63da0b8a0f52
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-10-29 15:07:48 +00:00
Alessandro Portale
5cde121aaa Debugger: Enable detection of Android Studio's lldb frontend
Android Studio (at least on Windows) ships an LLDBFrontend(.exe) which
differs in file name and version output, so that the code in
DebuggerItem::reinitializeFromFile needs to be tweakd a bit.

Fixes: QTCREATORBUG-26504
Change-Id: Ic989a6110e03088148c28a7fe6248e5f836ea2ea
Reviewed-by: hjk <hjk@qt.io>
2021-10-29 14:15:36 +00:00
Robert Löhning
5ba3eb7fcf Squish: Update for running tst_generic_highlighter
Change-Id: I262fb7a7223e235708cbc7e8e382a2448a2f8c84
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-29 13:20:00 +00:00
Andre Hartmann
78a1beb06e Debugger: Improve handling of stdint types
* Make (u)intX_t known as integral type
* Handle uint8_t[] the same way as char[] and unsigned char[]

Task-number: QTCREATORBUG-26501
Change-Id: I1eac21be198f8107f088e56daf435b5bb3217120
Reviewed-by: hjk <hjk@qt.io>
2021-10-29 13:12:02 +00:00
Eike Ziller
03bcdc9186 Fix RPATH of Qbs binaries when built with Qt 6
The build system for Qt Creator ensures that we have the right
relative RPATH to Qt for the packages.
We still check if we need to fix the RPATHs when deploying Qt, and
the Qbs build relies on that.

That part was broken for Qt 6 since it looked for libQt5* to decide
if the relative RPATH to Qt must be added. Remove the Qt version
number from the check.

Change-Id: Ib9d0408943d61364bfe9c8813a55bf60145b7972
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
2021-10-29 12:54:26 +00:00
Christian Stenger
39d04fa886 Utils: Clean path when transforming into QFileInfo
Fixes icons for relative paths inside locator.

Fixes: QTCREATORBUG-26411
Change-Id: Ia34d3b4af791ef79be4f349bd416df1190678557
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-10-29 12:38:04 +00:00
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
Robert Löhning
73405cc089 Squish: Update for running tst_APTW01
Change-Id: I95ac2d2209dbc47e316b746313e4545a1b80ab55
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-29 11:23:37 +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