summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-12-29 10:00:03 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-12-29 10:00:03 (GMT)
commitc03dd8a0105a6d020983981d17b1429dd4835103 (patch)
tree794896021236d408b433dd0e59a1793619f8df4d /addon
parentaf6bf4883affe57d3be48e4b4538eb3c47decfad (diff)
downloadDoxygen-c03dd8a0105a6d020983981d17b1429dd4835103.zip
Doxygen-c03dd8a0105a6d020983981d17b1429dd4835103.tar.gz
Doxygen-c03dd8a0105a6d020983981d17b1429dd4835103.tar.bz2
issue #8282 Error on ALIAS declaration without quotes
- also escape a "," (comma) when writing out string values (doxygen and doxywizard) - check on empty lists in stringlist for the wizard
Diffstat (limited to 'addon')
-rw-r--r--addon/doxywizard/config_doxyw.l1
-rw-r--r--addon/doxywizard/inputstrlist.cpp69
2 files changed, 40 insertions, 30 deletions
diff --git a/addon/doxywizard/config_doxyw.l b/addon/doxywizard/config_doxyw.l
index 6b487ee..b93a79d 100644
--- a/addon/doxywizard/config_doxyw.l
+++ b/addon/doxywizard/config_doxyw.l
@@ -729,6 +729,7 @@ void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s)
while (!(c=*p++).isNull() && !needsEscaping)
{
needsEscaping = (c==QChar::fromLatin1(' ') ||
+ c==QChar::fromLatin1(',') ||
c==QChar::fromLatin1('\n') ||
c==QChar::fromLatin1('\t') ||
c==QChar::fromLatin1('"'));
diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp
index fae45b5..cdc7d14 100644
--- a/addon/doxywizard/inputstrlist.cpp
+++ b/addon/doxywizard/inputstrlist.cpp
@@ -258,48 +258,57 @@ void InputStrList::writeValue(QTextStream &t,QTextCodec *codec)
}
}
-#include <QMessageBox>
bool InputStrList::isDefault()
{
- bool isEq = m_strList==m_default;
+ if (m_strList==m_default) return true;
- if (!isEq)
+ auto it1 = m_strList.begin();
+ auto it2 = m_default.begin();
+ while (it1!=m_strList.end() && (*it1).isEmpty())
{
- isEq = true;
+ ++it1;
+ }
+ while (it2!=m_default.end() && (*it2).isEmpty())
+ {
+ ++it2;
+ }
+ // both lists are empty
+ if (it1==m_strList.end() && it2==m_default.end()) return true;
- auto it1 = m_strList.begin();
- auto it2 = m_default.begin();
- while (it1!=m_strList.end() && it2!=m_default.end())
+ // one list is empty but the other is not
+ if (it1==m_default.end()) return false;
+ if (it2==m_strList.end()) return false;
+
+ it1 = m_strList.begin();
+ it2 = m_default.begin();
+ while (it1!=m_strList.end() && it2!=m_default.end())
+ {
+ // skip over empty values
+ while (it1!=m_strList.end() && (*it1).isEmpty())
{
- // skip over empty values
- while (it1!=m_strList.end() && (*it1).isEmpty())
- {
++it1;
- }
- while (it2!=m_default.end() && (*it2).isEmpty())
- {
- ++it2;
- }
- if ((it1!=m_strList.end()) && (it2!=m_default.end()))
- {
- if ((*it1).trimmed()!= (*it2).trimmed()) // difference so not the default
- {
- isEq=false;
- break;
- }
- ++it1;
- ++it2;
- }
- else if ((it1!=m_strList.end()) || (it2!=m_default.end()))
+ }
+ while (it2!=m_default.end() && (*it2).isEmpty())
+ {
+ ++it2;
+ }
+ if ((it1!=m_strList.end()) && (it2!=m_default.end()))
+ {
+ if ((*it1).trimmed()!= (*it2).trimmed()) // difference so not the default
{
- // one list empty so cannot be the default
- isEq=false;
- break;
+ return false;
}
+ ++it1;
+ ++it2;
+ }
+ else if ((it1!=m_strList.end()) || (it2!=m_default.end()))
+ {
+ // one list empty so cannot be the default
+ return false;
}
}
- return isEq;
+ return true;
}
bool InputStrList::isEmpty()