Commit Graph

62421 Commits

Author SHA1 Message Date
Jarek Kobus
7208ada5b3 Use QtcProcess in QbsSettings
Change-Id: I2d58e039ab84d1a3fe1a04b708209c893384cca0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-03 16:39:29 +00:00
Jarek Kobus
595cfdb3ac Use QtcProcess in QbsProfileManager
Change-Id: I75802dae680b1ef36662ebe6281076919430cebc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-03 16:39:22 +00:00
Ivan Komissarov
dbd5a4fe1b Update Qbs submodule to the top of 1.21 branch
Change-Id: I3620f8d950c24e664df0cef424e65ba195b3336d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-03 15:41:55 +00:00
Jarek Kobus
c8a25e0e57 Use QtcProcess in McuPackageExecutableVersionDetector
Change-Id: I22577835ff3de1cbd787bab7ecaae9cffb8f0c9b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christiaan Janssen <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-03 15:27:55 +00:00
Alessandro Portale
0de09fe3a3 Android: Enable manual adding of NDKs v22+
Don't enforce the presence of a "platforms" subdirectory if the NDK is
of version 22 or higher. The last NDK version with that directory is 21.

Change-Id: Ib431e7db4521533206304d252dcf93b7ea6169e5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-11-03 14:33:02 +00:00
Jarek Kobus
b6228eb182 Fix signal slot connection
QtcProcess isn't derived from QProcess anymore.

Change-Id: I6c92163cc0bb73dc8e350ffa05ecbb5a25a88f9a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-11-03 13:46:20 +00:00
Orgad Shaneh
f4701d2bd4 EditorManager: Remove outdated TODO
Change-Id: I8c4632985ba9ec9bc2a4efa3754d50035e6b29d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-03 13:29:30 +00:00
Jarek Kobus
e6969cfa05 MergeTool: use multiarg arg()
Change-Id: If3859509dae9f44ab54ad50491a42f09e5e3a94b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-11-03 13:26:53 +00:00
Eike Ziller
c2e27bd927 Merge remote-tracking branch 'origin/5.0' into 6.0
Change-Id: I436d15f2aeefbf6fc80340f01398509c213fc1b1
2021-11-03 14:26:47 +01:00
Jarek Kobus
50586c7bb8 Use QtcProcess in MergeTool
Change-Id: I9d08c455404a75a29874883dbdc4855a183a58e3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-11-03 13:26:42 +00:00
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
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
Artem Sokolovskii
4d4abc8578 ProjectExplorer: Fix build
Change-Id: I75b2b2860d3b8050bf84205d5d8fff8f0737db81
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-02 09:33:41 +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
Eike Ziller
195abefe7d EditorManager: Remove QString openEditor(At) overloads
In favor of the FilePath/Link ones.

Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-02 08:11: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>
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
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
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
4dac32d661 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Id5e67457e2c8c96cfcd29fb5469b6650ec7bcc94
2021-11-01 09:46:02 +01: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
Eike Ziller
ff2d00727c Add nullptr initialization
Amends dc5717bd06

Change-Id: Ic59db603d08054e98cbbab97151c6c1630aca71e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-11-01 08:27:40 +00: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
Eike Ziller
3e83122888 Themes: Do not force Fusion style, use macOS dark mode instead
We forced Fusion style on all platforms if the theme was a dark one, so
the dark appearance would be handled correctly even if the "native"
QStyle didn't.

On macOS, use the system's dark mode instead, which handles window
decoration correctly and uses native controls. Switching the QStyle also
messed up things like labels of standard buttons.

Remove the hardcoded "Fusion" style from all themes and set the
preferred style to Fusion automatically on Windows and Linux if the
theme states a DarkUserInterface and no PreferredStyles is set.

Fixes: QTCREATORBUG-22477
Change-Id: I91c9143a8703fcec7aa08201de9fc33d1799196d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-01 07:54:04 +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
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
d1b78efaf6 Add "Show in File System View" to more menus
And add a shortcut for editor manager for that, similar to "Show in
Finder/Explorer" and "Open Terminal Here".

Change-Id: Iddc287106e194c856501bf38e53b3c738a2aed1a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-29 12:57:47 +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