forked from qt-creator/qt-creator
Utils: Make path cleaning platform agnostic
Unfortunately, QDir::cleanPath() only cleans according to the rules of the host system, which can be wrong in remote setups. As the implementation is not accessible/tweakable from the outside, copy the relevant code and remove the platform #ifdef's. Change-Id: Ife9a925412a12d3cef21ed3721a387c61c152ddf Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -205,7 +205,10 @@ public:
|
||||
|
||||
[[nodiscard]] bool ensureReachable(const FilePath &other) const;
|
||||
|
||||
QString toFSPathString() const;
|
||||
[[nodiscard]] QString toFSPathString() const;
|
||||
|
||||
[[nodiscard]] static int rootLength(const QStringView path); // Assumes no scheme and host
|
||||
[[nodiscard]] static int schemeAndHostLength(const QStringView path);
|
||||
|
||||
private:
|
||||
friend class ::tst_fileutils;
|
||||
@@ -213,9 +216,6 @@ private:
|
||||
void setPath(QStringView path);
|
||||
void setFromString(const QString &filepath);
|
||||
|
||||
static int rootLength(const QStringView path);
|
||||
static int schemeAndHostLength(const QStringView path);
|
||||
|
||||
[[nodiscard]] QString mapToDevicePath() const;
|
||||
[[nodiscard]] QString encodedHost() const;
|
||||
|
||||
|
Reference in New Issue
Block a user