aboutsummaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorLeifa <26681464+TrickyLeifa@users.noreply.github.com>2024-07-06 18:05:48 +0200
committerGitHub <noreply@github.com>2024-07-06 18:05:48 +0200
commit03025119c4a7316e83f5336756d3afc9d1ff82b1 (patch)
tree72661dd1ec0c1149e3fcf5641bc92c14cd2fae71 /src/widgets
parenta1e13f62fd47f09dc973e7c36987e161ecb19cdf (diff)
Improve OS detection and add APPIMAGE support to pathing code (#1003)
* Added get_app_path, tweaked pathing to adjust itself for Linux, ... * Added get_app_path * This should be used instead of QCoreApplication::applicationDirPath() * Tweaked pathing to adjust itself for Linux * Append separator to base path * Moved headers where they are needed. (Dunno why they were here.) * Proper pathing for AppImage
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/aooptionsdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/aooptionsdialog.cpp b/src/widgets/aooptionsdialog.cpp
index a0b7d7ce..4d55652e 100644
--- a/src/widgets/aooptionsdialog.cpp
+++ b/src/widgets/aooptionsdialog.cpp
@@ -436,12 +436,12 @@ void AOOptionsDialog::setupUI()
FROM_UI(QPushButton, mount_add);
connect(ui_mount_add, &QPushButton::clicked, this, [this] {
- QString path = QFileDialog::getExistingDirectory(this, tr("Select a base folder"), QApplication::applicationDirPath(), QFileDialog::ShowDirsOnly);
+ QString path = QFileDialog::getExistingDirectory(this, tr("Select a base folder"), get_app_path(), QFileDialog::ShowDirsOnly);
if (path.isEmpty())
{
return;
}
- QDir dir(QApplication::applicationDirPath());
+ QDir dir(get_app_path());
QString relative = dir.relativeFilePath(path);
if (!relative.contains("../"))
{