forked from qt-creator/qt-creator
Utils: FsEngine micro-optimizations
Mostly for shorter code, but also save a few cycles due to less string construction and run time dispatch. Also, make testFilePathFromToString() test two paths instead one path twice. Change-Id: I50a3145bca1a4b262a15e96173ea7ebd9cb678ad Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -223,15 +223,10 @@ public:
|
||||
[[nodiscard]] static FilePath fromFileInfo(const QFileInfo &info);
|
||||
|
||||
// Support for FSEngine. Do not use unless needed.
|
||||
enum class SpecialPathComponent {
|
||||
RootName,
|
||||
RootPath,
|
||||
DeviceRootName,
|
||||
DeviceRootPath,
|
||||
};
|
||||
|
||||
[[nodiscard]] static QString specialPath(SpecialPathComponent component);
|
||||
[[nodiscard]] static FilePath specialFilePath(SpecialPathComponent component);
|
||||
[[nodiscard]] static const QString &specialRootName();
|
||||
[[nodiscard]] static const QString &specialRootPath();
|
||||
[[nodiscard]] static const QString &specialDeviceRootName();
|
||||
[[nodiscard]] static const QString &specialDeviceRootPath();
|
||||
|
||||
[[nodiscard]] bool ensureReachable(const FilePath &other) const;
|
||||
|
||||
|
Reference in New Issue
Block a user