Commit fa434051 authored by Frederik Schwarzer's avatar Frederik Schwarzer

QStandardPaths::DataLocation is deprecated.

parent c4e3660c
......@@ -120,7 +120,7 @@ void MainWindow::save() const {
void MainWindow::setupThemes() {
QStringList themercs;
const QStringList themeDirs = QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("themes"), QStandardPaths::LocateDirectory);
const QStringList themeDirs = QStandardPaths::locateAll(QStandardPaths::AppDataLocation, QStringLiteral("themes"), QStandardPaths::LocateDirectory);
Q_FOREACH (const QString &themeDir, themeDirs) {
const QStringList entries = QDir(themeDir).entryList(QDir::Dirs);
Q_FOREACH(const QString &d, entries) {
......@@ -161,7 +161,7 @@ void MainWindow::readConfig() {
if (!wins.isEmpty()) {
bool ok;
updateWins(wins.toUInt(&ok));
}
const QString losses = lastGroup.readEntry("Losses", QString());
if (!losses.isEmpty()) {
......@@ -283,7 +283,7 @@ void MainWindow::slotNewGame() {
m_game = new Game(dimension, m_lastGame, Kg::difficultyLevel(),
m_playbackSpeed, m_aiFactory);
} else {
m_game = new Game(dimension, m_computerStarts ? O : X,
m_game = new Game(dimension, m_computerStarts ? O : X,
Kg::difficultyLevel(), NotDemo, m_playbackSpeed,
m_aiFactory);
}
......
......@@ -35,10 +35,10 @@ namespace gui {
Theme::Theme() {
}
Theme::Theme(const QString& path, const int id)
Theme::Theme(const QString& path, const int id)
: m_id(id), m_path(path) {
QString themePath = QStringLiteral("themes/%1/").arg(m_path);
themePath = QStandardPaths::locate(QStandardPaths::DataLocation, themePath, QStandardPaths::LocateDirectory);
themePath = QStandardPaths::locate(QStandardPaths::AppDataLocation, themePath, QStandardPaths::LocateDirectory);
QString themerc = themePath + QLatin1String("themerc");
KDesktopFile themeConfig(themerc);
m_name = themeConfig.readName();
......@@ -58,7 +58,7 @@ Theme::Theme(const QString& path, const int id)
} else if (gridTypeStr == QLatin1String("squares")) {
m_gridType = SquaresGrid;
}
m_svg = themePath + configGroup.readEntry("Svg", "theme.svg");
}
......
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