diff options
Diffstat (limited to 'addon')
-rwxr-xr-x | addon/doxywizard/doxywizard.cpp | 2 | ||||
-rw-r--r-- | addon/doxywizard/expert.cpp | 5 | ||||
-rw-r--r-- | addon/doxywizard/input.h | 1 | ||||
-rw-r--r-- | addon/doxywizard/inputstring.h | 1 | ||||
-rw-r--r-- | addon/doxywizard/inputstrlist.cpp | 8 | ||||
-rw-r--r-- | addon/doxywizard/inputstrlist.h | 1 |
6 files changed, 15 insertions, 3 deletions
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 492912b..4e0d1aa 100755 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -267,7 +267,7 @@ void MainWindow::saveConfig(const QString &fileName) { if (fileName.isEmpty()) return; QFile f(fileName); - if (!f.open(QIODevice::WriteOnly)) + if (!f.open(QIODevice::WriteOnly | QIODevice::Text )) { QMessageBox::warning(this, tr("Error saving"), diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp index 66a0955..44dea78 100644 --- a/addon/doxywizard/expert.cpp +++ b/addon/doxywizard/expert.cpp @@ -765,9 +765,10 @@ void Expert::saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec, t << convertToComment(option->templateDocs()); t << endl; } - t << name.leftJustified(MAX_OPTION_LENGTH) << "= "; - if (option) + t << name.leftJustified(MAX_OPTION_LENGTH) << "="; + if (option && !option->isEmpty()) { + t << " "; option->writeValue(t,codec); } t << endl; diff --git a/addon/doxywizard/input.h b/addon/doxywizard/input.h index 9e0a1bf..5d86cc8 100644 --- a/addon/doxywizard/input.h +++ b/addon/doxywizard/input.h @@ -30,6 +30,7 @@ class Input virtual void reset() = 0; virtual void writeValue(QTextStream &t,QTextCodec *codec) = 0; virtual void setTemplateDocs(const QString &docs) = 0; + virtual bool isEmpty() { return false; }; }; diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h index dba31f6..6234256 100644 --- a/addon/doxywizard/inputstring.h +++ b/addon/doxywizard/inputstring.h @@ -60,6 +60,7 @@ class InputString : public QObject, public Input void updateDependencies() {} void writeValue(QTextStream &t,QTextCodec *codec); void setTemplateDocs(const QString &docs) { m_tdocs = docs; } + bool isEmpty() { return m_str.isEmpty(); } public slots: void reset(); diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp index 660ce40..822bc4c 100644 --- a/addon/doxywizard/inputstrlist.cpp +++ b/addon/doxywizard/inputstrlist.cpp @@ -260,3 +260,11 @@ void InputStrList::writeValue(QTextStream &t,QTextCodec *codec) } } +bool InputStrList::isEmpty() +{ + foreach (QString s, m_strList) + { + if (!s.isEmpty()) return false; + } + return true; +} diff --git a/addon/doxywizard/inputstrlist.h b/addon/doxywizard/inputstrlist.h index 53f3bcc..c374092 100644 --- a/addon/doxywizard/inputstrlist.h +++ b/addon/doxywizard/inputstrlist.h @@ -55,6 +55,7 @@ class InputStrList : public QObject, public Input void updateDependencies() {} void writeValue(QTextStream &t,QTextCodec *codec); void setTemplateDocs(const QString &docs) { m_tdocs = docs; } + bool isEmpty(); public slots: void reset(); |