StandardPaths Qt5 compile bug fixed

This commit is contained in:
Rafael 2016-03-28 12:30:03 +02:00
parent bfa84a5e99
commit ad1f3761ef
2 changed files with 11 additions and 13 deletions

View File

@ -18,14 +18,12 @@
#include "StandardPaths.h" #include "StandardPaths.h"
StandardPaths::StandardPaths() QString StandardPaths::writableLocation(StandardLocation type)
{ {
#if QT_VERSION >= 0x050000
return QStandardPaths::writableLocation(type);
#else
} return QDesktopServices::storageLocation(type);
#ifndef QT5_MODE
QString StandardPaths::writableLocation(QDesktopServices::StandardLocation standardLocation)
{
return QDesktopServices::storageLocation(standardLocation);
}
#endif #endif
}

View File

@ -19,24 +19,24 @@
#ifndef STANDARDPATHS_H #ifndef STANDARDPATHS_H
#define STANDARDPATHS_H #define STANDARDPATHS_H
#include <QtGlobal>
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
#include <QStandardPaths> #include <QStandardPaths>
#include <QObject> #include <QString>
class StandardPaths : public QStandardPaths class StandardPaths : public QStandardPaths
{ {
public: public:
StandardPaths(); static QString writableLocation(StandardLocation type);
}; };
#else #else
#include <QDesktopServices> #include <QDesktopServices>
#include <QObject> #include <QString>
class StandardPaths : public QDesktopServices class StandardPaths : public QDesktopServices
{ {
public: public:
StandardPaths(); static QString writableLocation(StandardLocation type);
static QString writableLocation(QDesktopServices::StandardLocation standardLocation);
}; };
#endif #endif