Commit Graph

6972 Commits

Author SHA1 Message Date
Robert Löhning
061948e2e6 SquishTests: Update SaveItemsDialog and ReadOnlyFilesDialog
Fixes tst_modify_readonly

Change-Id: I1ba81af321a8ca3d5498d68e2d85abd1214546b9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 07:14:00 +00:00
Cristian Adam
bf83f63a13 CMakePM: Add installDir CMakePresets support
Is part of CMakePrests v3, and slipped at the implementation time.

Task-number: QTCREATORBUG-24555
Change-Id: Id3ce90c0a979d44287fc03ae1dd49a64e964cdf2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-21 13:09:35 +00:00
Cristian Adam
430ff621aa CMakePM: Use parent environment for $env{macro} expansion
Now the code takes into consideration the parent environment for
$env{macro} alongside the "environment" presets values.

Task-number: QTCREATORBUG-24555
Change-Id: I644618b0a6f866fd65a4109ee63b1f5bfcd4164d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-21 13:09:20 +00:00
Robert Löhning
e5aaf00453 SquishTests: Update NewDialog again
Change-Id: I7cb4296c8938ce5e04994863fdd69024f1e9d909
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-20 14:03:19 +00:00
Marcus Tillmanns
3ac5051af9 Utils: Fix FilePath::fromString host decoding
Previously FilePath::fromString did not decode %25 (%) and %2f (/),
so a round of ::fromString(::toString()) would not return the same host.

Change-Id: I99c7317fb149443c2e52c099f7da7c4ef6768aff
Reviewed-by: hjk <hjk@qt.io>
2022-10-20 06:45:42 +00:00
Marco Bubke
c2208fecfd QmlDesigner: Rewriters parses immediately
The rewriter needs to parse the file immediately and not use the timer.

Change-Id: I6399edc23201d301dcb7d8d33d1bd956dd087b4c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-10-19 11:14:41 +00:00
Marco Bubke
d554bf5e2a QmlDesigner: Remove check if setIdWithoutRefactoring throws
We don't throw any exception anymore in that case.

Change-Id: I881f22b560081beff6a6275783061228e64cbb28
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-10-19 11:14:28 +00:00
Marco Bubke
4e72e0fd27 QmlDesigner: Improve defaults of external dependencies fake
Otherwise we get rewriter errors.

Change-Id: I0ce712bc3a473fec88afc4cc59ff6b5ad4828cf1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-10-19 11:14:09 +00:00
Orgad Shaneh
7edf743583 Merge remote-tracking branch 'origin/9.0'
Change-Id: I5e6cfc111941f9609285e1b802121644fa8cdaac
2022-10-19 09:12:14 +03:00
Eike Ziller
3bdb1a3edf Merge remote-tracking branch 'origin/9.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp
	src/plugins/vcsbase/vcscommand.cpp

Change-Id: I2d33113bfb2ea7134550cda1de4e2c21e6711778
2022-10-18 16:51:36 +02:00
hjk
4266f612e6 Utils: Rename FilePath::relativePath() to relativePathFrom()
Hopefully less confusion about the direction.

Change-Id: I61727d6c4d19e0dfe46f24ff24f5d90f9835d05c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-18 13:41:24 +00:00
Eike Ziller
ea5a050c5c Merge remote-tracking branch 'origin/8.0' into 9.0
Conflicts:
	src/plugins/mcusupport/mcusupportsdk.cpp
	src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp
	src/plugins/qmldesigner/components/materialbrowser/bundleimporter.cpp
	src/plugins/qmldesigner/components/materialbrowser/materialbrowserview.cpp

Change-Id: I9317da0fc1243b9ce6d87f577aa843c51f132ad7
2022-10-18 10:48:46 +02:00
Christian Stenger
0264aa2a21 QtSupport: Restore some more object names
Change-Id: Ia88dd8e5d3b512227f4d81e01573881afdfbe58c
Reviewed-by: hjk <hjk@qt.io>
2022-10-17 12:38:51 +00:00
Robert Löhning
a16e74fe96 SquishTests: Fix type of Git.ChangeSelectionDialog
Amends 729805e7fd

Change-Id: I79f67e5d233734ab25da1ff8a2d135061fa139e0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-17 09:35:56 +00:00
Robert Löhning
bf45aa4d24 SquishTests: Update tst_git_clone
Reverts f5f684a609

Change-Id: Iad797f87333e8d793e34c4e7df1f68c5f6508f82
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-17 09:35:39 +00:00
Robert Löhning
d95977db90 CPaster: Restore some more object names
Change-Id: I590baed6d2a2ea4a8dd56f471ac7d4d0a015c725
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-17 08:51:23 +00:00
Christian Stenger
86d41d58a8 Squish: Restore some more object names
..and adapt test slightly. Fixes generic highlighter test.

Change-Id: I72de310d55ceadc684d15d4e257cd1d90fcf836b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-17 07:16:53 +00:00
Christian Stenger
9f0dcd71c4 Squish: Adapt to ui changes
Change-Id: Ie7cb2a80a5edfa135a1b5d1b44c365a5e6cf408b
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-10-13 13:08:05 +00:00
Marcus Tillmanns
a22d62e57d Utils: Add FilePath::isSameFile()
FilePath::isSameFile() checks if two files are the same file.
It first checks if its on the same device. If it is, it will
try to read the fileId of the files and compare them.

Change-Id: I83668955cacd4e5ed03d43a3fee2be29e9d0a6f0
Reviewed-by: hjk <hjk@qt.io>
2022-10-13 11:25:48 +00:00
Christian Stenger
0f24475f48 Squish: Adapt to changed ui
Change-Id: Idbee4f2a4d1536cc1dc6a7822d4415032feb9a28
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-10-13 10:45:51 +00:00
hjk
1fa3255242 Utils: Split off file access interface from IDevice
The file accessing functions form now a class hierarchy by themselves,
the devices return a suitable point.

The previous implementation was mildly confusing by the special handling
of the DesktopDevice, fallbacks and remote cases in the same function
leading to unnecessary boilerplate when adding new functions and
codepaths that sometimes passed the FilePath API twice.

Implemented are a "DesktopDeviceFileAccess" taking care of the
previous !needsDevice() branches and a "UnixDeviceFileAccess"
covering the current docker and RL uses.

As a side-effect this unifies to a large degree the current docker
and RL code paths with were occasionally deviating from each other
while they shouldn't.

Change-Id: I4ff59d4be2a07d13e2ca5e9ace26a84160a87c9d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-10-13 10:38:35 +00:00
Marco Bubke
ba891e7f34 QmlDesigner: Prevent calling the node instance view directly
Views should not write to the node instance view directly. Instead they
should use the model for manipulation.

Change-Id: I3941cc691addab939b8032952230cbe03951730b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-12 16:29:56 +00:00
Christian Stenger
9e659ac759 Squish: Adapt to missing object names
Change-Id: I0bf9bde83bbe78b875775f245268b137ddb71d32
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-10-12 13:27:44 +00:00
Marcus Tillmanns
271c9055f4 FSEngine: Add filePathInfo devicehook in tests
Change-Id: I50b87e213d8c83fa8d126662655681416c1cbe4e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-12 09:36:14 +00:00
hjk
b1471fe61f Utils: Combine some of the iterateWithFind overloads
Change-Id: I668447d0049f2e35cd0c76d2c5708779196167ec
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-10-12 08:59:32 +00:00
Orgad Shaneh
0793184956 Merge remote-tracking branch 'origin/9.0'
Change-Id: I2e11bfba622c14578f08ca988ad98dab97cb385b
2022-10-11 17:46:50 +03:00
Jarek Kobus
c50891611a FilePath: Fix absoluteFilePath to behave like absolutePath
Change-Id: Ibb2cba32c40ec9febab5f20c78156481525c8904
Reviewed-by: hjk <hjk@qt.io>
2022-10-11 14:33:35 +00:00
Cristian Adam
c1667f9bea CMakePM: Allow default build configurations for presets
Restrict the build types only if CMAKE_BUILD_TYPE or
CMAKE_CONFIGURATION_TYPES cache variables are set.

Change-Id: Ib88dcd5d4a0fca86f86e95815edff1116f896324
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-11 11:21:46 +00:00
Cristian Adam
f84bdee045 CMakePM: Allow presets without buildDirectory
CMakePresets v3 relax the requirement of having the buildDirectory
specified.

This way Qt Creator should use its own mechanism of specifying the build
directory.

Change-Id: I6ba69e6a03cdc058e7b8fa540a6fc564356aba63
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-11 11:21:41 +00:00
Jarek Kobus
ecd9053587 tst_qtcprocess: Remove 30 seconds timeout overload
The default is 60.

Change-Id: I22585a62648376c771f6f3e4165dc4a1bef25892
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-11 07:34:39 +00:00
hjk
2e38cb6848 Utils: Add an offset parameter to the content writing FilePath function
Use QFile::seek to implement locally and a dd seek based poor man's
implementation on RL and docker.

Change-Id: I241d1c34c00e991845d132ad8edefa1377ba1311
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-10 16:08:28 +00:00
Christian Kandeler
a0f356aed6 qbs build: Do not build QmlDesigner & friends
Too much maintenance effort for not enough gain.

Change-Id: Ica385bcc93da0dbc7af8e15c07fdd33580de29a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-10 13:43:53 +00:00
Eike Ziller
7efb0a0625 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/qmldesigner/CMakeLists.txt

Change-Id: I500420df35519e6903abc570d1283185f01bf900
2022-10-10 11:47:45 +02:00
Jarek Kobus
77a140c581 QtcProcess: Introduce TextChannelMode and textOnChannel signals
This is alternative to setStd[Out/Err](Line)Callback()
methods. In this way there may be many clients connected
to textOnStandard[Output/Error]() signals. This should
also simplify handling the lifetime of user callback.

Change-Id: If82baa1f3f9c432ed431926619b9bbf11d770a84
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-10-10 09:47:06 +00:00
hjk
5dde520a43 Utils: Return a bit more data from DeviceShell::runInShell
Pass on stderr data and exit code to the caller, it's typically
in a better condition to handle errors.

Use it to notify the user about non-available 'find' arguments
and fix the fallback to ls-based operation.

Change-Id: I535535de2ffa09cad1dd6e9b07eb69f807dbae2f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-10-10 08:39:55 +00:00
Eike Ziller
ce9da99528 FilePath: Fix isRelativePath for QRC paths
Implicitly fixing methods like absoluteFilePath too.

Fixes e.g. JSON wizards that are registered from a plugin QRC file, like
McuSupport wizards (run with McuSupport plugin enabled and create a
"Application (Qt for MCU)" application).

Change-Id: I296ba1c5eb63c9eb27f9a55e65019125faf546ea
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-10 06:14:44 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
Marco Bubke
78cf5051f5 QmlDesigner: Merge cmake files
To improve testability external dependencies are now broken with an
interface. It is a first step to test individual units without injection
of source files.

Task-number: QDS-7571
Change-Id: I4255c8668022f1097947e4ea5788f2a6b605365d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-10-07 13:15:41 +00:00
Robert Löhning
fcb79ee810 Git: VcsBase: Squish: Make tst_git_local run again
Amends 1548eef10b
Amends 69f4cb86dd
Amends 9ad5c4254d
Amends e070d826e5

Change-Id: I584b1b9b662144899d0292b887e8cb3386f80d4b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-07 08:33:12 +00:00
Robert Löhning
729805e7fd Git: Restore object names for dialog
Amends ffcf85958f

Change-Id: Ia48b114137d722df5f72add818d5729adff94110
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-06 07:48:45 +00:00
Cristian Adam
ab7a472b94 CMakePM: update CMakePresets macro replacement function
Moved to a handcrafted function instead of using regex.

This way the Visual C++ Ninja only preset can be processed.

Change-Id: I9b303ee1765db05544d81db7d3b8d9e5223f5f42
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-05 17:54:35 +00:00
Christian Stenger
378d813797 Core: Restore object name for dialog
And adapt usage inside tests.
Amends f5c725cf23.

Change-Id: I8f1e47ea206e34a242988373fa569d547d8d637d
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-10-05 12:59:18 +00:00
hjk
23e96dd6fe Utils: Use a single QString as data store for FilePath
Plus a few integers to get access to the pieces.

This reduces sizeof(FilePath) from 72 to 32.

Change-Id: I65eb856ad47b6a250c705d8d01893781a21d8e02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-10-04 07:27:16 +00:00
Jarek Kobus
f65c42c797 Various plugins: Limit the usage of std::make_pair
Make the code less verbose.

Change-Id: I22ceb8d74567d78042f537b185f8e504227c24c6
Reviewed-by: hjk <hjk@qt.io>
2022-09-30 13:37:52 +00:00
Cristian Adam
ee4c998ff3 CMakePM: Add supprot for CMakePresets version 3
This includes Condition and toolchainFile

https://cmake.org/cmake/help/v3.21/manual/cmake-presets.7.html

Task-number: QTCREATORBUG-24555
Change-Id: I1026390af67b2be1aa0c3b02b654fc19442d3c89
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-30 08:34:07 +00:00
Cristian Adam
e02f4a0518 CMakePM: Add support for build CMake presets
This patchset will add support for version 2 of the CMakePresets
feature that has been implemented in CMake 3.20

https://cmake.org/cmake/help/v3.20/manual/cmake-presets.7.html

Task-number: QTCREATORBUG-24555
Change-Id: I08934243cc04487d38c4b59c2ad4a4a8d0484492
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-28 21:24:53 +00:00
Christian Kandeler
7b9fec2aa8 Debugger: Remove CMAKE_INCLUDE_CURRENT_DIR from autotest project file
Not needed.

Change-Id: Ia75cd0b70f2976a03948e7d8569027f6c0242344
Reviewed-by: hjk <hjk@qt.io>
2022-09-26 15:03:44 +00:00
Marco Bubke
6659024dd3 QmlDesigner: Add sourceContextAndSourceId to SourcePathCache
Change-Id: I4f5eb784e80d3afc10aa007f3be1604f6e18e312
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-26 08:49:54 +00:00
Eike Ziller
4fd4b42f3d Fix FilePath::absoluteFilePath for default constructed file path
FilePath::absoluteFilePath() would consider an empty path to be
relative, and resolved it wrt the current working directory. That is
unexpected in the sense that QFileInfo::absoluteFilePath behaves
differently, and lead to a crash down the line when e.g. a diff editor
was opened when the current working directory is '/' (the default on
macOS when started with "open" or from Finder, Dock or Spotlight).

Make FilePath::absoluteFilePath() return and empty path if the input was
empty.

Change-Id: Ie0d4da50afa24134bd56505b2f4abcf382eee982
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-09-26 07:43:36 +00:00
Marcus Tillmanns
d97b2fd6f4 FSEngine: Add tests for reading/writing
Change-Id: If38d27933727d4af0b24758bdf1a58f5ea78fd1b
Reviewed-by: hjk <hjk@qt.io>
2022-09-23 11:19:35 +00:00