Skip to content

Commit 48e08d0

Browse files
committed
Fix logic and cleanup dead code
1 parent 4a5d27f commit 48e08d0

12 files changed

Lines changed: 419 additions & 394 deletions

addon/doxywizard/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ optiontranslations.h
150150
qt_add_resources(doxywizard_RESOURCES_RCC doxywizard.qrc)
151151

152152
# Generate localized config.qrc
153-
set(CONFIG_QRC_CONTENT "<!DOCTYPE RCC>\n<RCC version=\"1.0\">\n<qresource prefix=\"/\">\n")
153+
set(CONFIG_QRC_CONTENT "<!DOCTYPE RCC>\n<RCC version=\"1.0\">\n<qresource prefix=\"/config\">\n")
154154
string(APPEND CONFIG_QRC_CONTENT " <file alias=\"config.xml\">${PROJECT_SOURCE_DIR}/src/config.xml</file>\n")
155155
file(GLOB LANG_CONFIG_FILES CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/translations/config_*.xml")
156156
foreach(lang_file ${LANG_CONFIG_FILES})
@@ -227,6 +227,7 @@ ${GENERATED_SRC_WIZARD}/config_doxyw.l.h
227227
${GENERATED_SRC_WIZARD}/configdoc.cpp
228228
${doxywizard_MOC}
229229
${doxywizard_RESOURCES_RCC}
230+
${doxywizard_CONFIG_RESOURCES}
230231
${doxywizard_TRANSLATION_RESOURCES}
231232
${doxywizard_QM_FILES}
232233
${PROJECT_SOURCE_DIR}/templates/icon/doxygen.rc

addon/doxywizard/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Doxywizard is a graphical front-end to read/edit/write doxygen configuration
2-
files and to launch doxygen. It requires Qt version 4.3 or higher.
2+
files and to launch doxygen. It requires Qt version 5 or higher.
33

addon/doxywizard/doxywizard.qrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!DOCTYPE RCC><RCC version="1.0">
22
<qresource prefix="/">
3-
<file alias="config.xml">../../src/config.xml</file>
43
<file>images/add.svg</file>
54
<file>images/del.svg</file>
65
<file>images/file.svg</file>

addon/doxywizard/expert.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,18 +270,20 @@ void Expert::loadConfigXml()
270270

271271
if (langCode != QLatin1String("en"))
272272
{
273-
configPath = SA(":/config_") + langCode + SA(".xml");
273+
configPath = SA(":/config/config_") + langCode + SA(".xml");
274274
QFile langFile(configPath);
275275
if (!langFile.exists())
276276
{
277-
configPath = SA(":/config.xml");
277+
configPath = SA(":/config/config.xml");
278278
}
279279
}
280280
else
281281
{
282-
configPath = SA(":/config.xml");
282+
configPath = SA(":/config/config.xml");
283283
}
284284

285+
if (m_configLoaded==configPath) return; // already loaded
286+
285287
QFile file(configPath);
286288
QString err;
287289
int errLine,errCol;
@@ -301,6 +303,7 @@ void Expert::loadConfigXml()
301303
}
302304
}
303305
m_rootElement = configXml.documentElement();
306+
m_configLoaded = configPath;
304307
}
305308

306309
Expert::~Expert()
@@ -595,7 +598,7 @@ static QString getDocsForNode(const QDomElement &child)
595598
QString dependsOn = child.attribute(SA("depends"));
596599
if (!docs.endsWith(SA("<br/>"))) docs += SA("<br/>");
597600
docs += SA("<br/>");
598-
docs+=SA(" ")+Expert::tr("This tag requires that the tag %1 is set to <code>YES</code>.").arg(SA("\\ref cfg_")+dependsOn.toLower()+SA(" \"")+dependsOn.toUpper()+SA("\""));
601+
docs += SA(" ")+Expert::tr("This tag requires that the tag %1 is set to <code>YES</code>.").arg(SA("\\ref cfg_")+dependsOn.toLower()+SA(" \"")+dependsOn.toUpper()+SA("\""));
599602
}
600603

601604
// Convert Doxygen markup to HTML
@@ -1154,5 +1157,7 @@ void Expert::retranslateUi()
11541157
createTopics(m_rootElement);
11551158

11561159
m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(0));
1160+
1161+
addConfigDocs(this);
11571162
}
11581163

addon/doxywizard/expert.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class Expert : public QSplitter, public DocIntf
8888
bool m_inShowHelp;
8989
QString m_header;
9090
TranslationManager *m_translationManager;
91+
QString m_configLoaded;
9192
};
9293

9394
#endif

addon/doxywizard/input.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class Input
3535
virtual void update() = 0;
3636
virtual Kind kind() const = 0;
3737
virtual QString docs() const = 0;
38-
virtual void setDocs(const QString &docs) = 0;
3938
virtual QString id() const = 0;
4039
virtual QString templateDocs() const = 0;
4140
virtual void addDependency(Input *option) = 0;

addon/doxywizard/inputbool.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class InputBool : public QObject, public Input
3333
void update();
3434
Kind kind() const { return Bool; }
3535
QString docs() const { return m_docs; }
36-
void setDocs(const QString &docs) { m_docs = docs; }
3736
QString id() const { return m_id; }
3837
QString templateDocs() const { return m_tdocs; }
3938
void addDependency(Input *option) { m_dependencies+=option; }

addon/doxywizard/inputobsolete.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class InputObsolete : public Input
2323
void update() {}
2424
Kind kind() const { return Obsolete; }
2525
QString docs() const { return QString(); }
26-
void setDocs(const QString &) {}
2726
QString id() const { return m_id; }
2827
QString templateDocs() const { return QString(); }
2928
void addDependency(Input *) {}

addon/doxywizard/inputstring.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class InputString : public QObject, public Input
5454
Kind kind() const { return String; }
5555
StringMode stringMode() const { return m_sm; }
5656
QString docs() const { return m_docs; }
57-
void setDocs(const QString &docs) { m_docs = docs; }
5857
QString id() const { return m_id; }
5958
QString templateDocs() const { return m_tdocs; }
6059
void addDependency(Input *) { Q_ASSERT(false); }

addon/doxywizard/inputstrlist.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class InputStrList : public QObject, public Input
4545
void update();
4646
Kind kind() const { return StrList; }
4747
QString docs() const { return m_docs; }
48-
void setDocs(const QString &docs) { m_docs = docs; }
4948
QString id() const { return m_id; }
5049
QString templateDocs() const { return m_tdocs; }
5150
void addDependency(Input *) { Q_ASSERT(false); }

0 commit comments

Comments
 (0)