[PATCH] Use QDir::currentPath to get the current directory
Miika Turkia
miika.turkia at gmail.com
Sun Oct 13 08:43:13 UTC 2013
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.
---
qt-gui.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qt-gui.cpp b/qt-gui.cpp
index 8a27b6e..8d67890 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();
--
1.8.1.2
More information about the subsurface
mailing list