Commit fa434051 authored by Frederik Schwarzer's avatar Frederik Schwarzer

QStandardPaths::DataLocation is deprecated.

parent c4e3660c
...@@ -120,7 +120,7 @@ void MainWindow::save() const { ...@@ -120,7 +120,7 @@ void MainWindow::save() const {
void MainWindow::setupThemes() { void MainWindow::setupThemes() {
QStringList themercs; 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) { Q_FOREACH (const QString &themeDir, themeDirs) {
const QStringList entries = QDir(themeDir).entryList(QDir::Dirs); const QStringList entries = QDir(themeDir).entryList(QDir::Dirs);
Q_FOREACH(const QString &d, entries) { Q_FOREACH(const QString &d, entries) {
......
...@@ -38,7 +38,7 @@ Theme::Theme() { ...@@ -38,7 +38,7 @@ Theme::Theme() {
Theme::Theme(const QString& path, const int id) Theme::Theme(const QString& path, const int id)
: m_id(id), m_path(path) { : m_id(id), m_path(path) {
QString themePath = QStringLiteral("themes/%1/").arg(m_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"); QString themerc = themePath + QLatin1String("themerc");
KDesktopFile themeConfig(themerc); KDesktopFile themeConfig(themerc);
m_name = themeConfig.readName(); m_name = themeConfig.readName();
......
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