Commit e336cb9c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: reinventing the wheel is always a good solution.

parent 953140e5
...@@ -25,18 +25,9 @@ ...@@ -25,18 +25,9 @@
#define _QT_DIR_H_ #define _QT_DIR_H_
#include <QString> #include <QString>
/* Replace separators on Windows because Qt is always using / */ #include <QDir>
static inline QString toNativeSeparators( QString s )
{ #define toNativeSeparators( s ) QDir::toNativeSeparators ( s )
#ifdef WIN32
for (int i=0; i<(int)s.length(); i++)
{
if (s[i] == QLatin1Char('/'))
s[i] = QLatin1Char('\\');
}
#endif
return s;
}
static inline QString removeTrailingSlash( QString s ) static inline QString removeTrailingSlash( QString s )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment