Commit Graph

69993 Commits

Author SHA1 Message Date
hjk
bc2af18a41 CMake: Simplify CMakeProcess::finished signature
The parameters were never used, and start to look alien in the
presence of QtcProcess::result().

Change-Id: Ie2d6a051b439b5e9161d565b84efb78dbe17487f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-08 12:38:42 +00:00
Tim Jenssen
904b236e58 iostool: fix build against Qt 6.2
Change-Id: I19dce97a61e54804083c149d11fbe193960cf2ae
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-06-08 12:33:08 +00:00
David Schulz
79b9a2fea6 TextEditor: filepathify RefactoringChanges
Change-Id: Ie97e484bcdeaa0cb2f5d04b3c79ace55ff2e426c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 11:40:10 +00:00
hjk
15e4649fe8 Docker/CMake: Use (device-)local paths for build and source directories
These are used as parameters to the cmake process that is run
on the build device, i.e. they are local relative to that.

Change-Id: I07fdd04c91def8d8d6e3a65fbbb17914abecd585
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 11:31:54 +00:00
Christian Kandeler
eba2f2df84 CppEditor: Run test cases for virtual functions also with clangd
This uncovered some bugs, of which we fixed the ones that we could do
something about.

Change-Id: Id8494793bec4d25635bf920133d9f9331bd36228
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-08 09:51:09 +00:00
Cristian Adam
80d18c1e57 CMakePM: Do backup/restore configuration for all cases
When "Auto create build directories" is not checked, then the first
configuration is done in /tmp, which is covered by workDirectory.

Change-Id: Iad65b4776433ce296bd2561195fcf1bb6f8ace1d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
v4.15.1
2021-06-08 09:35:22 +00:00
Cristian Adam
1b3a4e1fc6 CMakePM: Clear and setup file watcher before and after backup configuration
Qt Creator 4.15 will do a backup of the CMake file-api, but the file watcher
that triggers a reparsing was not cleared up before the backup.

This could lead to unnecesary file-api rescans.

Task-number: QTCREATORBUG-25783
Change-Id: Id91379ea85c8a91e03d952c5c66b0371ebff943f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-08 09:34:00 +00:00
Miikka Heikkinen
56555d8b74 QmlDesigner: Fix issues with QtQuick3D versioning
Empty version no longer triggers error about version incompatibility
when the import is set with Model::changeImports().

Adding QtQuick3D via the prompt inside 3D Edit view now correctly sets
empty version instead of 6.x.

Fixes: QDS-4494
Change-Id: I18e62ced6d6df45bc453431f8419bc853bf1e758
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 08:27:34 +00:00
Jarek Kobus
7171b0385f Pass QFuture<T> to the ProgressManager::addTask()
Amends 9a8a7a88a6

Change-Id: Ib389a25f2564db5b6cb7711771c296d2ebd1178a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-08 08:27:22 +00:00
David Schulz
6008c5f673 Core: filepathify LocatorFilterEntry
Change-Id: I279af30f6b57e8d1279d96e5cbae4025cf4ef473
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 07:46:37 +00:00
Eike Ziller
9a8a7a88a6 BaseFileFind: Centralize waiting for search to finish
Instead of adding a FutureSynchronizer to all backends, we can use a
central one in BaseFileFind.

Amends 269f15df6b

Change-Id: Iad0145317b53a95b686c091017b8197d759dc253
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-06-08 07:46:29 +00:00
David Schulz
4445876013 Editor: directly use the Link overload of openEditorAt
Change-Id: I5e863600159cc54a99fec5a20df8de1fbc3d745f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 07:37:42 +00:00
David Schulz
bf79f1ae38 Utils: fix QtcProcess timeout error message
Change-Id: Iccfe7cfe61937872589a708f79dec69afefb9be4
Reviewed-by: hjk <hjk@qt.io>
2021-06-08 07:36:13 +00:00
Tapani Mattila
f087e70e80 AssetExport: Enable setting custom metadata file name for exported components
Task-number: QDS-4384
Change-Id: I5d41ab00f7f90137355289f341defcb87ddf3b44
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-06-08 07:32:12 +00:00
hjk
1ce7adce47 Utils: Set the working directory in QtcProcess::start
The m_process member is strictly speaking only needed for processes
handled "fully locally", i.e. without diversion through any device.

Better set it only when needed, even if only to avoid even unused
locally illegal paths like "docker://123/tmp/x" as working directory.

Change-Id: Ia9e686855ff0c213eb3be03def8c4cecc7ee37ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 07:32:02 +00:00
Jarek Kobus
bcd3feeaa7 Fix a possible crash on shutdown while executing VcsCommand
Add a global synchronizer to the VcsPlugin.

Fixes: QTCREATORBUG-25744
Change-Id: I97578f4a5b5275071aa0253a22fc9ab2f90d9b75
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-06-08 07:12:30 +00:00
Alessandro Portale
b730aa6405 Tracing/QmlProfiler/Perfprofiler: Merge modules
Move Tracing Qml Types into the "QtCreator.Tracing" module.
Move QmlProfiler Qml Types into the "QtCreator.QmlProfiler" module.
Move PerfProfiler Qml Types into the "QtCreator.PerfProfiler" module.
And tst_flamegraphview ones into QtCreator.TstTracingFlameGraphView.

... in preparation to register the types declaratively.

Change-Id: Ic0e3863d09b3426fa5b7419116625ad49b817dcf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-08 06:46:28 +00:00
Eike Ziller
a3391e7b33 Improve safety of VcsCommand
Amends 6e85ff9f4b

Using "invokeMethod(m_outputWindow, ..." has the disadvantage that it
crashes if m_outputWindow was deleted. This is nicely handled when
connecting to signals, so switch back to signals.

Change-Id: I6a681ac48a86536fa8e69e42d3c61ffa9d30c3d5
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-06-08 06:37:04 +00:00
Eike Ziller
ee61b09b21 GitGrep: Do not access global state from non-main thread
- VcsCommand calls into VcsOutputWindow at construction, so we need to
  construct it in the main thread
- VcsCommand may not call into global settings from runCommand, so we
  need to store the ssh prompt command
- accessing the GitClient singleton in a non-main thread is not
  thread-safe

Change-Id: I3dcdff8091c2dcea1c165ce5b3eca5ef62d474fd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-06-08 06:36:53 +00:00
Eike Ziller
e956873db3 Add changes file for 4.15.1
Change-Id: I032ed9a2113e0e2a13988b58d2acf90c0fab7aa3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-06-08 06:35:28 +00:00
David Schulz
93fcf5c91f LSP: Fix CodeActionResult
The isValid check now works on both objects since the error message
simplification. So check the command property and see whether it is a
string to identify the object.

Change-Id: Iaafe2d868267ebb83440d72703ee3edc517385d8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 06:14:50 +00:00
Tuomo Pelkonen
ef7cfe1570 FlowEditor: set TopRightCorner as the default text position for FlowDecision
Task-number: QDS-2508
Change-Id: I1bb62443b8361fc166a7e92644d2641194c105ef
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 06:14:05 +00:00
hjk
ac2271a9cb Docker: Disable original development helper items
Proper Docker support will re-use the original build system's
build and run configurations.

Change-Id: I910512e4943bae90905f16607f9af0548c8078ba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 06:08:17 +00:00
David Schulz
4e69b5068a LSP: Fix Range::overlaps
Change-Id: I14e6477b25a4c9a25c3832a4bc580728bb85c448
Reviewed-by: <sergeikrivonos@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-08 04:42:27 +00:00
Christian Stenger
64ce2a6f43 AutoTest: Cache PCH lookups
Avoid slowing down scans of bigger projects by caching
lookups of paths inside precompiled headers.

Change-Id: I17652ba36ab761cc06ecce151e41253271236881
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-08 04:37:38 +00:00
hjk
4245d89a67 ProjectExplorer: Show a verbose error message if available
... when a start failed, e.g. due to a inacessible working directory.

Change-Id: Ibcec1c5323c37f1e8f6c9e55439439b24f3b40b1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-07 15:18:08 +00:00
Thomas Hartmann
71a081de64 QmlDesigner: Ignore invalid version
Task-number: QDS-4495
Change-Id: I2d01f68f9f598ea9106a72332f039ec35e188678
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-07 13:42:36 +00:00
hjk
a7cd9bda3a ProjectExplorer: Implement (Docker)Device::exists(filePath)
While the original plan was to use more specific functions like
'isReadableFile' to cut down the number of accesses, it is
unrealistic to re-write all occurrences in reasonable time.
So make the basic building blocks accessible, too.

Change-Id: I2586ebd19e1e7ae2c884fd2a4180869421293e3a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-07 12:16:38 +00:00
Jarek Kobus
422409bf26 Add TestStringTable test
The TestStringTable tests the fix provided for a crash in StringTable
on shutdown.

Amends: f4ab1279fd

Task-number: QTCREATORBUG-25417
Change-Id: I5a4a7e4a20e1b9611682a976d38dee17d4603c5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-06-07 12:16:27 +00:00
Christian Stenger
9db6569c43 AutoTest: Take precompiled headers into account
Test frameworks might be added to the precompiled
headers. This in turn would make some pre-checks
whether a file has to be processed or not fail.

Fixes: QTCREATORBUG-25821
Change-Id: Iff69c1a83889cb6f79a3e3f9b2e59c5383989ccd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-07 12:05:37 +00:00
Leena Miettinen
684c5f7529 Doc: Add an introduction to animation techniques
Also adding a new top level page for the "Motion Design" chapter.

Fixes: QDS-4459
Change-Id: I31d7809e18fa735d8896d7cbf6d511c0aaddbbce
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Tanja Remes <tanja.remes@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-07 11:00:35 +00:00
Jarek Kobus
6e85ff9f4b Get rid of OutputProxy in ShellCommand
Before we have used the OutputProxyFactory, which
was called in the non-gui thread. The factory, when run,
created the connection between the thread and outside
world (e.g. VersionControl output window). Instead of
setting the factory we provide a set of virtual functions
called directly from non-gui threads. We also provide overrides
for them in VcsCommand class. Their implementation
safely redirects the calls directly to the VcsOutputWindow
through the QMetaObject::invokeMethod() with auto connection
as a default.

Task-number: QTCREATORBUG-25744
Change-Id: I09f2da278003b71095e953a51499a5513cb8f03f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-07 10:44:31 +00:00
Jarek Kobus
269f15df6b Wait for all searches to be finished in d'tors
Task-number: QTCREATORBUG-25792
Change-Id: Idc516324b2a80b9b907cf29ed3df4de86d842266
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-07 10:17:44 +00:00
David Schulz
4b19decaa7 Core: Remove EditorManager::CanContainLineAndColumnNumber
In preparation of just supporting Utils::FilePath to open editors.
Opening editors at specific locations is still supported via
openEditorAt with Utils::Link, but the caller has first to parse the
file name via Utils::Link::fromString.

Change-Id: I17e5a28aeb50779cef9948fe72e37122d1020c50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-07 10:09:04 +00:00
Orgad Shaneh
7ab715022f Utils: Fix MSVC warning
conversion from 'size_t' to 'int', possible loss of data.

Change-Id: I425fe53e64bfa2b4459a0c9c0fc8c95d142291e4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-07 09:19:53 +00:00
Christian Kandeler
a5ba33cbeb CppEditor: Add second "Find References" Action
This one includes access type categorization, while the "normal" one
does not.
We need this now, because with clangd, the categorization is too slow to
enable it by default.

Change-Id: I2eb4608630d34452ae28f0836befd5d9053f42bf
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-07 08:28:49 +00:00
hjk
a09851ff1f ProjectExplorer: Fix Coverity warning in AbstractProcessStep
*** CID 1505141:  Null pointer dereferences  (FORWARD_NULL)
/qt-creator/src/plugins/projectexplorer/abstractprocessstep.cpp: 409 in ProjectExplorer::AbstractProcessStep::slotProcessFinished(int, QProcess::ExitStatus)()
403         if (!process) // Happens when the process was canceled and handed over to the Reaper.
404             process = qobject_cast<QtcProcess *>(sender()); // The process was canceled!
405         if (process) {
406             stdError(d->stderrStream->toUnicode(process->readAllStandardError()));
407             stdOutput(d->stdoutStream->toUnicode(process->readAllStandardOutput()));
408         }
>>>    CID 1505141:  Null pointer dereferences  (FORWARD_NULL)
>>>    Passing null pointer "process" to "cleanUp", which dereferences it.
409         d->cleanUp(process);
410     }
411

Amends 4a26a2c28.

Change-Id: If9a66841b05e389a87a1b843ee5ef9e66edf15dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-07 08:22:58 +00:00
Eike Ziller
6e9acfe08e CMake build: Add files from qtc_copy_to_builddir to tree
Make the files from qtc_copy_to_builddir part of the project tree, so
they get included in searches etc.

Change-Id: I191f88c8520b9e4a16fd6a5acfeda9cf880cea89
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-07 08:04:14 +00:00
The Qt Project
9f0179b7c1 Merge "Merge remote-tracking branch 'origin/4.15'" 2021-06-07 08:03:24 +00:00
Orgad Shaneh
3c8a991a9b QtcProcess: Really set working directory for process
Git operations were broken.

Amends commit accb1e6e08.

Change-Id: I0ffe41d3d5b80990eed29f7609daaf23201e49af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-06-07 07:20:12 +00:00
Thomas Hartmann
306904fe83 QmlDesigner: Use Window instead of Dialog
Change-Id: I9f7392788e96ed399f686caed41e30e8347b3665
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-07 07:06:44 +00:00
Johanna Vanhatapio
d473c70c4b Doc: Add a note to Reporting Crashes
.... about Crashpad not working in Linux.

Task-number: QDS-4456
Change-Id: I3c7a3b2ce5389089a10b179db61006c0fcf9bcc4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-06-07 07:06:18 +00:00
Eike Ziller
098637b758 Merge remote-tracking branch 'origin/4.15'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp
	src/plugins/ios/iosprobe.cpp
	src/plugins/mcusupport/mcusupportsdk.cpp

Change-Id: I6c2136b576c44fc35def397191db97069599f183
2021-06-07 08:37:56 +02:00
David Schulz
db09eb7600 LanguageClient: fix nullptr access in lsp inspector
Change-Id: I348db437bce0edd17730b0a8a7c47c07d7b92e1c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-07 06:21:04 +00:00
David Schulz
64434b9fb4 LanguageClient: correctly track current hover request
Change-Id: I6c5b90aa8c3fd7611e48c0cd676dc1c1f9b9e562
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-07 05:32:01 +00:00
Mahmoud Badri
90ea538f24 QmlDesigner: Add empty assets directories to the model
...so that changes to empty asset folders are detected and handled.
Also remove a check for folders named as the project's name as it
doesn't seem necessary.

Task-number: QDS-4429
Change-Id: I8031fb57d3c02bb6599824f04f222414a52d08c9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-04 18:33:42 +00:00
Thomas Hartmann
3251b13dd0 QmlDesigner: Use lazy initialization for the ImageCache
Change-Id: I42f6f047882c4056a1523bb85b4801f53e50fbe5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-06-04 16:43:50 +00:00
Eike Ziller
975c6cb096 iOS: Don't run event loop while executing xcode-select
This fixes debugging Qt Creator with the iOS plugin enabled. For unclear
reasons running the event loop while executing the process locks Qt
Creator up when debugging. Since running the event loop is a dangerous
hack anyhow and in this case we don't have much benefit from it, just
don't do it.

Change-Id: Ie147d3461823587a987d0920efdfae0839fb5b67
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-06-04 13:49:39 +00:00
Eike Ziller
66948d9a63 Fix build on macOS
Complains about template argument (QString) and type of value
(const QString) not being the same.
make_optional is usually used with template parameter deduction anyhow,
but in this case we can just return the value.

Change-Id: Icc5c6bb4505d09ab6a864fb7a7c6ec97e34b42b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-04 13:49:08 +00:00
Knud Dollereder
2fa63a2801 Fix QKeySequence construction on macOS
Constructing a QKeySequence with the string "Cmd+Opt+Shift+V" leads
to an invalid, non-empty QKeySequence when compiling Design Studio
on macOS. This triggers an assertion later in the code path.
Using “Ctrl+Alt+Shift+V” instead works as expected.

Change-Id: I7cb185d18f9ffbb7454c61f28a93cdd307121882
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-04 13:30:20 +00:00