diff options
Diffstat (limited to 'src/corelib/io/qdir.h')
-rw-r--r-- | src/corelib/io/qdir.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h index e622011f98..ab3a331229 100644 --- a/src/corelib/io/qdir.h +++ b/src/corelib/io/qdir.h @@ -101,11 +101,10 @@ public: QDir &operator=(const QDir &); QDir &operator=(const QString &path); #ifdef Q_COMPILER_RVALUE_REFS - inline QDir &operator=(QDir &&other) - { qSwap(d_ptr, other.d_ptr); return *this; } + QDir &operator=(QDir &&other) Q_DECL_NOTHROW { swap(other); return *this; } #endif - inline void swap(QDir &other) + void swap(QDir &other) Q_DECL_NOTHROW { qSwap(d_ptr, other.d_ptr); } void setPath(const QString &path); @@ -177,7 +176,16 @@ public: static QFileInfoList drives(); - static QChar separator(); + Q_DECL_CONSTEXPR static inline QChar listSeparator() Q_DECL_NOTHROW + { +#if defined(Q_OS_WIN) + return QLatin1Char(';'); +#else + return QLatin1Char(':'); +#endif + } + + static QChar separator(); // ### Qt6: Make it inline static bool setCurrent(const QString &path); static inline QDir current() { return QDir(currentPath()); } |