StandardPaths Qt5 compile bug fixed
This commit is contained in:
parent
bfa84a5e99
commit
ad1f3761ef
2 changed files with 11 additions and 13 deletions
|
@ -18,14 +18,12 @@
|
|||
|
||||
#include "StandardPaths.h"
|
||||
|
||||
StandardPaths::StandardPaths()
|
||||
QString StandardPaths::writableLocation(StandardLocation type)
|
||||
{
|
||||
#if QT_VERSION >= 0x050000
|
||||
return QStandardPaths::writableLocation(type);
|
||||
#else
|
||||
|
||||
}
|
||||
|
||||
#ifndef QT5_MODE
|
||||
QString StandardPaths::writableLocation(QDesktopServices::StandardLocation standardLocation)
|
||||
{
|
||||
return QDesktopServices::storageLocation(standardLocation);
|
||||
}
|
||||
return QDesktopServices::storageLocation(type);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -19,24 +19,24 @@
|
|||
#ifndef STANDARDPATHS_H
|
||||
#define STANDARDPATHS_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QStandardPaths>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
class StandardPaths : public QStandardPaths
|
||||
{
|
||||
public:
|
||||
StandardPaths();
|
||||
static QString writableLocation(StandardLocation type);
|
||||
};
|
||||
#else
|
||||
#include <QDesktopServices>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
class StandardPaths : public QDesktopServices
|
||||
{
|
||||
public:
|
||||
StandardPaths();
|
||||
static QString writableLocation(QDesktopServices::StandardLocation standardLocation);
|
||||
static QString writableLocation(StandardLocation type);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue