]> git.sesse.net Git - vlc/commitdiff
Qt: reinventing the wheel is always a good solution.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 21 Jun 2009 02:03:26 +0000 (04:03 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 21 Jun 2009 12:34:50 +0000 (14:34 +0200)
modules/gui/qt4/util/qt_dirs.hpp

index 5abb7d02e9e3f89a721f2e1b6201cc21868795a5..08cad1cae7c9d9900bf2f31599268db12cd0250e 100644 (file)
 #define _QT_DIR_H_
 
 #include <QString>
-/* Replace separators on Windows because Qt is always using / */
-static inline QString toNativeSeparators( QString s )
-{
-#ifdef WIN32
-    for (int i=0; i<(int)s.length(); i++)
-    {
-        if (s[i] == QLatin1Char('/'))
-            s[i] = QLatin1Char('\\');
-    }
-#endif
-    return s;
-}
+#include <QDir>
+
+#define toNativeSeparators( s ) QDir::toNativeSeparators ( s )
 
 static inline QString removeTrailingSlash( QString s )
 {