diff options
Diffstat (limited to 'addon/doxywizard/inputstring.cpp')
-rw-r--r-- | addon/doxywizard/inputstring.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp index 5c0f2c9..ac76342 100644 --- a/addon/doxywizard/inputstring.cpp +++ b/addon/doxywizard/inputstring.cpp @@ -13,6 +13,7 @@ #include "inputstring.h" #include "helplabel.h" #include "doxywizard.h" +#include "config_msg.h" #include "config.h" #include <QComboBox> @@ -130,7 +131,7 @@ void InputString::updateDefault() { if (m_str==m_default || !m_lab->isEnabled()) { - m_lab->setText(QString::fromLatin1("<qt>")+m_id+QString::fromLatin1("</qt")); + m_lab->setText(QString::fromLatin1("<qt>")+m_id+QString::fromLatin1("</qt>")); } else { @@ -253,3 +254,22 @@ void InputString::writeValue(QTextStream &t,QTextCodec *codec) writeStringValue(t,codec,m_str); } +bool InputString::isDefault() +{ + return m_str == m_default; +} + +QString InputString::checkEnumVal(const QString &value) +{ + QString val = value.trimmed().toLower(); + QStringList::Iterator it; + for ( it= m_values.begin(); it != m_values.end(); ++it ) + { + QString enumVal = *it; + if (enumVal.toLower() == val) return enumVal; + } + + config_warn("argument '%s' for option %s is not a valid enum value." + " Using the default: %s!",qPrintable(value),qPrintable(m_id),qPrintable(m_default)); + return m_default; +} |