Previously most errors when opening shells were completely
opaque to the user. This patch adds error output either via
QMessageBox if there is another modal dialog, or as flashing
disrupting messages.
Change-Id: I54be7a90295b61c23c739294c2d1d37c288ad273
Reviewed-by: hjk <hjk@qt.io>
In principle that'd be fine there, but the host equality is too strong
in some cases (isSameDevice should help), but it also still gets fed more
or less random content to create display names. Finding the exact
condition is tricky, and the remaining path is good enough.
Change-Id: I4ec29c2f259a7b761d00012bcd9a6d69a057043c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This would always result in no hits, contrary to NoFilter.
Change-Id: I22591581373eed10fb1d1f660f705992e9653d5a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This improves the startup performance ~30% on certain machines
Change-Id: Ic7b74d42b0e13ec1dd695d4f322de021b996c051
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This reverts commit f65b343c8a.
It's not needed anymore for the problem it was supposed to help with
(bad docker imange/qmake paths written by sdktool) and complicates
reasoning in this area.
Change-Id: Idef2ef9147d73e83461589907aa68c09721755cb
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Some installers wrote "docker:/" into the settings instead of
"docker://". This adds a workaround for that.
Fixes: QTCREATORBUG-29474
Change-Id: I49a69d6fa9e4fe383257313e534660814c4a011f
Reviewed-by: hjk <hjk@qt.io>
FilePath::exists() does not need to warn if the device does not exist.
Change-Id: I2ce6a5dec8806a8ee0a2f0e53a2c556c1d8c9e5b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Also fix some misc style issues, such as missing punctuation.
Change-Id: If5a9243eb9ce57c87096f9f0e184c8a802df54aa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
A variation that does not stop on the first found item.
Useful for auto-detection scenarios.
Use "WithAnySuffix" as default to cover .cmd and .bat etc.
Change-Id: I48f36eff06699c046e34c8e2646546bcff20ae8b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
The qdoc command for arguments/parameters is \a. It is enough to
place it somewhere in the text to make qdoc happy.
Change-Id: I164fbd63277787a68b0216ad3fbbed768b975d91
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Avoid the detour through Environment::search* by copying and adapting
some code. Long term the Environment::search* functions may go
as FilePath is generally a better entry point into the remote
world nowadays.
Change-Id: I352d6fb68292d76f29a3454a786322bfe081d53d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Calling toCaseFolded is expensive if the same filepath is hashed
often, so we calculate the hash value once and cache the result.
One such case was found to happen when parsing tests,
as the cpp parser is queried a lot and it uses hash maps / sets
with filepaths.
Change-Id: Ic3ca7f09e8f108f5a89b3fdb17743ae7c3258001
Reviewed-by: hjk <hjk@qt.io>
For better performance, include also the scheme and host in qHash
calculation.
Change-Id: I2a69a128597429b88a71943d248ce038b49285f2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Our atomic write involves writing a temp file and renaming that (which is
the only way to achieve something atomic). This creates a new inode, and
disconnects any hardlinks.
Note that the existing implementation for file paths with needsDevice
already keeps hardlinks intact, because even though it first writes into
a local temporary file it then writes the content directly into the
target with dd.
Check the number of hard links via system API and fallback to unsafe
writing if there are any, for desktop paths.
Fixes: QTCREATORBUG-19651
Change-Id: I3ce1ee81f339f241f0a2c9aa6f2259cb118ebef6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
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>
ensureWriteableDir() and createDir()
Also change a few \returns to Returns.
Change-Id: I8c80616a465a7e665ff56fab8279e43e5755fb4f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
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>
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>
Moves all tests that are applicable only to FilePath over from
tst_fileutils.
Change-Id: Ic331e1470a7479ee2f8ba38baec84124982a000a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Previously the "fileName" of every device inside a scheme subfolder
would be empty. Therefore QDirIterator would skip them.
Change-Id: Ifa46859aadbd8a81364a1fe0a72b9a50a7a396ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>