summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-09 15:05:35 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-10 03:18:57 +0100
commitaf2dcca279e6fc23c9b1694170cbdfe36b32eb79 (patch)
treea1d5cf6e77735e40138932705a0cc7287f6c5c73 /logic
parent5ad2275e0e50be8a4e9f506fb3f8dab2b02d0420 (diff)
logic, cv: fix header namespace pollution
We've had "using namespace options;" in headers for a while now.
Diffstat (limited to 'logic')
-rw-r--r--logic/main-settings.hpp11
-rw-r--r--logic/mappings.hpp1
-rw-r--r--logic/shortcuts.h6
-rw-r--r--logic/state.hpp1
4 files changed, 16 insertions, 3 deletions
diff --git a/logic/main-settings.hpp b/logic/main-settings.hpp
index fd3384eb..3ea68bca 100644
--- a/logic/main-settings.hpp
+++ b/logic/main-settings.hpp
@@ -10,12 +10,15 @@
#include <QString>
#include "options/options.hpp"
-using namespace options;
#include "api/plugin-api.hpp"
#include "spline/axis-opts.hpp"
#include "export.hpp"
+namespace main_settings_impl {
+
+using namespace options;
+
struct OTR_LOGIC_EXPORT key_opts
{
value<QString> keycode, guid;
@@ -58,3 +61,9 @@ struct OTR_LOGIC_EXPORT main_settings final
main_settings();
};
+
+} // ns main_settings_impl
+
+using main_settings_impl::key_opts;
+using main_settings_impl::module_settings;
+using main_settings_impl::main_settings;
diff --git a/logic/mappings.hpp b/logic/mappings.hpp
index 834e969e..7bb5f9af 100644
--- a/logic/mappings.hpp
+++ b/logic/mappings.hpp
@@ -9,7 +9,6 @@
#include "export.hpp"
#include "options/options.hpp"
-using namespace options;
#include "spline/spline.hpp"
#include "main-settings.hpp"
diff --git a/logic/shortcuts.h b/logic/shortcuts.h
index 6f69aba9..457c0d8e 100644
--- a/logic/shortcuts.h
+++ b/logic/shortcuts.h
@@ -25,6 +25,8 @@
#include <vector>
#include <functional>
+namespace shortcuts_impl {
+
using namespace options;
class OTR_LOGIC_EXPORT Shortcuts final : public QObject
@@ -61,3 +63,7 @@ private:
void free_binding(K& key);
void bind_shortcut(K &key, const key_opts& k, bool held);
};
+
+} // ns shortcuts_impl
+
+using shortcuts_impl::Shortcuts;
diff --git a/logic/state.hpp b/logic/state.hpp
index fb9587bf..25205524 100644
--- a/logic/state.hpp
+++ b/logic/state.hpp
@@ -9,7 +9,6 @@
#pragma once
#include "options/options.hpp"
-using namespace options;
#include "api/plugin-support.hpp"
#include "main-settings.hpp"
#include "mappings.hpp"