diff --git a/ground/openpilotgcs/src/libs/utils/pathutils.cpp b/ground/openpilotgcs/src/libs/utils/pathutils.cpp index 8ab1163f3..2f0b234b6 100644 --- a/ground/openpilotgcs/src/libs/utils/pathutils.cpp +++ b/ground/openpilotgcs/src/libs/utils/pathutils.cpp @@ -29,6 +29,7 @@ #include "xmlconfig.h" #include #include +#include namespace Utils { @@ -89,19 +90,7 @@ QString PathUtils::InsertDataPath(QString path) */ QString PathUtils::GetStoragePath() { - // This routine works with "/" as the standard: - // Work out where the settings are stored on the machine - QSettings set(XmlConfig::XmlSettingsFormat, QSettings::UserScope, QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS_config")); - QFileInfo f(set.fileName()); - QDir dir(f.absoluteDir()); - - const QString homeDirPath = dir.canonicalPath(); - QString storagePath = homeDirPath; - - storagePath += QLatin1Char('/'); - // storagePath += QLatin1String("OpenPilot"); - // storagePath += QLatin1Char('/'); - return storagePath; + return QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1Char('/'); } /**