src/configuration.h

changeset 845
fec7023e91a7
parent 844
11587d419d2f
child 848
68410477c8bb
--- a/src/configuration.h	Wed Jul 16 15:00:41 2014 +0300
+++ b/src/configuration.h	Wed Jul 16 18:57:48 2014 +0300
@@ -25,21 +25,12 @@
 
 class QSettings;
 
-#define CFGENTRY(T, NAME, DEFAULT) \
-	namespace cfg \
-	{ \
-		ConfigEntry::T##Type NAME; \
-		T##ConfigEntry config_##NAME (&NAME, #NAME, DEFAULT); \
-	}
-
-#define EXTERN_CFGENTRY(T, NAME) \
-	namespace cfg \
-	{ \
-		extern ConfigEntry::T##Type NAME; \
-	}
+#define CFGENTRY(T, NAME, DEFAULT) namespace cfg { ConfigEntry::T##Type NAME; }
+#define EXTERN_CFGENTRY(T, NAME) namespace cfg { extern ConfigEntry::T##Type NAME; }
 
 namespace Config
 {
+	void init();
 	bool load();
 	bool save();
 	void reset();
@@ -80,10 +71,6 @@
 	virtual void		loadFromVariant (const QVariant& val) = 0;
 	virtual void		resetValue() = 0;
 	virtual QVariant	toVariant() const = 0;
-
-
-protected:
-	static void addToArray (ConfigEntry* ptr);
 };
 
 // =============================================================================
@@ -96,7 +83,6 @@
 		m_valueptr (valueptr),														\
 		m_default (def)																\
 	{																				\
-		ConfigEntry::addToArray (this);												\
 		*m_valueptr = def;															\
 	}																				\
 																					\

mercurial