summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystementry_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-12 15:31:53 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-07-03 12:44:00 +0000
commitf2df5c64bde5a3837048347b18c246e674de5caa (patch)
tree5f18d27e55a2e1c6e2c7eb7f4bc7e7d07974a477 /src/corelib/io/qfilesystementry_p.h
parent00b8050d68c337f02713d3c353ded9de094eda79 (diff)
QFileSystemEntry: Export static helper function checking for the root path
This provides a helper function which does the check on the string. QFileInfo::isRoot() in addition checks for the existence of the directory, which can cause hangs with network drives. Use the new function in appropriate places in QtWidgets. Task-number: QTBUG-6039 Change-Id: I54d0d860713e82b28fa4069a5345b042337f9c52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystementry_p.h')
-rw-r--r--src/corelib/io/qfilesystementry_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystementry_p.h b/src/corelib/io/qfilesystementry_p.h
index 300a375377..700696d09e 100644
--- a/src/corelib/io/qfilesystementry_p.h
+++ b/src/corelib/io/qfilesystementry_p.h
@@ -94,6 +94,7 @@ public:
#if defined(Q_OS_WIN)
bool isDriveRoot() const;
+ static bool isDriveRootPath(const QString &path);
#endif
bool isRoot() const;
@@ -103,6 +104,8 @@ public:
*this = QFileSystemEntry();
}
+ Q_CORE_EXPORT static bool isRootPath(const QString &path);
+
private:
// creates the QString version out of the bytearray version
void resolveFilePath() const;