Commit Graph

70777 Commits

Author SHA1 Message Date
David Schulz
23a58a320e clangd: introduce ClangdCompletionItem
allowing to overwrite apply and get rid of the apply helper in the
LanguageClient completion provider and processor.

Change-Id: I066fe10b116d638bd1b7a81d4488840bec5f0b63
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-29 04:41:06 +00:00
Ivan Komissarov
99817d3870 Update Qbs submodule to the top of 1.20 branch
Change-Id: I39d2bd127b0dc75d24614fd1a30b50be71a8d4ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 16:03:11 +00:00
Alessandro Portale
191bab9ecd Welcome: Add a dedicated session settings icon
The re-used toolbar settings icon from Utils appears a bit small in
comparison to the other icons on the welcome screen.

This change adds a dedicated, properly sized "Settings" icon which fits
better.

Change-Id: I8af239a93806eaa6f355d504be282691b2463f3a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-28 14:48:04 +00:00
Eike Ziller
3fc5540583 Change log for 6.0
Change-Id: I6a3f711ce94e3ea203a6231064744619bcb6ff24
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-09-28 14:23:42 +00:00
Alessandro Portale
0369dc9977 Apply ManhattanStyle to QCheckBox on a toolbar
And consolidate the palette setting code for QLabel, QSpinBox and
QCheckBox.

Change-Id: If0dea048e2341bcbb35c52eb394d4d01efef88be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-28 13:52:57 +00:00
hjk
afe60b1669 Utils: Re-do FilePath::toUserOutput()
Use the FilePath's knowledge of the target os instead of always using
the host os.

Change-Id: I996db68486f4616c8636ae501cce7a778269f1cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 13:38:48 +00:00
Christian Stenger
430c48ac1a Tests: Fixup test expectations
Amends b64863806f.

Change-Id: I8df23cc10d71760cacb03eb59b728400a4ef3c61
Reviewed-by: hjk <hjk@qt.io>
2021-09-28 13:18:09 +00:00
Christian Kandeler
e7eeb5ae34 ClangCodeModel: Use namespace TextEditor in clangdclient.cpp
Less noise.

Change-Id: Ia7ec9c6cbe93868826828379ded2d039f6fa3a44
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-28 13:12:04 +00:00
hjk
c252fa9367 RemoteLinux: Use FilePath in GLDCWKDP::privateKeyFilePath
a.k.a. GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::privateKeyFilePath.

Change-Id: Ic17c7b88d3540a5f7c1c983effc3f59f25102528
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 12:41:59 +00:00
hjk
42b151e05b Debugger: Proliferate FilePath in CdbSymbolPathListEditor
Take the opportunity to limit scopes.

Change-Id: I709302186b5876058fc9199dec6dd75a9db602a9
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-28 12:41:48 +00:00
Christian Kandeler
901a96231c ClangCodeModel: Cache clangd's AST
Since we use the AST in several contexts, it can easily happen that we
need to consult it more than once for the same document revision.
Therefore, it makes sense to cache the AST to prevent redundant requests
for potentially large amounts of data.

Change-Id: I33100e0052ee21bb46e91848d3d2e8a0a96bb860
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-28 11:34:25 +00:00
Tim Jenssen
3ed8d60756 QmlDesigner: Integrate QmlDom
Task-number: QDS-5172
Change-Id: Ib17c38ef7b89b05daababaad1f8e2dc39d53a2bf
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-09-28 11:32:34 +00:00
Alessandro Portale
05e89384e2 Wizards: Turn icons into themed icons
Turn the current un-themed icons into icon masks which now get recolored
according to the current theme.

Change-Id: I435f9a43dae04797ad0b948992f77179d93164a8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-28 11:31:16 +00:00
Jarek Kobus
7958de05f5 Introduce Utils::Singleton
Introduce Utils::Singleton class and
Utils::SingletonWithOptionalDependencies class template
that helps implementing singletons that depend on other
singletons. It's guaranteed that whenever singleton B depends
on singleton A, than A is always created before B is being
created, and that the order of destruction is always
opposite to the order of creation.

Dependencies of singleton are listed as template arguments
for SingletonWithOptionalDependencies class template.
The first argument of SingletonWithOptionalDependencies
class template is always a singleton class itself.

Prepare a common interface for all singleton subclasses:
SingletonSubClass *SingletonWithOptionalDependencies::instance();

Make instantiating singletons and its dependencies thread-safe.

Create singletons on demand (only if some code needs them).
It's not needed anymore to explicitly instantiate
all required singletons in tests.

Make it possible (and thread-safe) to instantiate ProcessReaper
and LauncherInterface singletons in non-main threads.

Make the following dependencies between existing singletons:
   SshConnectionManager depends on:
-> LauncherInterface depends on:
-> ProcessReaper

Change-Id: Iefaacab561c2b3dcf07e7fafbb87339ea6a15278
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 10:25:29 +00:00
Christian Kandeler
03f6de1eeb ClangCodeModel: Properly mark "#ifdefed-out" blocks with clangd
The behavior is now the same as when using libclang. Namely:
    - The whole block is grayed out, rather than just symbols
      having a gray background.
    - Ifdefed-out blocks no longer mess with the brace depth.

Change-Id: I8b5f3a788430edcd9dd79249323c26a5ee5d68ed
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-28 10:23:03 +00:00
Alessandro Portale
e97a8471b5 ProjectExplorer: Make Json Wizard icons themable
Wizard json files can now define via
  "iconKind" : "Themed"
that the provided icon is a themable mask rather than a plain image.

Change-Id: I668b7fe368b6989f3609143b22270cb8cec21b12
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-28 10:20:06 +00:00
Alessandro Portale
ebc6e1fc62 Android: Use Android tools environment for avdmanager call
Otherwise AVD creation fails (on Windows).

Change-Id: Iff11c2cd96c214b40b714b6b1248adede54da343
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-09-28 10:14:59 +00:00
hjk
aa4b825809 Ssh: Use FilePath for SshConnectionParameters::privateKeyFile
Change-Id: Ifaf97cc744f80e1fa0f4000aabf83671b2ffd972
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 09:57:41 +00:00
David Schulz
e7f6abc084 LanguageClient: remove codeassist proposal handler
Removes noise from the interface. Using specialized clangd processors
that redirect the proposals for testing purposes is an overall cleaner
solution.

Change-Id: Ia4f3d4720765f0533c5530a2a5c7db3cc971e0be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 09:50:46 +00:00
David Schulz
bd39697ca4 LanguageClient: export LanguageClientCompletionItem
Change-Id: Idc1a222d18e2fc64bd33c9bc89e60178c83ee856
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 09:50:32 +00:00
hjk
155d9368b5 Utils: Use more FilePath in ProjectIntroPage
Change-Id: I0cdc18f4b88012f00d6403125c7bd3ba0b6d80df
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-28 09:33:44 +00:00
hjk
465ee3e8b5 RemoteLinux: Use more FilePath in SshKeyCreationDialog
Change-Id: Iee415ef9396ba4ea3a91e64130bc23225858a3f8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 09:27:22 +00:00
hjk
aed8738d87 Utils: Use more FilePath in PathChooserDelegate
Also, clean up namespaces a bit.

Change-Id: I3eaced19ae3836db6b34720939260b97045a1dfa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-28 09:18:06 +00:00
Christian Kandeler
be6ea67bfd ClangCodeModel: Replace TODO items with links to upstream bug reports
Change-Id: Iff1ccf77aca74bc34e2944996e7ef2eb2fcb3bad
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-28 08:22:49 +00:00
hjk
98fad961a6 ProjectExplorer: Use FilePath in JsonWizard
Also remove m_currentPath and logic around it, as it was unused.

Change-Id: Id32ae2845e3788a3e24bb238005b31e8f174f6b9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-28 07:49:36 +00:00
hjk
a73338e188 Debugger: Remove unused shared/backtrace.{h,cpp}
Part of that was used in QTC_ASSERT now.

Change-Id: I2d5fafa0dacad6bc099a00c080189b3fd3964098
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-28 07:21:19 +00:00
hjk
2d8f6d6292 ProjectExplorer: Some code cosmetics in JsonWizardFactory
Mostly statics and foreach.

Change-Id: I5c2b6478b7d71cb33e6ca91fa8dba101383f8f5e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-28 07:20:29 +00:00
Alessandro Portale
f88c885d44 McuSupport: FilePath::fromString -> fromUserInput changes
Prevent non-portable dir delimiters from getting into a FilePath.

Change-Id: I78e4a98e03ffe95e3cef70c9c499af28fa33c25c
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-09-28 07:12:13 +00:00
Cristian Adam
ef545260cd Add Show in File System View to project tree context menu
That opens the selected file/path in the file system view.
Behaves the same as the navigation view shortcut + syncing with the
selected file.

It would be nice to have that at other places too, but this requires
moving the file system view to Core plugin first.

Change-Id: Icc6d1041156d97f5d2bda43a3501758f06fe80aa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-28 06:55:44 +00:00
hjk
8cdbb31aaf QtSupport: Use FilePath for Link with Qt feature
Change-Id: Ic153523494e9b253850e74136db5027d4db55c53
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2021-09-28 06:53:22 +00:00
hjk
8b7f9bacb2 TextEditor: Use FilePath in HighlighterSettings
Change-Id: I1002d3a0b16e403e1650475ec316adf797251a1f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-28 06:43:38 +00:00
hjk
81acd0c62a Utils: Remove uses of deprecated PathChooser::path()
There's filePath() nowadays.

Change-Id: Ief06bd07a69a287d6a5ca3c41eb7069dba869d52
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-28 06:39:02 +00:00
hjk
4b5aeb9a74 Debugger: Use FilePath for debugInfoLocation
Change-Id: Id538ab4ddd1d634d0dc73a00fe42d3fd35341bea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-28 06:38:52 +00:00
Tasuku Suzuki
9c97e03465 Apply ManhattanStyle to QSpinBox on a toolbar
Up/Down arrows are not property styled.

Change-Id: I4bc633ec18e31d167f93f80fc241a20d0a7e2958
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-28 06:30:49 +00:00
Alessandro Portale
a6702d5a2d ProjectExplorer: Fix widths distributions in project welcome page
The widths of the "Sessions" and "Projects" lists are not well
distributed on Full HD screen width. The sessions are squeezed and the
projects are extra wide.

Set a stretch factor also on the Settings widget, so that both stretch
proportionally. Use a 1 to 3 ratio.

This change also removes the setting of struts which does not appear to
have any effect and was (by mistake?) assigned to one sublayout, twice.

Fixes: QTCREATORBUG-26319
Change-Id: I365a6a6c5d9c2250e3f711cc139d3279f2f5e3b1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-27 20:09:12 +00:00
Assam Boudjelthia
e860871d2a Move AVD Manager from Android Settings to Device Settings
Move AVD management and creation to Qt Creator's DeviceManager
facilities. This allows AVDs to be created from the Devices settings
page and their details and control/action buttons for starting/stopping,
etc. are added there as well. This makes the process similar to other
device types that Qt Creator supports, to get a similar experience.

Task-number: QTCREATORBUG-23991
Change-Id: I16c52b3cc73035e0ee12fd54ae9dad4595c8cda5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-27 19:09:05 +00:00
Christian Kandeler
b35630c03d ClangCodeModel: Highlight "override" and "final" with clangd
Change-Id: If30de546ce360ab9bc3cfa2780f61d6a78e4191d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 15:03:50 +00:00
hjk
0aa3cc45b5 Core: Use FilePath for ExternalTool working directory
Change-Id: Ifd295c3bd07b79f146b84fc27c117f42ba9b793f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 14:21:40 +00:00
hjk
3f7f867da5 Android: JavaLanguageServer code cosmetics
Namepaces, unused function.

Change-Id: I4f51e163fdb5034c9856195b1929466f6f8b8ddf
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-09-27 14:12:07 +00:00
hjk
5c7b4d66c5 Android: Use FilePath in JavaLanguageServer
Change-Id: Ifaaf95c7463db634a08072e5c988bfc75237f8eb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-09-27 14:11:58 +00:00
hjk
cef21f46e8 AutoTools: Remove unused AutoToolsOpenProjectWizard
Change-Id: I76642cf71f7af4b827e7ad10a75f29e589f33388
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-27 13:07:47 +00:00
Marco Bubke
9e29b602d4 QmlDesigner: Use ModuleId for Type instead of Module
We already know the module id because it's the source id of the module.

Change-Id: Ice241d38c12c7ca79a525464c53b7d552095a0fc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:25 +00:00
Marco Bubke
03687c1d02 QmlDesigner: Add minimal updates
Exported type names are synchronized so that old type names are removed.

Task-number: QDS-5130
Task-number: QDS-5126
Change-Id: I6e6482170c8197f37f60a57bdfb7f1b450001b4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:21 +00:00
Marco Bubke
b2a300dd60 QmlDesigner: Refactor ProjectStorageUpdater tests
Change-Id: I0174153a470ce3009945df9cd2a822150f2f19f4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:18 +00:00
Orgad Shaneh
6564325081 Git: Add "Show HEAD" link in amend commit editor
Fixes: QTCREATORBUG-25004
Change-Id: Idac181c8821da41a21d86cb1760691d51158daee
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2021-09-27 12:32:41 +00:00
Cristian Adam
d341ab6371 CMakePM: Remove <Headers> virtual project node
CMake projects need to add the headers as source files in order to get
exported from the CMake file-api json export.

Having header files that are not part of the project displayed in the
<Headers> node is error prone and confusing.

This also means that you won't get bogus files when doing git commit
for example.

Fixes: QTCREATORBUG-18206
Fixes: QTCREATORBUG-24609
Fixes: QTCREATORBUG-25407
Change-Id: I89ac4f8a80f452119f8a991b9e4ef14efb7a86b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 12:25:53 +00:00
Eike Ziller
9b16a14ee4 Add change log for 5.0.2
Change-Id: I95ae1e171ff764baf4164a1afcae3cc272211b3e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-09-27 12:14:55 +00:00
hjk
95907b0f7d Utils: Allow full file paths with directory parts
... when creating a new empty file.

This simplifies file creation with file paths cut&paste from external
applications as it removes the need to split it into a directory part
and the file name.

Change-Id: I3f81db89d5ae7db4117c29a4f947cdf92dc4d50c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 11:16:20 +00:00
Eike Ziller
fdb5c7a8a3 Add "Files in All Project Directories" global search
Similar to the corresponding locator filter.

It searches in the project directories, not limited to the files that
are actually mentioned in the project itself. That is helpful if
projects don't mention resources, or README's, or header files, or
"alien" project files in case the project supports multiple build
systems.

In principle, for single projects, this can be achieved with the "Files
in File System" filter, but that is less convenient because one needs to
specify the directory.

Change-Id: I94bc664cadd0881274ae709b00b8576c696cc325
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-27 11:15:29 +00:00
hjk
95f7c5f256 Valgrind: Simplify suppression file interface
The global settings and per-project settings looked the same,
but behaved quite differently: The per-project one were a kind
of diff against the global one.

Besides having "issues" when keeping the temporary and permanent places
where relevant parts of the data were kept (settings, manual-applied
global, auto-applied local settings), the concept was not clear in the
UI at all.

This here takes the simple way out: Either local, or global, no diffs.

Change-Id: I90439cd20067ab60b88372f1cb03eeef8c2e42d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-27 11:05:30 +00:00