blob: ac8db6af53deb662970bb0bd666eb899efa7b506 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--- src/ui/mainwindow.cpp.orig 2020-10-25 12:05:30 UTC
+++ src/ui/mainwindow.cpp
@@ -48,6 +48,8 @@
#include <QDebug>
#include <QUrl>
+#define DATA_PATH "%%DATADIR%%"
+
MainWindow::MainWindow(QWidget *parent, const QStringList& fileList) :
QMainWindow(parent),
ui(new Ui::MainWindow),
@@ -673,7 +675,9 @@ int MainWindow::get_poweroff_behavior()
bool MainWindow::load_presets()
{
// The default preset file is located in <datapath>/presets.xml
- QString default_preset_file = QDir(Paths::dataPath()).absoluteFilePath("presets.xml");
+ //QString default_preset_file = QDir(Paths::dataPath()).absoluteFilePath("presets.xml");
+ QString app_path = QString(DATA_PATH);
+ QString default_preset_file = QDir(app_path).absoluteFilePath("presets.xml");
QString local_preset_file;
if (!Constants::getBool("Portable")) { // non-portable app
|