From 58d4ad3cd25569f09b31c4b80bc145477c6d61cb Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 4 Oct 2018 15:24:40 +0200 Subject: Bug 702265 - Generated Doxyfile differs from result of doxygen -u See to it that the output from 'doxygen' and 'doxywizard' give the same result, difference was only in whitespace. - space after '#' was already implemented - implemented now that line endings are conform text layout (Qt 3 name: IO_Translate, Qt 4 name: QIODevice::Text) - implement no space after '=' in case of an empty string or empty string list. --- addon/doxywizard/doxywizard.cpp | 2 +- addon/doxywizard/expert.cpp | 5 +++-- addon/doxywizard/input.h | 1 + addon/doxywizard/inputstring.h | 1 + addon/doxywizard/inputstrlist.cpp | 8 ++++++++ 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..b2618e9 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..1d81436 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(); -- cgit v0.12 From 406b442fc3d0360e387324ff1c08251d86a1d035 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 4 Oct 2018 15:46:33 +0200 Subject: Bug 702265 - Generated Doxyfile differs from result of doxygen -u Syntax correction (Mac) --- addon/doxywizard/input.h | 2 +- addon/doxywizard/inputstrlist.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addon/doxywizard/input.h b/addon/doxywizard/input.h index b2618e9..5d86cc8 100644 --- a/addon/doxywizard/input.h +++ b/addon/doxywizard/input.h @@ -30,7 +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; }; + virtual bool isEmpty() { return false; }; }; diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp index 1d81436..822bc4c 100644 --- a/addon/doxywizard/inputstrlist.cpp +++ b/addon/doxywizard/inputstrlist.cpp @@ -264,7 +264,7 @@ bool InputStrList::isEmpty() { foreach (QString s, m_strList) { - if (!s.isEmpty()) return FALSE; + if (!s.isEmpty()) return false; } - return TRUE; + return true; } -- cgit v0.12