Commit 1360e56d authored by Frederik Schwarzer's avatar Frederik Schwarzer

QStandardPaths::DataLocation is deprecated.

parent 124847fc
......@@ -84,7 +84,7 @@ void ChooseLevelSetDialog::loadData()
{
m_ui.m_lwLevelSets->clear();
QStringList fileList;
const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("levels"), QStandardPaths::LocateDirectory);
const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::AppDataLocation, QStringLiteral("levels"), QStandardPaths::LocateDirectory);
Q_FOREACH (const QString& dir, dirs) {
const QStringList fileNames = QDir(dir).entryList(QStringList() << QStringLiteral("*.dat"));
Q_FOREACH (const QString& file, fileNames) {
......
......@@ -28,7 +28,7 @@ KAtomicHighscores::KAtomicHighscores()
KUser user;
m_playerName = user.property(KUser::FullName).toString().isEmpty() ? user.loginName() : user.property(KUser::FullName).toString();
m_hsFile = KSharedConfig::openConfig( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "highscores", KConfig::SimpleConfig);
m_hsFile = KSharedConfig::openConfig( QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1Char('/') + "highscores", KConfig::SimpleConfig);
}
bool KAtomicHighscores::addScore( int numMoves, const QString& levelSetName, int level )
......
......@@ -100,7 +100,7 @@ void LevelSet::reset()
bool LevelSet::load(const QString& levelSetName)
{
QString file = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("levels/%1.dat").arg(levelSetName));
QString file = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("levels/%1.dat").arg(levelSetName));
if (file.isEmpty())
{
qDebug() << "level set \"" << levelSetName << "\" data file not found. Check your installation";
......@@ -288,7 +288,7 @@ const Molecule* LevelSet::readLevelMolecule(int levelNum) const
bool LevelSet::isDefaultLevelsAvailable()
{
QString file = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("levels/%1.dat").arg(DEFAULT_LEVELSET_NAME));
QString file = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("levels/%1.dat").arg(DEFAULT_LEVELSET_NAME));
if (file.isEmpty())
{
//qDebug() << "default level set \"" << DEFAULT_LEVELSET_NAME << "\" data file not found. Check your installation";
......
......@@ -45,7 +45,7 @@ struct Theme : public KgTheme
{
Theme() : KgTheme("pics/default_theme.desktop")
{
setGraphicsPath(QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("pics/default_theme.svgz")));
setGraphicsPath(QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("pics/default_theme.svgz")));
}
};
......
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