... into a single class.
This makes passing them around as a whole easier, and opens a path
to have "generic" filters in form of a lambda or such.
Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This will make recursion easier and has the potential to avoid creating
big intermediate lists.
Change-Id: I44d42925dae9c0048338c7d0a6aa26606f314c28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
The indirection is triggered via scheme and host. And if it already is in
that form we do not need to add these information.
Change-Id: I13c2bd0864a956c5cdaa5e2e6b324bb7f67c93e3
Reviewed-by: David Schulz <david.schulz@qt.io>
To cover cases like Windows -> Docker/Linux, where these parts are not
an exact 1:1 mapping.
Change-Id: Iecc26e06771fb190644988950271ff7990962b6b
Reviewed-by: hjk <hjk@qt.io>
And use it in the local branch for FilePath::searchInDirectory which
so far erroneously also looked into the system environment's path.
Change-Id: I60316831b74a55dee84fbf4b54c0eecc49dd8dde
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... when it is implicit by other checks in the same expression.
Change-Id: I10c6bd92e4890bdf611f3a222dc6c2d271e98f37
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use the FilePath's knowledge of the target os instead of always using
the host os.
Change-Id: I996db68486f4616c8636ae501cce7a778269f1cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
After replacing its use in the two remaining places.
Change-Id: I6900ccdaf4ba4cf035e59b1222f06b037e7da512
Reviewed-by: David Schulz <david.schulz@qt.io>
There was already a similar function taking a QString.
After that, the remaining no-argument version of absolutePath()
can be deprecated.
Change-Id: I5b9ad8c8b68a5723891b0aa9f5a37e90db0fe09e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Helps keeping track of usages of potential wrong paths and partially
makes sure to not leave the correct device.
Change-Id: I19fff7ae8abc3fa6045f7d4459f1140ba71e4f16
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
When renaming an item in the project tree widget which has concatenated
filename extensions like *.ui.qml the selection in the LineEdit will
reach till the last dot.
* Extend FilePath suffix and completeBaseName function so they will
treat the suffix *.ui.qml as one
* Make use of the function in ProjectTreeWidget::editCurrentItem
* Replace QFileInfo::suffix with Utils::FilePath::suffix in
FlatModel::setData
Task-number: QDS-2713
Change-Id: I30d0e6d87a7512d42fd3d40b2282b94e79b43684
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Especially with the "remote" scenarios synchronous operations cannot
be expected to work reasonably well.
This here starts with adding asynchronous versions to some of the
FilePath member functions, taking additional "Continuation" style.
This is not necessarily the final syntax (sugar like .then(...) comes
to mind...), but is simple enough for now for the few uses we have,
and it is too early to see what will be needed in the end.
Change-Id: Idf4dde1b77d04cafb81b6c024031145bdd91a762
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Not optimal, but will suffice for docker callgrind.
Change-Id: Iac669fe9dd29206df2a4ffc61d659afce2f7a6c4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diverts to searchInDirectory(). Use it in some places.
Change-Id: I9e5642f0ae0ed4dd9fb9f34bcaa11a25bd26c690
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... as wrapper around FileUtils::normalizePathName, and use it
in some places.
Change-Id: I42792e1f175b8119c8db930eae80a9f822ac70fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When using the same path for the anchor and the relative path
we end up in an empty path which is conceptually wrong.
Especially when passing such a result directly without further
checking may lead to bad issues.
Return a path containing just the '.' (dot) instead.
Change-Id: I86e1ab91e6610831fc05bd81776d278e9fe10105
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
And implement it for the direct access docker case.
Change-Id: I5c91402630a5b010fdbcaab96c435f66a36f2e3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.
At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.
Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Makes it a bit clearer that there's no magic path use or similar
beyond this point.
Change-Id: I86c06850d16bf777db05ad23b540d8096926c059
Reviewed-by: David Schulz <david.schulz@qt.io>
And implement it locally and for docker.
Change-Id: I362f4cae95560836d9300473a286429eb4569329
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Currently only used inside DockerDevice and it fails to build
when building sdktool with old Qt which is still necessary.
Change-Id: Ic48414f0cb8f0955e7561f7484e3ea1c726c816a
Reviewed-by: hjk <hjk@qt.io>
This now rather central class deserves a suitably named file(pair).
The rarer used declarations including otherwise not needed includes are
still in fileutils.h.
Change-Id: Ib18d72f16322c03f76023fdefcd5f6da35311b8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>