summaryrefslogtreecommitdiffstats
path: root/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h
index 5869add..5bd4209 100644
--- a/src/config.h
+++ b/src/config.h
@@ -25,7 +25,8 @@ class ConfigOption
O_Enum, //<! A fixed set of items
O_String, //<! A single item
O_Int, //<! An integer value
- O_Bool //<! A boolean value
+ O_Bool, //<! A boolean value
+ O_Obsolete //<! An obsolete option
};
enum
{
@@ -309,6 +310,18 @@ class ConfigBool : public ConfigOption
QCString m_valueString;
};
+/*! \brief Section marker for obsolete options
+ *
+ */
+class ConfigObsolete : public ConfigOption
+{
+ public:
+ ConfigObsolete(OptionType t) : ConfigOption(t) {}
+ void writeTemplate(QTextStream &,bool,bool) {}
+ void substEnvVars() {}
+};
+
+
// some convenience macros
#define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val)
#define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val)
@@ -479,6 +492,13 @@ class Config
m_dict->insert(name,result);
return result;
}
+ /*! Adds an option that has become obsolete. */
+ ConfigOption *addObsolete(const char *name)
+ {
+ ConfigObsolete *option = new ConfigObsolete(ConfigOption::O_Obsolete);
+ m_dict->insert(name,option);
+ return option;
+ }
/*! @} */
/*! Writes a template configuration file to \a f. If \a shortIndex