diff options
Diffstat (limited to 'compat')
-rw-r--r-- | compat/base-path.cpp | 10 | ||||
-rw-r--r-- | compat/base-path.hpp | 9 | ||||
-rw-r--r-- | compat/util.hpp | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/compat/base-path.cpp b/compat/base-path.cpp new file mode 100644 index 00000000..3285bac8 --- /dev/null +++ b/compat/base-path.cpp @@ -0,0 +1,10 @@ +#include "base-path.hpp" +#include <QCoreApplication> + +OTR_COMPAT_EXPORT +never_inline +const QString& application_base_path() +{ + static QString const& const_path = QCoreApplication::applicationDirPath(); + return const_path; +} diff --git a/compat/base-path.hpp b/compat/base-path.hpp new file mode 100644 index 00000000..3dbf2a3f --- /dev/null +++ b/compat/base-path.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "macros.hpp" +#include <QString> +#include "export.hpp" + +OTR_COMPAT_EXPORT +never_inline +const QString& application_base_path(); diff --git a/compat/util.hpp b/compat/util.hpp index 811f2c1d..cd0dbdef 100644 --- a/compat/util.hpp +++ b/compat/util.hpp @@ -1,5 +1,6 @@ #pragma once +#include "opentrack-library-path.h" #include "ndebug-guard.hpp" #include "run-in-thread.hpp" #include "meta.hpp" |