From ad1f3761ef08e27e1a7653fa3209fbc8b04af51e Mon Sep 17 00:00:00 2001 From: Rafael Date: Mon, 28 Mar 2016 12:30:03 +0200 Subject: [PATCH] StandardPaths Qt5 compile bug fixed --- StandardPaths.cpp | 14 ++++++-------- StandardPaths.h | 10 +++++----- 2 files changed, 11 insertions(+), 13 deletions(-) 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