Commit Graph

8032 Commits

Author SHA1 Message Date
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
hjk
4417c48e7b Utils: Remove FilePath::operator+()
This was a alias for .stringAppended(), but can be used too easily
when .pathAppended() is meant.

Change-Id: Ia3b64d39828d4074b43d87c923ce3a6a87038948
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-30 06:57:02 +00:00
Jarek Kobus
d29fa0f3ba TaskTree test: Detect test timeout
Detect, if test has timed out before checking other results.
When the test timed out, the task tree may still be running.
This helps in analyzing the test failures inside precheck
button.

Change-Id: Iccad85dbb8b3d621165ab8b0c5a1b82a1d6808cb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-29 15:23:30 +00:00
hjk
8249eabbad Utils: FsEngine micro-optimizations
Mostly for shorter code, but also save a few cycles due to less
string construction and run time dispatch.

Also, make testFilePathFromToString() test two paths instead one path
twice.

Change-Id: I50a3145bca1a4b262a15e96173ea7ebd9cb678ad
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-29 10:17:41 +00:00
Thomas Hartmann
5705194bc7 QmlDesigner: Fix build for tests
Updating the NodeMetaInfo mock.

Change-Id: Ia3a87095413bb58430d978bb831ed8b808596093
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-28 15:56:16 +00:00
Orgad Shaneh
157f2bcd39 Merge remote-tracking branch 'origin/9.0'
Change-Id: I231d35f492713f317773b79478b5f7fb97a4fe50
2022-11-28 17:29:19 +02:00
Jarek Kobus
12b639970f MathUtils: Add exponential interpolation
Change-Id: I58bb26a6e921cbd1f5532bddcd6a6700ff80b94f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-28 10:45:13 +00:00
Jarek Kobus
23f53dcbda MathUtils: Add tangential interpolation
Reuse it in TaskProgress and in ProgressTimer.
Rename MathUtils::interpolate() into interpolateLinear()

Change-Id: Iff4cda1e3b8782cd26277ec75046ca5526be92c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-28 10:07:30 +00:00
Tim Jenssen
98a40b3690 CMake build: Make errors of execute_process fail the build
Instead of silenty failing and resulting in broken builds/packages.

The property is only available since CMake 3.19, so limit the feature to
that.

Change-Id: I82b06e78540e81a809f7fdfe130648becfc9672e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-28 08:29:42 +00:00
Tim Jenssen
02c65495d1 Merge remote-tracking branch 'origin/9.0' into qds/dev
Change-Id: I5e66666644fd16de60a0158e5e884706622ae3ba
2022-11-24 19:01:47 +01:00
Jarek Kobus
d2408fd389 Tests: Replace foreach with range-based for loops
Change-Id: If813702db78f05701f0ef9378843a474da0aae6a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-24 16:03:04 +00:00
hjk
9d80e23256 CppEditor: Proliferate FilePath use
This includes one functional change: It drops some cleaning
of the path used to create the CppDocument, which is now
assumed to be done on the caller side.

Change-Id: I5e2a182028e4d5b56282ad85f4a5c665f081754f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-24 15:54:33 +00:00
Christian Kandeler
bfecefabc0 CppEditor: Let users check for unused functions in (sub-)projects
Note that especially in C++, there can be a lot of false positives,
especially in template-heavy code bases. We filter out the most notorious
offenders, namely:
    - templates themselves
    - constructors and destructors
    - *begin() and *end()
    - qHash()
    - main()
Since the code model does not know about symbol visibility, the
functionality is quite useless for libraries, unless you want to check
your test coverage.
The procedure is rather slow, but that shouldn't matter so much, as it's
something you'll only run "once in a while".

Fixes: QTCREATORBUG-6772
Change-Id: If00a537b760a9b0babdda6c848133715c3240155
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-24 09:27:03 +00:00
Marcus Tillmanns
43b21595e9 Utils: Disable broken commandline tests on windows
Change-Id: I20e89877886b0f9416cca766a119b99191011d1b
Reviewed-by: hjk <hjk@qt.io>
2022-11-24 09:00:32 +00:00
Thomas Hartmann
d0a07dcacb QmlJS: std::set instead of QList
This reduces the CPU time of Export::visibleInVContext() from 50% to 15%
on Windows, when switching files.

Change-Id: Iff82924c47d1b696c9d3d7ca40f49d9d02bcb3e6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-23 16:28:26 +00:00
hjk
587bafc771 Utils: Make errors from CommandLine test better readable
Change-Id: Ibea4bbe7c1f7e502849f0ef6985cbf107fc236f0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-23 14:21:49 +00:00