summaryrefslogtreecommitdiffhomepage
path: root/compat/base-path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/base-path.cpp')
-rw-r--r--compat/base-path.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/compat/base-path.cpp b/compat/base-path.cpp
new file mode 100644
index 00000000..2a26dcff
--- /dev/null
+++ b/compat/base-path.cpp
@@ -0,0 +1,12 @@
+#undef NDEBUG
+#include <cassert>
+
+#include "base-path.hpp"
+#include <QCoreApplication>
+
+const QString& application_base_path()
+{
+ assert(qApp && "logic error");
+ static QString path = QCoreApplication::applicationDirPath();
+ return path;
+}