summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qdir.cpp10
-rw-r--r--src/corelib/io/qdir.h9
2 files changed, 10 insertions, 9 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index e202be154a..3e0174e383 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -1969,6 +1969,8 @@ QFileInfoList QDir::drives()
}
/*!
+ \fn QChar QDir::separator()
+
Returns the native directory separator: "/" under Unix
and "\\" under Windows.
@@ -1980,14 +1982,6 @@ QFileInfoList QDir::drives()
\sa listSeparator()
*/
-QChar QDir::separator()
-{
-#if defined(Q_OS_WIN)
- return QLatin1Char('\\');
-#else
- return QLatin1Char('/');
-#endif
-}
/*!
\fn QDir::listSeparator()
diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h
index f0dda73ebb..05adb688f8 100644
--- a/src/corelib/io/qdir.h
+++ b/src/corelib/io/qdir.h
@@ -239,7 +239,14 @@ public:
#endif
}
- static QChar separator(); // ### Qt6: Make it inline
+ static QChar separator()
+ {
+#if defined(Q_OS_WIN)
+ return QLatin1Char('\\');
+#else
+ return QLatin1Char('/');
+#endif
+ }
static bool setCurrent(const QString &path);
static inline QDir current() { return QDir(currentPath()); }