diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-20 21:24:40 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-20 23:24:17 +0200 |
commit | 88e4563455ca183e1b77364b73d5e6173af513d3 (patch) | |
tree | b63fcee5e953c876886cf6c2bdeaf2738ee0c795 /opentrack-compat/options.hpp | |
parent | 06b68ac493f06723d123db5fa23b8c0a86ca7f66 (diff) |
api, compat: backport exports fix
Diffstat (limited to 'opentrack-compat/options.hpp')
-rw-r--r-- | opentrack-compat/options.hpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/opentrack-compat/options.hpp b/opentrack-compat/options.hpp index a317a1f7..8485c167 100644 --- a/opentrack-compat/options.hpp +++ b/opentrack-compat/options.hpp @@ -37,11 +37,7 @@ #include <memory> -#ifdef BUILD_compat -# include "compat-export.hpp" -#else -# include "compat-import.hpp" -#endif +#include "export.hpp" template<typename t> using mem = std::shared_ptr<t>; @@ -131,7 +127,7 @@ namespace options { bool contains(const QString& name); void save(); bool modifiedp(); - + template<typename t> t get(const QString& name) { @@ -160,12 +156,12 @@ namespace options { pbundle bundle(const k& key); void bundle_decf(const k& key); }; - + OPENTRACK_COMPAT_EXPORT opt_singleton& singleton(); } - + using pbundle = std::shared_ptr<opt_bundle>; - + static inline pbundle bundle(const QString name) { return detail::singleton().bundle(name); } class OPENTRACK_COMPAT_EXPORT opt_bundle : public impl_bundle @@ -238,7 +234,7 @@ namespace options { private: t def; }; - + struct OPENTRACK_COMPAT_EXPORT opts { pbundle b; @@ -314,7 +310,7 @@ namespace options { lb->setText(v); base_value::connect(&v, SIGNAL(valueChanged(QString)), lb, SLOT(setText(QString)), v.SAFE_CONNTYPE); } - + template<> inline void tie_setting(value<int>& v, QTabWidget* t) { |