aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpplistwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop/qmpplistwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpplistwindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpplistwindow.cpp b/qmidiplayer-desktop/qmpplistwindow.cpp
index 667682e..b4b0c02 100644
--- a/qmidiplayer-desktop/qmpplistwindow.cpp
+++ b/qmidiplayer-desktop/qmpplistwindow.cpp
@@ -6,6 +6,7 @@
#include <QSettings>
#include <QUrl>
#include <QMimeData>
+#include <QStandardPaths>
#include "qmpplistwindow.hpp"
#include "ui_qmpplistwindow.h"
#include "qmpmainwindow.hpp"
@@ -24,7 +25,7 @@ qmpPlistWindow::qmpPlistWindow(QWidget *parent) :
repeat=0;shuffle=0;
if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/RestorePlaylist","").toInt())
{
- QSettings* plist=new QSettings(QDir::homePath()+QString("/.config/qmpplist"),
+ QSettings* plist=new QSettings(QStandardPaths::writableLocation(QStandardPaths::StandardLocation::ConfigLocation)+QString("/qmpplist"),
QSettings::IniFormat);
int fc=plist->value("Playlist/FileCount",0).toInt();
ui->lwFiles->clear();for(int i=1;i<=fc;++i)
@@ -113,7 +114,7 @@ void qmpPlistWindow::closeEvent(QCloseEvent *event)
}
if(qmpMainWindow::getInstance()->isFinalizing()&&qmpSettingsWindow::getSettingsIntf()->value("Behavior/RestorePlaylist","").toInt())
{
- QSettings* plist=new QSettings(QDir::homePath()+QString("/.config/qmpplist"),
+ QSettings* plist=new QSettings(QStandardPaths::writableLocation(QStandardPaths::StandardLocation::ConfigLocation)+QString("/qmpplist"),
QSettings::IniFormat);
plist->setValue("Playlist/FileCount",ui->lwFiles->count());
for(int i=0;i<ui->lwFiles->count();++i)