Commit Graph

62421 Commits

Author SHA1 Message Date
Jarek Kobus
a78b38653a MergeTool: De-pointer process
Get rid of unused m_merging field.

Change-Id: I0e6d80f6422881ad37982a6946fa3916b4574094
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-06-22 06:30:15 +00:00
Jarek Kobus
94adc1a566 MergeTool: Don't call blocking waitForStarted()
Connect to done() signal instead of finished().
In case the process failed to start it will delete
itself from inside done handler.

Change-Id: I277779904d571759bf3877860d64e80ad304c2da
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-06-22 06:30:04 +00:00
Jarek Kobus
35c3d9430b QueryContext: Connect to done() signal instead of finished()
Change-Id: I642138a90c4e13fcdb4dbb065e26aa5e3d509b9e
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 15:49:09 +00:00
Jarek Kobus
e3f27b3d53 GdbEngine: Don't call blocking waitForStarted()
Connect to started() signal instead and continue
setup in its handler. Handle failed to start case
inside done() signal handler.

Change-Id: Iaf184ed3e934b1bd5f8128a6aa9c72e9f27e0f56
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 14:49:06 +00:00
Thomas Hartmann
53642c9a22 QmlDesigner: There can be also document messages from the puppet
We have to check if the rewriterView()->errors() are actually empty.

Change-Id: Icbcc82aa9229078fd51c975e48de3e1f06c29f4d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-06-21 14:27:23 +00:00
Marco Bubke
3dca62ac1e QmlDesigner: Fix crash for dangling target
It can be that the target is a dangling pointer.

Task-number: QDS-7134
Change-Id: I51b7c9109b0f9193c31ee645144e2a24d1244ba9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-21 13:52:10 +00:00
Marco Bubke
20bc8b8243 QmlDesigner: Install busy handler for every database access
Even for pragma changes the statement can be getting busy. To prevent any
exceptions in that case we set the busy handler directly after opening
the database.

Change-Id: Id10aab20d812d5224f8031fa895c396762858fdf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-21 13:52:00 +00:00
Marcus Tillmanns
627f6a2916 cppeditor: Show hints for qmlRegister... diagnostics
This fixes passing the hints from FindExportedCppTypes to
the actual cppeditor so they can be displayed to the
user.

Fixes: QTCREATORBUG-27243
Change-Id: Ibcb68296f044a9c6a96f40945d8a0e964be7f042
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-21 13:33:19 +00:00
Christian Kandeler
bbbae099a7 ClangCodeModel: Move decl/def switch functionality to dedicated class
Change-Id: Id583ac58933e35e979083311907331b627d3c067
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-21 13:28:55 +00:00
Christian Kandeler
1a3f915586 ClangCodeModel: Fix following virtual functions
Amends 79b8e5397d.

Change-Id: I8c4e3c7cb8cb26d51cdf77c15891110c6b213d46
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-21 13:28:41 +00:00
David Schulz
dacb4ec82d TaskList: merge into project explorer plugin
Change-Id: I6097f3ea40a6a7c3ced0f59b15789046184e2e90
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 13:28:05 +00:00
Christian Kandeler
ea868c8b46 ClangCodeModel: Check system for clangd suitability on first run
Turn off clangd by default if we think the system does not have enough
memory. Inform the user and let them override our decision.

Task-number: QTCREATORBUG-19297
Change-Id: Ib9715c2f089c10d7a2a559a25180e9a943c118b1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-21 13:23:37 +00:00
Thomas Hartmann
281c534894 QmlDesigner: Make inErrorState() private
This method should be only for internal use, since it is
different from errors.isEmpty(), because the rewriter is only inErrorState
if parsing/rewriting fails, not if there is a semantic error.

Change-Id: Ib021e5e80750a4edcb4661755e85e6880fd6617c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-06-21 13:02:06 +00:00
Marcus Tillmanns
05a7f93f96 ProjectExplorer: Fix crash in TaskHub::addTask
Change-Id: Ic51d6b30e96161e5e99f61d4de1ab674246c426c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-21 11:41:44 +00:00
Jarek Kobus
283673a5d9 AbstractSettings: Introduce VersionUpdater
Uniform version number parsing inside AbstractSettings.
Get rid of updateVersion() virtual method and add
protected setVersionRegExp() instead.

If the user calls version() we wait for version process
to finish if it was running. This makes sure that we
don't return old / invalid version number while version
process is still running.

Change-Id: Ie27816534dd52c086acde721f3b49e669a7c30bc
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 11:40:25 +00:00
Jarek Kobus
7a14ee1393 PluginDumper: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: Iaf5fb4ec46919e37b0ab12ec4cbff904ae192de7
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 10:49:46 +00:00
Tim Jenssen
c4e94c2c9c Merge remote-tracking branch 'origin/qmlprojectstorage'
Conflicts:
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlproject.h

Change-Id: I0c0d59c8e3b8455b6ac575d34fdf49f39388db7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-06-21 10:47:34 +00:00
Fawzi Mohamed
a235aa29a1 qmljs: avoid linking to files in the build directory
cmake creates a consistent uri structure in the build directory.
We use that as import path, but when we find a type in them we should
refer back to the original file, as editing those is dangerous because
any edit are lost with the next build.
To find the original file we use the qrc, as the qrc path is mostly
the same of as the uri path.
It is possible to add prefixes which would make an exact match fail,
so we compare the paths from the right to the left and find the
longest match.

To acheive this:
 * QrcParser keeps a reversedResources, so the match from right can be
   done efficiently, and provides a longestReverseMatches method
 * the model manager keeps a list of all common prefixes of the
   application paths (build directories), and identify all files in
   build directories
 * the method fileToSource identifies the files in the build directory
   and tries to find the corresponding source file, warning if he
   cannot find it
 * fileToSource is used for follow Symbol and find usages

We could use fileToSource much more aggressively, to use to in editor
content for the files in the build directory, increasing the
consistency, but that is a more dangerous change for later.

Fixes: QTCREATORBUG-27173
Change-Id: Iea61b9825e5f6e433a7390cf2de9564b792458a5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-06-21 10:39:52 +00:00
Cristian Adam
8c2120d155 ProjectExplorer: MSVC arm64 native toolchain support
Visual Studio 2022 v17.3 is in preview state and adds support
for arm64, arm64_x86 and arm64_amd64 toolchains.

Change-Id: Iff2cb13c9ebef77d40804c7dd8b3df6488e6ce41
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-21 10:10:28 +00:00
Cristian Adam
e50aa5bb41 Arm64: Separate Arm64 from Arm on Windows
The separation is the first step of proper supporting the
native Visual C++ Arm64 that is now in preview in Visual Studio v17.3

Change-Id: I8cfa4b5b248158db68cb4af081dd59cabcd28c95
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-21 10:10:22 +00:00
Eike Ziller
17129dc931 CMake build: Re-add qtcreatorcrashhandler
On Linux for Debug configurations, like it was for the qmake build.

Change-Id: I9ffc8687010ba7900203520c1609f7112c5434be
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-21 08:47:06 +00:00
Marco Bubke
6aa826436c QmlDesigner: Disable Qml*Parser if there is no QmlDom
We simple provide an empty implementation. The project storage is anyway
not used by default. So it is expected that the programmer is providing
a qml dom if he wants to use the project storage.

Change-Id: Ib652e7589b4f773a4474974f6762490c5d515999
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-21 08:44:30 +00:00
Jarek Kobus
64d52bb8c3 CppcheckRunner: Connect to done() signal instead of finished()
Simplify internals a bit.

Change-Id: I4871b73f605af4d56e4993b6d71bbb22b4fce27d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 08:16:58 +00:00
Jarek Kobus
be5a77a767 TarPackageInstaller: Connect to done() signal instead of finished()
This should also handle a failed to start case.

Change-Id: I1f85873834c316263d132e357e23654a4bb7777f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 08:14:28 +00:00
Jarek Kobus
a613caa234 PipInstallTask: Connect to done() signal instead of finished()
Change-Id: I7a712791a440668c7efb8282d7f035a120c7d719
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-21 08:14:16 +00:00
Jarek Kobus
fc16aad2b4 QdbDeviceInferiorRunner: Connect to done() signal
Instead of connecting to finished().

Change-Id: I714c980f558cda3b330e03bb83b30dc7328699a5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 08:13:14 +00:00
Christian Stenger
a4c0014b88 Utils: Fix qbs build on macOS using Qt6
Change-Id: I5e8df475fbf1520831cd3ae04f2baa7b81f78fe4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-21 08:06:18 +00:00
Jarek Kobus
d7b1e87fac ChangeSelectionDialog: Connect to done() signal instead of finished()
Don't call blocking waitForStarted() and handle failed to start
case inside done() handler.

Change-Id: I6f88703c4ddc2c26af27b449eaa5be9ef087b1a2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-06-20 16:08:42 +00:00
hjk
01398fb1d4 BareMetal: Use upcoming-standard process exit message
Change-Id: Id90b01eaa3afcf768ae07821c435b1db1680d3cb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-20 15:54:22 +00:00
Jarek Kobus
7ef6a455cd Valgrind: Simplify internals
Change-Id: Ice10c1bf96f3102c6525d37ee7ec25b10604ebb9
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 14:09:48 +00:00
Jarek Kobus
3151ae4845 NimSuggestServer: Connect to done() signal instead of finished()
Get rid of crashed() signal, since the handler of this signal was
doing the same as the handler for finished() signal.

Change-Id: I7cb2d53bbf0bdcea58c2101efe97a82505333740
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 14:06:34 +00:00
hjk
d1b7e90b7d Use Utils::setClipboardAndSelection() more often
Change-Id: I094f07cdb1e5e8c8026bb36d0a486719567641b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 13:41:12 +00:00
hjk
f7e9623369 Utils: Remove one spurious static function from QtcProcess
The next one could probably be merged into FilePath::searchInPath

Change-Id: If32fe77fb19b628a44d212bb8420443bd4f04899
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-20 13:35:12 +00:00
Jarek Kobus
3156c33d12 CallgrindToolRunner: Connect to done() signal instead of finished()
This should also handle a failed to start case.

Change-Id: I120a342cb9ec0ec980eae00d357905ca08bac5ed
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 13:25:55 +00:00
David Schulz
591fc12ffa Python: remove static cast of client interface in client constructor
Change-Id: I475a2b79438b8392085f1d9bf2cdb8b7369efa68
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 13:11:31 +00:00
David Schulz
e74999cced Python: check for pyside tools after installation
Change-Id: Icf9ae0ec08a78efc51216daa3304e76f8e812d5f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 13:11:07 +00:00
David Schulz
ca47064020 Python: Fix scripts path to global/venv pyside installations
... when checking for pyside tools.

Change-Id: I1aaac9dd9da76f08ada031cc88761dba36c4e3b6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 13:10:56 +00:00
Jarek Kobus
3b0add4b16 DeviceShell: Merge done() and errorOccurred() signals into one
Don't connect to QtcProcess::errorOccurred() signal, as it's going
to be removed soon. Rely on done() signal instead.

Change-Id: I28260f8eb77911a23de80512881cf7220f1bc1fc
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 13:07:32 +00:00
hjk
44bb330128 ProjectExplorer: Split RunWorker::appendMessage overloads
... into separate functions. Makes the use of the parameter clearer
and is easier to connect too.

Change-Id: I061b0b5c847ae1e695afc75332e634ddf2576d6c
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:59:38 +00:00
Jarek Kobus
425a0c8835 AutoTest: Connect to done() signal instead of finished()
QtcProcess::done() is also emitted when process failed to start.

Change-Id: I08f6f104014d1c90c0f761de352dada620207d86
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 12:51:42 +00:00
hjk
5f53b983ff Valgrind: Simplify pid search in remote setup
We have first-hand information nowadays from the process itself.

Change-Id: I99cc61b9c8534740b0eb59a8fabed7e648eb2146
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-20 12:47:46 +00:00
hjk
ff6f3dc65d Valgrind: Consolidate message production and consumption
Change-Id: I779f97a658b55f3c79111df1946b8d72863ce513
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-20 12:47:29 +00:00
David Schulz
178d555151 LanguageClient: prevent assert in semantic highlighter
Do not send messages to server that are not reachable, but queue the
highlighting requests until the client is fully initialized.

Change-Id: I7da140ec33fb1974d3eaed03110ed85dc3a87594
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-20 12:43:46 +00:00
Christian Kandeler
c3f55f6b50 ClangCodeModel: Fix "switch decl/def" for free functions
Fixes: QTCREATORBUG-27731
Change-Id: Ibab872b9d4ecedba097c91ca44d279a1bb8208b6
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:36:28 +00:00
Jarek Kobus
9db4587db5 CdbEngine: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: Id5e92fbccd361c7bce7718704f33e221649ab47b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:33:51 +00:00
Christian Kandeler
0fa349237d ClangCodeModel: Special rendering for deprecated completion items
We add the attribute textually and show a warning icon.

Fixes: QTCREATORBUG-2325
Change-Id: Icc0305a703e26c84095167087b30fa3456f97614
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:12:05 +00:00
Christian Kandeler
79b8e5397d ClangCodeModel: Prevent surprisingly late "follow symbol" reactions
It can happen under certain circumstances (high system load, overworked
clangd, ...) that "follow symbol" requests get replied to very late,
with the user having manually navigated to the target document in the
mean time or started doing something else entirely. In such a situation,
it would be disruptive if we were to jump to a symbol suddenly, stealing
the cursor from the unsuspecting user.
We now prevent this by aborting the "follow symbol" procedure if the
user does something else with the document.

Fixes: QTCREATORBUG-20878
Change-Id: Iea52db661e8ba634951b18654a94e4b90580f001
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:11:29 +00:00
hjk
0ae2e48ff1 FakeVim: Fix crash with debug build of Qt 6
915be6606ead2 in Qt base introduced an assert that triggers
occasionally.

This here moves the original check to the fakevim side, without
changing (possibly wrong) functionality.

Change-Id: I435ea53ecc0ba1a905dee2f4e3f8feb3c6dc7db3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 12:06:13 +00:00
hjk
c3dcc1ee38 Debugger: Use new clipboard setting convenience
Change-Id: I4bbbff708287a0999c8009b6c2bd91967ee63808
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 12:05:36 +00:00
hjk
2f54c9a364 Use new convenience function for clipboard contents
Change-Id: I4a856fa53e66d42bc5f08ee79c40ad071d2841bf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 12:05:28 +00:00