Commit Graph

62421 Commits

Author SHA1 Message Date
Christian Kandeler
3e5621428b ClangdClient: Handle C files
We somehow forgot to add the corresponding mime type to the language
filter.

Change-Id: Idefe2ed1dfe689340dabcf98363b3d160168000b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-17 06:13:15 +00:00
Christian Kandeler
692995ec88 ClangCodeModel: Tighten the check for qualified member function call
Just checking for the base cast is not enough.

Change-Id: I455533b7da31cf5c52d8c1b9dd93b3bb2fb58929
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-16 15:30:29 +00:00
Jarek Kobus
d4c36f43b0 Protect the access to module path for executable cache
The getPylsModulePath() may be called concurrently:
PyLSConfigureAssistant::openDocumentWithPython() ->
runAsync -> checkPythonLanguageServer() ->
getPylsModulePath(), so protect the access to the
static cache by mutex.

Amends: 54f2ebf91d

Change-Id: Ia88a9e680b092bcc7cf62338387775521d497835
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-16 11:41:58 +00:00
Eike Ziller
905f5d4e1b Merge remote-tracking branch 'origin/4.15'
Conflicts:
	coin/instructions/common_environment.yaml

Change-Id: I2084c24f7e052b9647b30f810207b3c8beecce3c
2021-06-16 11:48:08 +02:00
hjk
e3c03fd3c5 Utils: Implement FilePath::writeFileContents()
Including a docker version of it.

Change-Id: Ib2ac6073cc2b39818fb77a7d9d608386f9d17285
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-16 09:00:37 +00:00
hjk
cf8a05fbec CMake: Use FilePath in FileApi{Reader,Parser}
Helps docker.

Change-Id: I2e1eba61be983340260211bbee6c1bab8a59f883
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-16 07:21:08 +00:00
Thomas Hartmann
2b91593ea8 QmlDesigner: Show StackLayout
The minor version requirement creates issues with the 6.0 import.

Task-number: QDS-4569
Change-Id: I6fc88a499fd9870963ff8ec4a05d3fe4156c2133
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-15 17:04:08 +00:00
Thomas Hartmann
1f8f1d620f StudioWelcome: Use custom scroll bars
The default style on Windows with Qt 6 does not fit.

Change-Id: I9e0a8ad411a28744a333b768c493248aa5a1c9db
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-15 16:17:49 +00:00
Thomas Hartmann
f62d3c7266 StudioWelcome: Remove effect from splash screen
Not supported with Qt 6.

Change-Id: Ie12c5b15caaa6b80dcb3dc26fdf43b360b6761a5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-15 16:17:39 +00:00
Thomas Hartmann
7445386581 StudioWelcome: Do not use TitilliumWeb on Windows
TitilliumWeb creates issues with Qt 6 on Windows.

Task-number: QDS-4539
Change-Id: I70782cc7399622e851b01ed997d1919b624fce3b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-06-15 16:16:38 +00:00
Christian Stenger
cb024acdaf AutoTest: Give at least minor hint about ctest failures
When running ctest we get by default only the output of ctest
without any "real" test output. Finding the respective issue
especially in bigger test applications is impossible without
re-running the test manually.
So, turn on output on failure for running ctest as long there
is no settings page for ctest.

Change-Id: I9a6468d0d43173bfcb2b140c96301449840d9517
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-15 15:41:13 +00:00
Eike Ziller
fa6490efbc CMake: Avoid iterating project tree for each build target
Reduces lock-up in main thread after loading projects

Task-number: QTCREATORBUG-25783
Change-Id: Ie769074f1689698379bd6fd60f74957086cfce37
Reviewed-by: hjk <hjk@qt.io>
2021-06-15 13:51:04 +00:00
David Schulz
439bb9c4ae LanguageClient: manually track document version
Using the document revision causes issues for some servers.

Task-number: QTCREATORBUG-25766
Change-Id: Ic858e19c6fe39e57c9d3124913887aafee0a3cd0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-15 13:01:05 +00:00
Miikka Heikkinen
200723cf13 QmlDesigner: Fix pasting 3D nodes
Pasting multiple 3D nodes are now pasted in correct scope instead of
always pasting under scene root.

Fixes: QDS-4534
Change-Id: I233bf360e2bd335c952b1e727a9ee775d2cdd23a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-15 12:35:16 +00:00
David Schulz
9289ec491b LSP: fix DocumentFilter glob matcher
The following pattern were not interpreted by
QRegularExpression::wildcardToRegularExpression.
* - `**` to match any number of path segments, including none
* - `{}` to group sub patterns into an OR expression.

Task-number: QTCREATORBUG-25766
Change-Id: If7cafef4bf625690fc7dff8ac6461351fef79505
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-15 11:27:23 +00:00
Eike Ziller
baa83725f6 Remove ClangRefactoring and ClangPchManager
This removes the plugins and tools, and removes all the tests that would
fail to build because of that.

Fixes: QTCREATORBUG-25659
Change-Id: I8adb5d503fc8eea313bcaada421f309dbbfa8c26
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-06-15 10:07:57 +00:00
Tasuku Suzuki
9e5ba5d679 Git: fix archive file name
When a filename such as a.tar.gz is given and the filter tar.gz is
selected, Qt Creator generated a.tar.gz.tar.gz because string from the
filter doesn't start with a "." and QFileInfo::completeSuffix() starts with
a ".".

Change-Id: I58fedf79a88b25cd595e17adb8d5660e066658f0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-06-15 00:52:11 +00:00
Christian Kandeler
c218d8a543 ClangCodeModel: Prevent locator helpers from appearing in settings
Change-Id: Ic64beba528dad8db1a63ee0a370e5be0a8234ed5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-14 15:04:27 +00:00
hjk
fe7d6f0def Utils: Drop QProcess specific parameters from QtcProcess::finished()
Mid-term plan is to concentrate on use of QtcProcess::result()
instead which is a bit more system-agnostic.

There's quite a bit of potential for downstream cleanup by
re-using QtcProcess::exitMessage() now.

Change-Id: I3806b3f5933d96e64b7cfb18cc6c52823fddcbcd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-14 13:31:05 +00:00
Christian Kandeler
9426ce99a1 ClangCodeModel: Fix providing virtual override list
... when the cursor is right before the opening parenthesis of a member
function call. The clang AST is different then.

Change-Id: Ibb75c15d2e28c2004b5ab2dd8fd3db0a2da88e56
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-14 13:30:27 +00:00
Marco Bubke
3112d063e8 QmlDesigner: Update alias property declarations
Alias property declaration removal is now done before the normal
property declarations are synchronized.

Task-number: QDS-4525
Change-Id: Icddf5e041b672e4abfab89540906bbfdcc1a10ba
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-14 12:08:38 +00:00
Marco Bubke
b32f607bc7 Sqlite: Add condition to index
Change-Id: I83851b2f9cd516f21bc7e8987c1b60efaa019bb1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-14 12:08:31 +00:00
Marco Bubke
66ba9c4843 QmlDesigner: Synchronize alias properties
Alias property declarations are handled like normal property declarations
except that the have an value for the target property declaration id.
So they are distinguishable by the alias id. If it is not set it is a
normal property declaration. If it is set it is alias property
declaration. Alias property declaration are always synchronized after
all normal property declaration are synchronized. This synchronization
is not checking if the target property declaration changed. This update
has to be executed by the target property declaration.

Task-number: QDS-4524
Change-Id: I483840c821e12c93f1be67bf5ed6da396f8b45a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-06-14 12:08:24 +00:00
Marco Bubke
90cc7fed3b QmlDesigner: Handle implicit and explicit type names
Types are now handled by their import. Impicitly by an import list or
explicit for exported type.

Task-number: QDS-4496
Change-Id: I63f40df32760389e25b73597b4363f95ee304592
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-14 12:02:44 +00:00
Miikka Heikkinen
a5789e2e47 QmlDesigner: Support QtQuick 6.2
Change-Id: I03210ea82b5574e489efd8d33b7f385ec3b478a1
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-06-14 11:33:10 +00:00
Miikka Heikkinen
76c07425b7 QmlDesigner: Fix a rare crash
Lack of model existence check causes crash in some situations where
there are other problems in the document.

Change-Id: I239fc55de50e4795a97c60add3c820c6f2c6f73c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-06-14 11:32:51 +00:00
hjk
c0197f6d30 Utils: Drop QtcProcess::readyRead signal
Not used anymore.

Change-Id: Icac9ba149f85dfed414df18bfb73e1f46eb9fb1f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-14 11:20:21 +00:00
hjk
31dd9c87f8 Utils: Make FileUtils::copyIfDifferent work also with remote paths
Also really check contents if file dates are equal.

Change-Id: I39fca67b3616e931f1ed11d002fccaa232a0d74d
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-14 11:20:15 +00:00
hjk
a5b16f8137 Utils: Support remote FilePath::{lastModified,{remove,copy}File}
And implement the Docker variant.

Change-Id: Iee7cd0aaaf3d5c7dbb4ff995ac6889f31cb2f505
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-14 11:19:31 +00:00
Ahmad Samir
8ef025f732 ManhattanStyle: ensure text isn't cut-off in some UI elements
navigationWidgetHeight() is used in various places to calculate the
height of UI widgets that display text, e.g. the line-edits in the
search bar, hardconding a value results in the text being cut-off if
bigger fonts are used; fix the issue by using the higher value of
navigationWidgetHeight() and fontMetrics().height(), this ensures
widgets will accommodate the text.

Fixes: QTCREATORBUG-24535
Change-Id: I83ca7885840a75e05e913f7ecc77a60e61f8ef9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-14 11:09:22 +00:00
David Schulz
d2c1fa6b2d Core: Use FilePath to track document entries
Change-Id: Iba11a412067215109a1be4579620ebf80c8c2da1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-14 10:53:58 +00:00
hjk
e35235ea72 CMake: Collect also remote filenames from generateBuildTargets()
QDir::cleanPath(...) doesn't do the right thing on stringified
Utils::FilePaths. Use FilePath functions instead.

Change-Id: Ied66f38dd30a15694bce12ed57d37411bb87f680
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-14 08:43:45 +00:00
David Schulz
0e6a4e757c Utils: filepathify pathchooser
Change-Id: Ib8e8493a5f7883bead353f015ef476ba0bfc3e0e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-14 07:59:38 +00:00
Christian Kandeler
4899e133c9 ClangCodeModel: Keep base declaration on top
... when presenting the list of virtual overrides, as we do in the
built-in code model.

Change-Id: I2598438f78cd9d9a7ddc1620391cea51d7e2da42
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-14 07:48:48 +00:00
Eike Ziller
a93d549be1 Locator: Interpret file paths verbatim with "Open and Create"
When typing "f /tmp/test.txt:20" in locator, it would show "Open and
Create /tmp/test.txt:20", but then ask if "/tmp/test.txt" shall be
created.
Make the "Open and Create" take the text verbatim, so it creates "/tmp/
test.txt:20". Specifying a line/column for an empty file doesn't make
sense, and otherwise files with this file name cannot be created.

Change-Id: Ibdd37bfb51518b3077037e7017a759ec0fe116fa
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-14 06:55:26 +00:00
Eike Ziller
cb5d120724 Fix opening files created with file system filter
Using the "Create and Open" functionality of the file system locator
filter was no longer opening the file.

Amends 5ce704b394

Change-Id: Icb5bdad714d27e2cf74e47048d362e43e4247574
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-14 06:54:55 +00:00
hjk
c9ffce8e50 Docker: Make device creation dialog a bit more verbose
Some more visible logging since toolchain detection takes long.

Change-Id: I565a5b0051f485ddf18c2cb034283287d6185190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-14 06:51:08 +00:00
hjk
0b7e71ddca ClangTools: Don't double-buffer in ClangToolRunner
Not needed, and the only user of QtcProcess::readyRead.

Change-Id: I6ba071507f545076cf74660c20916407c3f3a551
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-14 05:46:16 +00:00
David Schulz
95a7dc4857 Core: Use FilePaths for recent documents
Change-Id: I453e7dd2c5d8d357b651392fa7d7f0baf07173f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-14 04:38:36 +00:00
Eike Ziller
b29ee5493b Avoid registering individual files for watching
if we can do it en bloc. This reduces the freeze happening after loading
a project, at least on macOS with QFSEventsFileSystemWatcher, which
doesn't like getting 1000 files added one by one.

Task-number: QTCREATORBUG-25783
Change-Id: I2d508ac3334520cb8805a2179d42b86c9ba840d6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-11 14:48:00 +00:00
Christian Kandeler
7275402ce9 ClangCodeModel: Fix links for virtual overrides
For some reason, clangd returns the declaration instead of the definition
position in the "Goto Implementation" result, so we have to do another
look-up for each override.

Change-Id: I2a99eb0dacdea07d5882087445dc2b2d61b24e58
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-11 13:57:01 +00:00
The Qt Project
ed426f041d Merge "Merge remote-tracking branch 'origin/4.15'" 2021-06-11 13:50:50 +00:00
Thomas Hartmann
6e295e032f QmlDesigner: Fix MyButton in welcomepage
Task-number: QDS-4532
Change-Id: I463aabe8e95edd7dd72c4f9ef65cf7e5fc985c67
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-11 12:56:57 +00:00
David Schulz
c3abdd56b7 Editor: merge SnippetOverlay::mangle, ::clear and ::hide
... into SnippetOverlay::accept. We currently have no need for just
applying the mangling without closing the overlay.

Change-Id: I98b2f023253f3676d1aed21438251998be1e509c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-11 12:35:03 +00:00
Eike Ziller
2f7f645983 Merge remote-tracking branch 'origin/4.15'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ibd07b5b5ff7c3282134b062ed28b1c4951061c97
2021-06-11 14:20:21 +02:00
hjk
c8241c12d0 Debugger: Add an option to enable newer gdb's symbol index cache
GDB 8.3+ can automatically save indices of DWARF symbols on disk
to speed up further loading of the same binaries.

Make this option available to the user and switch it on by default.

No harm is done for gdb builds without this feature.

Task-number: QTCREATORBUG-23207
Change-Id: Id0d467eee429a94f1d8e826a883179796732d31e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-11 11:35:01 +00:00
hjk
71db2d9c4f Docker: Warn if file access through merged dir is impossible
Even when the fallbacks via 'docker exec' work this will cause a
significant performance hit. Better inform the user.

Change-Id: If369dcc498bffa2ef422dab3e69325c4122b45ad
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-11 10:37:04 +00:00
Christian Stenger
9542ccd14e CMakePM: Raise timeout for ctest run
Depending on the size of projects and the underlying toolchain we
may end up with no tests as the timeout for the ctest run was just
too small.

Fixes: QTCREATORBUG-25851
Change-Id: I5617987a9e43b16c02a2c0b4afd598a3ff909299
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-11 09:52:53 +00:00
hjk
ef730d5ffb Utils: Introduce a FilePath::cleanPath
Change-Id: I8ce1aaf3e6b118f28414e7a52a1b310dd81e75e3
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-11 08:38:37 +00:00
Christian Stenger
caf515929b CMakePM: Widen ctest detection
If tests are not set up using add_test() but are supported
by ctest due to a different registering mechanism we failed
to get these right.
Expect also tests configured differently and just omit the
respective file information.

Fixes: QTCREATORBUG-25847
Change-Id: I16fcbec1a3a262f7d77ffdf15e4114e5a15e3757
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-11 08:29:08 +00:00