diff --git a/src/mirall/mirallconfigfile.cpp b/src/mirall/mirallconfigfile.cpp index a5474644d..8988a05fa 100644 --- a/src/mirall/mirallconfigfile.cpp +++ b/src/mirall/mirallconfigfile.cpp @@ -25,6 +25,7 @@ #ifndef TOKEN_AUTH_ONLY #include #include +#include #endif #include @@ -183,9 +184,13 @@ QVariant MirallConfigFile::getPolicySetting(const QString &setting, const QVaria QString MirallConfigFile::configPath() const { + #ifndef TOKEN_AUTH_ONLY if( _confDir.isEmpty() ) { - _confDir = Utility::dataLocation(); + // Qt 5's QStandardPaths::writableLocation gives us wrong results (without /data/), + // so we'll have to use the deprecated version for now + _confDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation); } + #endif QString dir = _confDir; if( !dir.endsWith(QLatin1Char('/')) ) dir.append(QLatin1Char('/')); diff --git a/src/mirall/utility.cpp b/src/mirall/utility.cpp index 497376ad6..055abd721 100644 --- a/src/mirall/utility.cpp +++ b/src/mirall/utility.cpp @@ -237,17 +237,6 @@ QString Utility::escape(const QString &in) #endif } -QString Utility::dataLocation() -{ - // Qt 5's QStandardPaths::writableLocation gives us wrong results (without /data/), - // so we'll have to use the deprecated version for now -#ifndef TOKEN_AUTH_ONLY - return QDesktopServices::storageLocation(QDesktopServices::DataLocation); -#else - return QString(); -#endif -} - #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) // In Qt 4, QThread::sleep functions are protected. // This is a hack to make them visible in this namespace. diff --git a/src/mirall/utility.h b/src/mirall/utility.h index 0ff9ac906..864a5bf43 100644 --- a/src/mirall/utility.h +++ b/src/mirall/utility.h @@ -55,7 +55,6 @@ namespace Utility // porting methods OWNCLOUDSYNC_EXPORT QString escape(const QString&); - OWNCLOUDSYNC_EXPORT QString dataLocation(); // conversion function QDateTime <-> time_t (because the ones builtin work on only unsigned 32bit) OWNCLOUDSYNC_EXPORT QDateTime qDateTimeFromTime_t(qint64 t);