Commit Graph

7307 Commits

Author SHA1 Message Date
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
Jarek Kobus
dfd06ec175 TaskTree: Fix destruction of running task tree
Delete all storages that were created before.

Change-Id: I8cbeb571424086b77fa7b19611c5b3f6cc1f4db1
Reviewed-by: hjk <hjk@qt.io>
2022-11-23 12:59:29 +00:00
Jarek Kobus
3468cd20ca TaskTree: Introduce Storage item
The Storage item makes it possible to define the whole
subtree as a self-contained, full-functional recipe, without a need
for passing (together with recipe) a one-use only (disposable)
pointer to storage object.

That's the last closing element of making the idea of pure,
value-based recipe real. It makes the TaskTree machinery ultimately
powerful.

Change-Id: Icd81bdd3e94251e8b241b2b550957d566fa4ab75
Reviewed-by: hjk <hjk@qt.io>
2022-11-23 12:59:18 +00:00
hjk
fa1adf4d40 CPlusPlus: Proliferate FilePath use
The starts with CppDocument::filePath(), plus a bit of the fallout

This is one patch of potentially many. It is hard to draw the
line where to stop this kind of chunk, this here converts a few
additional functions for which including it in the patch looked
like less churn than without.

Converting is mostly fromString/toString, with a few exceptions
for "already seem" like caches, that use cheaper "path()" to
avoid likely performance regressions (on Windows FilePath
comparison is currently case-insenstive, and more expensive).

There should be no difference for local operation with this patch.

Change-Id: I7b35f98a0a6f0bfed4ea0f8f987faf586f7a8f2b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 15:30:00 +00:00
Marcus Tillmanns
3e6c3d9fe7 Utils: Add "addCommandLine..." functions
addCommandLineAsSingleArg allows to reliably create commandlines
like "bash -c 'echo ...'"

addCommandLineWithAnd combines two command lines
by adding '&&' in between

Change-Id: Ic5af34c90fd5271dced40ba1341a3df019ededb8
Reviewed-by: hjk <hjk@qt.io>
2022-11-22 13:17:00 +00:00
Miikka Heikkinen
e3a817ec77 QmlDesigner: Hide or disable material browser and editor if no library
If material library is missing, material browser and editor UI should
be disabled, except for material editor main pane in case of root
material node.

Change-Id: I3d2bd545de0649fb90d3fe1f751d46b7c7054bbf
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-22 10:05:55 +00:00
Jarek Kobus
292e8f510e Add manual test for TaskTree
Change-Id: I92ea4d949729f59d2d1e262ecd38fc3be4f463fe
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-18 16:36:59 +00:00
Jarek Kobus
34a7ada66b AsyncTask: Add async task adapter for task tree
Change-Id: I9fd90fef0d9eedfaca6e405ada5aa26006f06e33
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-18 16:34:59 +00:00
Jarek Kobus
30eac65e09 Utils: Introduce AsyncTask
AsyncTask encapsulates a function and arguments list
for further asynchronous invocation (using Utils::runAsync).
This is going to be a part of TaskTree hierarchy.
It will enable keeping asynchronous tasks inside the tree.

This means we will be able to construct a task tree
consisting of a mixture of processes and asynchronous tasks.

Implementation-wise this is a simple templated subclass of QObject,
where template parameter is of asynchronous result's type.
It holds QFutureWatcher object internally in order to
track task's running state.

Change-Id: I96f307cdf663cadc840465debb353ab55a2c3550
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-11-18 16:06:18 +00:00
Jarek Kobus
4e4176a3d3 TaskTree: Add task tree adapter for task tree
Now it's possible to nest TaskTrees. A nested TaskTree
is seen as one, singular task inside parent tree.

Change-Id: Iad95de39c7b79580e0b589c222594de91d5b51a1
Reviewed-by: hjk <hjk@qt.io>
2022-11-18 15:31:03 +00:00
Jarek Kobus
1f59f42287 Remove unused includes of QLayout
Change-Id: I12777e07f3d6fcc639b48f02080e73b1a0a3ea30
Reviewed-by: hjk <hjk@qt.io>
2022-11-18 15:29:35 +00:00
Jarek Kobus
1a70403f94 Remove unused includes of QFormLayout
Change-Id: Ia877cb57037342f2a7b332b29d9cb45e9b01c4bc
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>
2022-11-18 07:33:29 +00:00
Jarek Kobus
7ab95906b9 TaskItem: Move enums outside of TaskItem
Change-Id: If8a2b285bf9d9bd5a5b7222c13772c1a873daf23
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-17 15:07:59 +00:00
Jarek Kobus
a4b7e10861 TaskTree: Implement simple progress reporting
The progressMaximum is the number of tasks in tree.
The progressValueChanged signal is emitted whenever task is done
(advance by one) or when some number of tasks were skipped or stopped
due to workflow policy or dynamic setup group handler.

Change-Id: I403059a6466ae0534ef647c3c1c61c0318f10325
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 15:07:47 +00:00
Jarek Kobus
e38db06203 TaskTree: Add taskCount() getter
Will be helpful when implementing progressMaximum.

Change-Id: I9204b53425054a01c96f3b926b595f7888f81e3a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 15:07:34 +00:00
Jarek Kobus
234b3d1e6f TaskTree: Add DynamicSetup handler for groups
DynamicSetup enables finishing group (with Done or Error)
immediately before the group was even started.
The handler is invoked dynamically, just before starting
the group. The handler may also allow for running only
selected children and omitting others, so it may serve as
dynamic condition or dynamic multiplexer. This can be achieved
by modifying QSet<int> childrenToRun field inside returned
GroupConfig and setting the policy to ContinueSelected.

Change-Id: I15bddbb866a89ae9f783c59cc4bca89dd6a81c75
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 15:07:22 +00:00
Christian Kandeler
953000b981 CPlusPlus: Add new usage tag "Template"
For use in follow-up patch.

Change-Id: I49c057280be9b09862a89fa385a7396f1b1093bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-17 15:02:09 +00:00
Tim Jenssen
213d60ad64 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: I74bf2bfb1eacb60675640c47eb41ce51dd6eb99f
2022-11-16 18:22:59 +00:00
Eike Ziller
ae67799eb3 Merge remote-tracking branch 'origin/9.0'
Change-Id: I2123e09f75199a63af6e8505fb8889e7f9d025d2
2022-11-16 09:40:34 +01:00
hjk
ef658663aa Utils: Remove internal /./ relative path marker
Some creeped into settings earlier, making the paths that were
meant to be empty look non-empty.

Also add a test for FilePath::isEmpty().

Change-Id: I99e3dd673294206558f9fee9b7c7874d2441327e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-11-16 07:23:46 +00:00
Robert Loehning
b85183d966 SquishTests: Improve tst_memberoperator
- Update expected behavior
- Update to ClangCodeModel replacing "." with "->"
  only after selecting a completion
- Update to ClangCodeModel no longer announcing
  needed substitution in proposal widget
- Added test for unchanged lines
- Stabilize by using proper wait conditions
- Fix surplus warning

Change-Id: Ia90e0102d44fbd8abb41acaa83509657ad11bf4d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-15 08:48:16 +00:00
Robert Löhning
80885d12e0 SquishTests: Update tst_installed_languages
Change-Id: Ic06b6241df913ebcfe685936f3c509875a2897bc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-15 06:45:00 +00:00
Eike Ziller
3f0f9a63c0 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/clangcodemodel/clangdcompletion.cpp

Change-Id: Iaa92bf057d7696d2da10802ff95e80863f3235d8
2022-11-14 15:26:20 +01:00
Christian Stenger
a6774dbad5 Tests: Fix dumper tests on macOS
Change-Id: I7827245017c285ff7c9eb4799a7b340061f3c4af
Reviewed-by: hjk <hjk@qt.io>
2022-11-11 14:28:00 +00:00
Robert Loehning
c6e08d6940 SquishTests: Enable clangd also on machines with low memory
Change-Id: I92caa0da779aacf731a0aa23a86f55e659c51d2b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-11 09:14:35 +00:00
Eike Ziller
f147ef73eb Fix compilation of tasktree tests
Change-Id: Id20b581c53cc4f55735b4047bd9ba723b0e370da
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-11-10 12:47:33 +00:00