summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfileinfo.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2019-08-29 16:22:53 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2019-08-30 13:20:07 +0200
commitca3be922349d5fa282578fbb6c1dc2bd25d1f5aa (patch)
treeff0be3de9093e606bc57edae305a2f3f564b9cc2 /src/corelib/io/qfileinfo.h
parentf00bbd5eb77d0d4669e0a15a277c3937c49ed813 (diff)
Remove QFileInfo::type and related enum from 5.14
The API is problematic for several reasons: - the mixing of flags and enum in a single enum type - the name "type" as somewhat overloaded - the ease of misuse when comparing the result rather than testing for a bit being set In light of this, focus for 5.14 on the new isShortcut and isSymbolicLink functions, thus migitating the problematic isSymLink which conflates the two concepts. Change-Id: I57e02321edd5061f69a775f04a0932ef89adf866 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/io/qfileinfo.h')
-rw-r--r--src/corelib/io/qfileinfo.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h
index 1cbeafdd4a..3ac028085a 100644
--- a/src/corelib/io/qfileinfo.h
+++ b/src/corelib/io/qfileinfo.h
@@ -66,20 +66,6 @@ public:
QFileInfo(const QFileInfo &fileinfo);
~QFileInfo();
- enum FileType {
- Unknown,
- // base type
- Regular,
- Directory,
- // indirection flag
- SymbolicLink = 0x10,
- Shortcut = 0x20,
- // mask
- FileTypeMask = 0x0f,
- LinkTypeMask = 0xf0
- };
- Q_DECLARE_FLAGS(FileTypes, FileType)
-
QFileInfo &operator=(const QFileInfo &fileinfo);
QFileInfo &operator=(QFileInfo &&other) noexcept { swap(other); return *this; }
@@ -125,8 +111,8 @@ public:
bool isFile() const;
bool isDir() const;
bool isSymLink() const;
- inline bool isSymbolicLink() const { return type() & SymbolicLink; }
- inline bool isShortcut() const { return type() & Shortcut; }
+ bool isSymbolicLink() const;
+ bool isShortcut() const;
bool isRoot() const;
bool isBundle() const;
@@ -145,7 +131,6 @@ public:
QFile::Permissions permissions() const;
qint64 size() const;
- FileTypes type() const;
// ### Qt6: inline these functions
#if QT_DEPRECATED_SINCE(5, 10)