From 39d7ae5f3a09b90865adaca78ffcf085cd557464 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 13 Oct 2013 18:43:13 +0300 Subject: [PATCH] Use QDir::currentPath to get the current directory applicationDirPath() does not find the source directory (if build directory differs from source directory). Using currentPath() allows one to still run built Subsurface from the source directory and find e.g. xslt_path. Signed-off-by: Dirk Hohndel --- qt-gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-gui.cpp b/qt-gui.cpp index 8a27b6eb2..8d678909e 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -390,7 +390,7 @@ QString getSubsurfaceDataPath(QString folderToFind) // first check if we are running in the build dir, so this // is just subdirectory of the current directory - execdir = QCoreApplication::applicationDirPath(); + execdir = QDir::currentPath(); folder = QDir(execdir.append(QDir::separator()).append(folderToFind)); if (folder.exists()) return folder.absolutePath();