Skip to content

Commit a0035e7

Browse files
committed
Merge branch 'master' of github.com:doxygen/doxygen
2 parents 10be219 + 8727ba4 commit a0035e7

4 files changed

Lines changed: 63 additions & 1 deletion

File tree

addon/doxywizard/doxywizard.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,11 @@ void MainWindow::showSettings()
815815
m_saveLog->setEnabled(true);
816816
}
817817

818+
void MainWindow::dump()
819+
{
820+
m_expert->dump();
821+
}
822+
818823
void MainWindow::configChanged()
819824
{
820825
m_modified = true;
@@ -895,7 +900,7 @@ static void usage(const char *exeName, const QString txt)
895900
{
896901
QMessageBox msgBox;
897902
QString fullText = txt;
898-
fullText += QString::fromLatin1("Usage: %1 [--debug] [--language [lang]] [config file]\n").arg(QString::fromLatin1(exeName));
903+
fullText += QString::fromLatin1("Usage: %1 [--debug] [--dump] [--language [lang]] [config file]\n").arg(QString::fromLatin1(exeName));
899904
fullText += QString::fromLatin1("Usage: %1 --help\n").arg(QString::fromLatin1(exeName));
900905
fullText += QString::fromLatin1("Usage: %1 --version\n").arg(QString::fromLatin1(exeName));
901906
msgBox.setText(fullText);
@@ -919,6 +924,7 @@ int main(int argc,char **argv)
919924

920925
int optInd=1;
921926
bool langSet = false;
927+
bool dumpFlag = false;
922928
QString langSel;
923929
while (optInd<argc && argv[optInd][0]=='-' && argv[optInd][1]=='-')
924930
{
@@ -947,6 +953,10 @@ int main(int argc,char **argv)
947953
msgBox.exec();
948954
exit(0);
949955
}
956+
else if (!qstrcmp(argv[optInd],"--dump"))
957+
{
958+
dumpFlag = true;
959+
}
950960
else if (!qstrcmp(argv[optInd],"--debug"))
951961
{
952962
DoxygenWizard::debugFlag = true;
@@ -1015,6 +1025,10 @@ int main(int argc,char **argv)
10151025
{
10161026
main.loadConfigFromFile(QString::fromLocal8Bit(argv[argc-1]));
10171027
}
1028+
if (dumpFlag)
1029+
{
1030+
main.dump();
1031+
}
10181032
main.show();
10191033
return a.exec();
10201034
}

addon/doxywizard/doxywizard.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class MainWindow : public QMainWindow
4545
void outputLogStart();
4646
void outputLogText(QString text);
4747
void outputLogFinish();
48+
void dump();
4849
void setLanguage(const QString &langCode)
4950
{
5051
m_settings.setValue(QString::fromLatin1("language/code"), langCode);

addon/doxywizard/expert.cpp

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
#include <QFileInfo>
3838
#include <QRegularExpression>
3939
#include <QDebug>
40+
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
41+
#include <QStringConverter>
42+
#endif
4043

4144
#define SA(x) QString::fromLatin1(x)
4245

@@ -1165,3 +1168,46 @@ void Expert::refresh()
11651168
m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(0));
11661169
}
11671170

1171+
bool compareFunction (QString a, QString b) {return a<b;}
1172+
1173+
void Expert::dump()
1174+
{
1175+
QFile fileOut(SA("dump_%1.txt").arg(DoxygenWizard::langCode));
1176+
if (fileOut.open(QFile::WriteOnly|QFile::Text))
1177+
{
1178+
QTextStream out(&fileOut);
1179+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
1180+
out.setCodec(QTextCodec::codecForName("UTF-8"));
1181+
#else
1182+
out.setEncoding(QStringConverter::Utf8);
1183+
#endif
1184+
QHashIterator<QString, Input*> i(m_options);
1185+
std::vector<QString> v;
1186+
while (i.hasNext())
1187+
{
1188+
i.next();
1189+
if (!i.value())
1190+
{
1191+
// no value present, like for not compiled in settings (CLANG_...)
1192+
}
1193+
else if (i.value()->docs().isEmpty())
1194+
{
1195+
// no documentation present, like for Obsolete items
1196+
}
1197+
else
1198+
{
1199+
v.push_back(i.key());
1200+
}
1201+
}
1202+
std::sort(v.begin(),v.end(),compareFunction);
1203+
for (const auto & n : v)
1204+
{
1205+
out << n << ": " << m_options[n]->docs() << "\n";
1206+
out << SA("=================================\n");
1207+
}
1208+
1209+
fileOut.flush();
1210+
fileOut.close();
1211+
}
1212+
}
1213+

addon/doxywizard/expert.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class Expert : public QSplitter, public DocIntf
4646
bool htmlOutputPresent(const QString &workingDir) const;
4747
bool pdfOutputPresent(const QString &workingDir) const;
4848
QString getHtmlOutputIndex(const QString &workingDir) const;
49+
void dump();
4950

5051
// DocIntf methods
5152
void setHeader(const char *name);

0 commit comments

Comments
 (0)