diff --git a/StandardPaths.cpp b/StandardPaths.cpp index 7ad6266..29ec601 100755 --- a/StandardPaths.cpp +++ b/StandardPaths.cpp @@ -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 +} diff --git a/StandardPaths.h b/StandardPaths.h index b185aeb..b870d76 100755 --- a/StandardPaths.h +++ b/StandardPaths.h @@ -19,24 +19,24 @@ #ifndef STANDARDPATHS_H #define STANDARDPATHS_H +#include #if QT_VERSION >= 0x050000 #include -#include +#include class StandardPaths : public QStandardPaths { public: - StandardPaths(); + static QString writableLocation(StandardLocation type); }; #else #include -#include +#include class StandardPaths : public QDesktopServices { public: - StandardPaths(); - static QString writableLocation(QDesktopServices::StandardLocation standardLocation); + static QString writableLocation(StandardLocation type); }; #endif