Commit ad00c559 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use not deprecated enum

parent ab06b824
Pipeline #131948 passed with stage
in 52 seconds
......@@ -37,7 +37,7 @@ public:
}
QString imageDirectory() const
{
return QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + QStringLiteral("images") + QLatin1Char('/');
return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + QLatin1Char('/') + QStringLiteral("images") + QLatin1Char('/');
}
QString m_name;
......
......@@ -21,7 +21,7 @@ using namespace LearnerProfile;
Storage::Storage(QObject *parent)
: QObject(parent)
, m_databasePath(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "learnerdata.db")
, m_databasePath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + QLatin1Char('/') + "learnerdata.db")
, m_errorMessage(QString())
{
}
......@@ -515,9 +515,9 @@ QSqlDatabase Storage::database()
}
// create data directory if it does not exist
QDir dir = QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
QDir dir = QDir(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation));
if (!dir.exists()) {
dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation));
}
qCDebug(LIBLEARNER_LOG) << "Database path: " << m_databasePath;
......
......@@ -13,7 +13,7 @@
#include <QStandardPaths>
ResourceRepository::ResourceRepository()
: ResourceRepository(QUrl::fromLocalFile(QStandardPaths::standardLocations(QStandardPaths::DataLocation).constFirst() + QStringLiteral("/courses/")))
: ResourceRepository(QUrl::fromLocalFile(QStandardPaths::standardLocations(QStandardPaths::AppLocalDataLocation).constFirst() + QStringLiteral("/courses/")))
{
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment