Commit Graph

14 Commits

Author SHA1 Message Date
Marcus Tillmanns
a020c13e10 Filepath: Fix operator<()
Previously a QMap with FilePath as key would return wrong
entries when comparing paths with and without scheme/host.

Change-Id: Icc5d119a18c1b7a2fdab9c89f162c48859926523
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-02-09 10:21:11 +00:00
Marcus Tillmanns
1049f8d329 Utils: Remove unnecessary flag
Change-Id: Iae99b5fd6d3740015deb0e30d45d480ffb54c4a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-15 14:18:46 +00:00
David Schulz
5122d8addc Merge remote-tracking branch 'origin/11.0'
Change-Id: Idbf5f641aa9db7574cf2a4bd09adb8bcd03da894
2023-08-22 08:10:48 +02:00
Marcus Tillmanns
324e924178 Utils: Fix FilePath::isRootPath()
Change-Id: I287bae74469ba501ecb03d51f04f7aaa5f4a7268
Reviewed-by: hjk <hjk@qt.io>
2023-08-15 10:50:24 +00:00
Marcus Tillmanns
cb50a67521 Utils: Fix FilePath tests
Change-Id: I2751cd9393baa836715f778a9bcbc47a445c264c
Reviewed-by: hjk <hjk@qt.io>
2023-08-10 10:48:40 +00:00
hjk
3d4621c531 Utils: Fix compilation with namespaced Qt
Change-Id: I5e9ce4a637672fece8884d88c87fc8aaee7d9cc3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-12 11:50:29 +00:00
David Schulz
b4734ff727 Utils: add tests for Position::fromFileName
Change-Id: I321b91567e47e08883c7b991cd24d02bb8a9b9c6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-16 08:24:28 +00:00
David Schulz
5b0c3258bb Utils: Make column of LineColumn consistently 0-based
Change-Id: I4ab153d1c55653936efbcdc13ac04463185930e0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-11 05:53:49 +00:00
Marcus Tillmanns
fc95d7a737 Utils: Improve FilePath::sort
Remove the conversion to/from QString for sorting.

Change-Id: I89921328b6d9e952c802d41998495bd2ffbb9f99
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 08:56:32 +00:00
hjk
305ccfe259 Utils: Replace FilePath::onDevice() by new FilePath::withMappedPath()
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order
of b.withNewPath(a).

Whether the (curretly docker-specific) path mapping is useful /there/, and
whether some of the calls are needed at all is dubious. I added some
FIXME and changed a few cases directly.

Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 06:56:55 +00:00
Jarek Kobus
81bd8e3bd8 FilePath: Remove overloads for async tasks that don't take context
Passing mandatory context object clearly suggests a special
care should be taken for assuring the passed function
may still run when the task finishes in the future.

Fix FileStreamManager so that it deletes the streamer
even when context object was deleted in meantime.

Fix 2 usages of asyncCopy so that we pass a context object now.

Side note: passing nullptr as a context object is still
possible and should work, but it's not recommended.

Change-Id: I464438db42ed9292c2f89ecb9d5dde7c78f77640
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-03-17 14:30:59 +00:00
Jarek Kobus
69fa8f3f3c FilePath: Integrate FileStreamerManager for async i-face
Change-Id: I3371471e3c23b86a62b5e4056b343941ab46e191
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-03-07 12:22:40 +00:00
Marcus Tillmanns
a62c5cf89a Utils: Cleanup searchInX functions
Also move some often used types into new file "utiltypes.h"

Change-Id: I3f152d1dc2f96ba0259ad6c098d9ac5ee03a59f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-02-24 15:13:32 +00:00
Marcus Tillmanns
d5a9e28a96 Utils: Add tst_filepath
Moves all tests that are applicable only to FilePath over from
tst_fileutils.

Change-Id: Ic331e1470a7479ee2f8ba38baec84124982a000a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-24 09:45:56 +00:00