Commit Graph

8097 Commits

Author SHA1 Message Date
Jarek Kobus
98ff1d32f9 TaskTree: Remove GroupConfig / GroupAction
Use TaskAction for dynamic group setup. Get rid of possibility
of selecting group's children to be started inside group setup.
Use dynamic children's setup instead, so that each individual child
may decide itself whether it wants to be started or not.

Change-Id: Ie31f707791db0dc26be92663ca6238b8e49c3b98
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-20 14:18:56 +00:00
hjk
642c593481 Utils: Flatten LayoutBuilder related hierarchies
Originally the idea was to only expose LayoutBuilder, but we
are getting more and more related items. Be consequent now,
and have everything in Utils::Layouting, but not in nested classes.

Change-Id: Ic0f98595882e5c60a25c30ec52df4a0ea79bc0ca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-20 12:44:30 +00:00
Jarek Kobus
9dfd72017c TaskTree: Add more tests for recently added fixes
Change-Id: Ia71fa174380b484cbe07a23f8b641755c5edcc65
Reviewed-by: hjk <hjk@qt.io>
2023-01-20 09:20:14 +00:00
Jarek Kobus
e6ca18e194 TaskTree: Implement dynamic setup for tasks
Before it was possible to dynamically setup groups only.
This functionalily is probably good enough to replace
Group's DynamicSetup, as it seems much more convenient.

Change-Id: I56080f0ffa844847ca955cf52ccb07f3b4e4c731
Reviewed-by: hjk <hjk@qt.io>
2023-01-20 09:19:49 +00:00
hjk
015b1ee53c Core: Tr::tr
Change-Id: I0064814b0689f0f65072d2b0f60e26162587fd54
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-17 14:34:16 +00:00
Alessandro Portale
e78f0b5911 LayoutBuilder: Turn Splitter into a LayoutItem
Change-Id: I05bdadf7f79966e215b4999db9c2f96cd8f67f9f
Reviewed-by: hjk <hjk@qt.io>
2023-01-11 14:05:46 +00:00
Tim Jenssen
9eb2a7bc5b Merge remote-tracking branch 'origin/9.0' into qds/dev
Change-Id: Ic60cb293d07e7e25716adfbaa2f35e9d25ca148b
2023-01-10 17:48:42 +00:00
hjk
4ddd28ae22 Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*
... and re-use the old QtcProcess::readAllStandard* names for
a QString-returning 'decoded' version.

For now, only use that in 'full Utf8' cases, to stay bug-compatible,
the plan is, however, to employ the QTextCodecs we have already
in the channel buffers. That will be one-by-one, though.

Change-Id: Id209e0671920d4ea4197918e872f441254112d52
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-10 12:08:53 +00:00
hjk
c7884a2b17 Qmake: Enhance remote parsing
When parsing remote .pro files the parsers needs to pretend it runs
on the remote device.

All internal data are now "local on the remote", so that string
manipulation in .pro files "just works", and a 'device root'
string is passed around to relevant functions which then use
it to construct FilePath::toFSPathString()-style paths that
our custom FSEngineImpl can then map to the real device.

Remote $$system() calls are intercepted by the local parser and
redirected using the usual QtcProcess mechanims.

Quite a bit of the ProParser needed adjustments, so there's some
potential for regression.

Task-number: QTCREATORBUG-28242
Task-number: QTCREATORBUG-28161
Task-number: QTCREATORBUG-28355
Change-Id: I6100e7aca4e1db35f5e9689004110aab57e2c595
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-10 12:02:23 +00:00
Jarek Kobus
b6208ab34a TaskTree: Introduce ParallelLimit
The parallel limit constrains the number of parallel tasks
run in the same time. So, if e.g. a group contains 10 children
and the parallel limit is 6, only first 6 tasks are being started
on the beginning and the rest 4 are being postponed until some
running tasks are finished. So, when the one of 6 running tasks
finishes the group starts the 7th task and so on.

Setting parallel limit to 1 means sequential invocation in fact.

The value of 0 means there is no limit and all tasks are run at once.

Remove the ExecuteMode enum, as this is modelled now by the
parallelLimit.

Change-Id: Ice59318be0915401f05bb5a5804078bdc591d09f
Reviewed-by: hjk <hjk@qt.io>
2023-01-06 15:28:19 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Kai Köhne
1be357f4be Remove GPL-3.0+ from license identifiers, part II
The original text before the SPDX change did not include a potential
GPL-4.0, but GPL-2.0.

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR LGPL-3.0/LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only/g" {} ;

Change-Id: Id5e40d3e174ecea660a09e88a02bd57505f1875d
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 10:27:36 +00:00
hjk
ac9023e851 Utils: Make Utils::withTildeHomePath a FilePath member
Gets .osType() right in remote cases.

Change-Id: I6397996062d976d7db690c5729dd4faa1f459563
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-05 10:17:10 +00:00
Eike Ziller
55fa109b59 CMake build: Use version-less Qt targets
Since we do not support Qt < 5.15 anymore, and as a first step
for getting rid of our special FindQt5.cmake.

Change-Id: Icc5dbaf9b0a3a622b1f609ff114b9decb6d2856c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-01-05 10:13:16 +00:00
Eike Ziller
098c717678 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/qtsupport/qtoptionspage.cpp

Change-Id: Ic8ada9fd47f5eb62e751b6188a45b95ddb36122d
2023-01-05 09:47:06 +01:00
hjk
b9bba49275 Docker: Fix typo in test files
Change-Id: I4e7c0c0612d9dca8c815c5a378436574c4456a00
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-05 08:05:16 +00:00
Alessandro Portale
9441865714 Android: FilePath-ify AVD handling code
Change-Id: Id08414f8fb9ce7f4fac5221cd24392e25f02f00d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-01-04 10:46:14 +00:00
Eike Ziller
e38d1f06bd Fix that Utils::sorted could modify input container
Utils::sorted had overloads for "const Container &", "Container &&", and
"const Container &&", but for _templated_ types "Container &&" does
_not_ mean "rvalue reference", it means "rvalue or lvalue reference"
(e.g. "universal" reference).

That means that for non-const lvalue references that "Container &&"
overload was used, which modifies the input container. Which is a fine
optimization for rvalue references, but is wrong for lvalue references.

Add another overload explicitly for "Container &" before the
"Container &&" overload, and add some tests.

Also fix the compiler warning that triggered the investigation:

warning: local variable 'container' will be copied despite being
returned by name [-Wreturn-std-move]
note: call 'std::move' explicitly to avoid copying

Amends 13f40f5471

Change-Id: I14461fde5fc51a8bb679fd72b886e13b18c47e7b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-01-03 13:01:36 +00:00
Artem Sokolovskii
a5bee6e3ae tests: Remove foreach usage
Task-number: QTCREATORBUG-27464
Change-Id: I0e42da9b04793be959ad050fdecc0c78c98d9fcd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-03 10:53:15 +00:00
Robert Löhning
a3c1b35475 SquishTests: Update tst_designer_autocomplete
ui_mainwindow.h is being created on first build. While there
seems to be some workaround for qmake-based projects, cmake-based
projects can't be parsed properly before the file was written.

Change-Id: I0e9802f79b60d7d07ed92ca0ae9b93e53249b61f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-02 14:19:41 +00:00
Eike Ziller
3f4c3a3db4 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/texteditor/texteditor.cpp

Change-Id: I9c8f1331be3f5442f1fd28aeb0a9bc07128629d1
2022-12-20 11:05:01 +01:00
Eike Ziller
68e15e613f Remove unneeded .pro/.pri files
Remove qtcreator(_ide_branding).pri, and all remaining .pro/.pri
files that depend on it.
They have CMake files now.

Change-Id: I87d100b49df7ca95694a755cb581cb5eea26aa9a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-12-20 10:00:05 +00:00
hjk
6a4123a96f QmlProjectManager: Even more FilePath use
Change-Id: I4990b9171598d7f277f8e8e5a2b3e0fb1a3375d0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-19 14:00:39 +00:00
Eike Ziller
34aa8e9e19 PluginSpec: Add a "LongDescription" to plugin meta data
The EmacsKeys plugin had a long description with details on what it
does, which in principle is a good thing, but shouldn't be shown with
e.g. the -version command line argument.

Split the description in a short "Description" (name unchanged for
compatibility), and a possibly longer "LongDescription", using only the
first one for -version, and showing both in the plugin details.

Adapt the EmacsKeys plugin meta data.

Fixes: QTCREATORBUG-17312
Change-Id: I4a4abf51e5e19b71ee73edb14c6a897fbceaf916
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-16 08:29:57 +00:00
Robert Löhning
698a495972 SquishTests: Use existing function saveAndExit()
Change-Id: I2e10de8b454a69b3e4ade7520b4fa00415bcde42
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 14:45:42 +00:00
Eike Ziller
308a12b833 Merge remote-tracking branch 'origin/9.0'
Change-Id: I5b66ee9645904c9e736552d0d2c5f1b7c520dfbb
2022-12-15 12:03:49 +01:00
David Schulz
2d0456f085 LSP: Support remote LSP file paths
Change-Id: If3cf1b8d675ef091427dbcd703c7d14b384a1b3a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-15 09:49:48 +00:00
Christian Stenger
75c43f926b Squish: Stabilize invoking context menu
Try a second time if the wanted menu item is not active when
triggering the context menu the first time.

Change-Id: I742db645542e6775baaa77fbdb1fd5a8e9a120f2
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-12-15 09:11:01 +00:00
Robert Löhning
3874ac236d SquishTests: Stabilize tst_codepasting
Avoid
"Error in type() invocation: Could not
activate toplevel-window for widget"

Change-Id: Ib68a975724ad3824800bdcb542916b6644f1dc7f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 08:33:25 +00:00
Robert Löhning
7b073efe4a SquishTests: Update tst_QMLS04
Change-Id: I383e8f652ae233df7ed5bef93dcaa9a43fe95f0e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 08:32:58 +00:00
Robert Löhning
bbd5d6c7ae SquishTests: Update FindToolBar
...as seen in tst_CSUP05

Change-Id: I1736a4ec9c69a3db3fc98ea1234b0363ceeaef41
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 08:32:30 +00:00
Tim Jenssen
7f234ed768 Merge remote-tracking branch 'origin/qds/dev'
Conflicts:
  src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.cpp
  src/plugins/qmldesigner/components/contentlibrary/contentlibrarytexturesmodel.cpp

Change-Id: Ieda6242b845387100022b08251283891fb0fbda7
2022-12-14 14:30:09 +00:00
Tim Jenssen
db4bbfdf4b Merge remote-tracking branch 'origin/9.0' into qds/dev
Change-Id: I4305c3b37814cc3a926e8e56cabe5f8935f8f2c0
2022-12-14 13:39:31 +00:00
Eike Ziller
a3fe24d192 Merge remote-tracking branch 'origin/9.0'
Change-Id: I5298a6529921568ec32c0fe0c009c273263b0f5d
2022-12-14 14:25:38 +01:00
Marcus Tillmanns
eca7044361 Utils: Add std::expected implementation
Adds a std::expected implementation that is compatible with >= C++11.

FilePath::fileContents and FilePath::writeFileContents as well as
FilePath::copyFile are changed to return std::expected.

A couple of macros have been added to aid in using the expected types.

An auto test was added showing how to use the library.

Change-Id: Ibe3aecfc1029a0cf13b45bf5184ff03a04a2393b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-14 10:39:29 +00:00
hjk
4159c4b5d5 CppEditor: More migration to FilePath
Change-Id: I261b713671e00bb567f61b4ee5ecf6fa83473bff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-14 09:14:12 +00:00
Christian Stenger
75177f4c34 SquishTests: Expect some more error message
Change-Id: I33f359673e6d23f0188072db891db08dafa72ace
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-12-14 05:06:25 +00:00
Jarek Kobus
4ff34cf47f TaskTree test: Use storage for getting the result from task tree
Remove storage() test case, as Storage functionality is fully
tested in processTree().

Change-Id: I05c199cf4cfa2a77493ce54df267b8ed1c2804bc
Reviewed-by: hjk <hjk@qt.io>
2022-12-09 12:09:23 +00:00
Jarek Kobus
7fc9933969 TaskTree: Add a possibility to setup storage handlers
Storage handlers make it possible to pass initial data
into task tree and make it possible to retrieve the output
data from task tree after the task tree finished.

Change-Id: I0bcc12f5e552f55c1d5d89b81521ae9cb7b8b124
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-09 11:47:52 +00:00
Jarek Kobus
cb8d4797b7 TaskTree: Add TreeStorageBase::operator==
Change-Id: I50144978b86f2e5fa89fc35c687b64ed102803e6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-09 11:42:49 +00:00
hjk
c08317b5a6 Utils: Remove slash normalization in critical path
Should be done by callers, most notably fromUserInput

Change-Id: I0dec8e3ab76d49d0ddf4da3088499e71c536ab83
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
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-12-09 09:24:43 +00:00
hjk
9a8d34ecf8 CplusPlus: Pass FilePath to Preprocessor::run()
... and update caller sides.

Change-Id: I6a107e4a7fd9f7123cdc6f141da202845bcbbb66
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-07 12:58:31 +00:00
Eike Ziller
b4fed03c27 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/cppeditor/cppeditorplugin.cpp
	src/plugins/docker/dockerdevice.cpp

Change-Id: I41747ff9490e4ab20340d4d4acb4655100aaa3d2
2022-12-07 10:47:47 +01:00
Tim Jenssen
c9f7d893f4 Merge remote-tracking branch 'origin/9.0' into qds/dev
Change-Id: I7f394c76256d1d24fbc2d40937f3f7a63fb854c1
2022-12-06 16:31:58 +00:00
David Schulz
6fbeb55817 Debugger: fix dumper test for QVariant
Change-Id: I5512a568b5b7c4d9793df9cd233d3a8c4af4a982
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-02 11:54:36 +00:00
hjk
a89dfe41b4 Debugger: Add a test for more recent Debian gdb
Change-Id: I960bf51b42c46ee67a8fc685a5c940747c797944
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-02 06:49:33 +00:00
Jarek Kobus
8d6d51ec3e tst_TaskTree: Increase the timeout
Change-Id: I8306aeb3719feb295a27339736209159f688a734
Reviewed-by: hjk <hjk@qt.io>
2022-12-01 15:18:40 +00:00
hjk
39ffdb416f CPlusPlus: Use FilePath for resolved include paths
... and fix fallout.

Change-Id: I66886e91ff476eff15db51cc024a8021e952d44d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-30 17:27:56 +00:00
hjk
4eee8a12fb Utils: Clean path in FilePath::resolvePath
Change-Id: I27e34e21c2922db4d7598c77688133aebf6ce893
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-30 11:47:33 +00:00
Marcus Tillmanns
fd829240ed Utils: Fix addCommandLineWithAnd for Windows
Also enable more unittests on windows

Change-Id: I241b77c640949cf622dc8138991036bb066ce3cf
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-11-30 08:02:53 +00:00