Commit 38e67b40 authored by Dimitri van Heesch's avatar Dimitri van Heesch

config.xml is now used to generate configoptions.cpp and config.doc

parent 10ab1d5d
...@@ -27,6 +27,11 @@ ...@@ -27,6 +27,11 @@
/addon/doxmlparser/src/Makefile /addon/doxmlparser/src/Makefile
/addon/doxyapp/Makefile /addon/doxyapp/Makefile
/addon/doxywizard/Makefile /addon/doxywizard/Makefile
/addon/doxywizard/Makefile.doxywizard
/addon/doxywizard/config_lex.cpp
/addon/doxywizard/moc
/addon/doxywizard/obj
/addon/doxywizard/rcc
/examples/Makefile /examples/Makefile
/Makefile /Makefile
......
This source diff could not be displayed because it is too large. You can view the blob instead.
#ifndef CONFIGDOC_H
#define CONFIGDOC_H
class DocIntf;
void addConfigDocs(DocIntf *doc);
#endif
#ifndef DOCINTF_H
#define DOCINTF_H
class DocIntf
{
public:
virtual ~DocIntf() {}
virtual void setHeader(const char *header) = 0;
virtual void add(const char *name,const char *docs) = 0;
};
#endif
...@@ -20,9 +20,15 @@ macx-g++ { ...@@ -20,9 +20,15 @@ macx-g++ {
# Input # Input
HEADERS += doxywizard.h version.h expert.h config.h helplabel.h \ HEADERS += doxywizard.h version.h expert.h config.h helplabel.h \
inputbool.h inputstring.h inputint.h inputstrlist.h wizard.h inputbool.h inputstring.h inputint.h inputstrlist.h wizard.h docintf.h
SOURCES += doxywizard.cpp ../../src/version.cpp expert.cpp wizard.cpp \ SOURCES += doxywizard.cpp ../../src/version.cpp expert.cpp wizard.cpp \
inputbool.cpp inputstring.cpp inputint.cpp inputstrlist.cpp inputbool.cpp inputstring.cpp inputint.cpp inputstrlist.cpp
LEXSOURCES += config.l LEXSOURCES += config.l
RESOURCES += doxywizard.qrc RESOURCES += doxywizard.qrc
win32:RC_FILE += doxywizard.rc win32:RC_FILE += doxywizard.rc
configdoc.target = configdoc.cpp
configdoc.commands = python ../../src/configgen.py -wiz ../../src/config.xml > configdoc.cpp
configdoc.depends = ../../src/config.xml ../../src/configgen.py
QMAKE_EXTRA_TARGETS += configdoc
GENERATED_SOURCES += $$configdoc.target
This diff is collapsed.
...@@ -5,16 +5,18 @@ ...@@ -5,16 +5,18 @@
#include <QDomElement> #include <QDomElement>
#include <QHash> #include <QHash>
#include "docintf.h"
class QTreeWidget; class QTreeWidget;
class QTreeWidgetItem; class QTreeWidgetItem;
class QStackedWidget; class QStackedWidget;
class QSettings; class QSettings;
class QTextEdit; class QTextBrowser;
class QTextCodec; class QTextCodec;
class QPushButton; class QPushButton;
class Input; class Input;
class Expert : public QSplitter class Expert : public QSplitter, public DocIntf
{ {
Q_OBJECT Q_OBJECT
...@@ -32,6 +34,10 @@ class Expert : public QSplitter ...@@ -32,6 +34,10 @@ class Expert : public QSplitter
bool htmlOutputPresent(const QString &workingDir) const; bool htmlOutputPresent(const QString &workingDir) const;
bool pdfOutputPresent(const QString &workingDir) const; bool pdfOutputPresent(const QString &workingDir) const;
QString getHtmlOutputIndex(const QString &workingDir) const; QString getHtmlOutputIndex(const QString &workingDir) const;
// DocIntf methods
void setHeader(const char *name);
void add(const char *name,const char *doc);
public slots: public slots:
void activateTopic(QTreeWidgetItem *,QTreeWidgetItem *); void activateTopic(QTreeWidgetItem *,QTreeWidgetItem *);
...@@ -50,7 +56,7 @@ class Expert : public QSplitter ...@@ -50,7 +56,7 @@ class Expert : public QSplitter
void saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,bool brief); void saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,bool brief);
QSplitter *m_splitter; QSplitter *m_splitter;
QTextEdit *m_helper; QTextBrowser *m_helper;
QTreeWidget *m_treeWidget; QTreeWidget *m_treeWidget;
QStackedWidget *m_topicStack; QStackedWidget *m_topicStack;
QHash<QString,QWidget *> m_topics; QHash<QString,QWidget *> m_topics;
...@@ -60,6 +66,7 @@ class Expert : public QSplitter ...@@ -60,6 +66,7 @@ class Expert : public QSplitter
QPushButton *m_prev; QPushButton *m_prev;
QDomElement m_rootElement; QDomElement m_rootElement;
bool m_inShowHelp; bool m_inShowHelp;
QString m_header;
}; };
#endif #endif
...@@ -23,11 +23,13 @@ class Input ...@@ -23,11 +23,13 @@ class Input
virtual Kind kind() const = 0; virtual Kind kind() const = 0;
virtual QString docs() const = 0; virtual QString docs() const = 0;
virtual QString id() const = 0; virtual QString id() const = 0;
virtual QString templateDocs() const = 0;
virtual void addDependency(Input *option) = 0; virtual void addDependency(Input *option) = 0;
virtual void setEnabled(bool) = 0; virtual void setEnabled(bool) = 0;
virtual void updateDependencies() = 0; virtual void updateDependencies() = 0;
virtual void reset() = 0; virtual void reset() = 0;
virtual void writeValue(QTextStream &t,QTextCodec *codec) = 0; virtual void writeValue(QTextStream &t,QTextCodec *codec) = 0;
virtual void setTemplateDocs(const QString &docs) = 0;
}; };
......
...@@ -36,10 +36,12 @@ class InputBool : public QObject, public Input ...@@ -36,10 +36,12 @@ class InputBool : public QObject, public Input
Kind kind() const { return Bool; } Kind kind() const { return Bool; }
QString docs() const { return m_docs; } QString docs() const { return m_docs; }
QString id() const { return m_id; } QString id() const { return m_id; }
QString templateDocs() const { return m_tdocs; }
void addDependency(Input *option) { m_dependencies+=option; } void addDependency(Input *option) { m_dependencies+=option; }
void setEnabled(bool); void setEnabled(bool);
void updateDependencies(); void updateDependencies();
void writeValue(QTextStream &t,QTextCodec *codec); void writeValue(QTextStream &t,QTextCodec *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
public slots: public slots:
void reset(); void reset();
...@@ -64,7 +66,7 @@ class InputBool : public QObject, public Input ...@@ -64,7 +66,7 @@ class InputBool : public QObject, public Input
QList<Input*> m_dependencies; QList<Input*> m_dependencies;
QString m_id; QString m_id;
QLabel *m_lab; QLabel *m_lab;
QString m_tdocs;
}; };
#endif #endif
...@@ -39,10 +39,12 @@ class InputInt : public QObject, public Input ...@@ -39,10 +39,12 @@ class InputInt : public QObject, public Input
Kind kind() const { return Int; } Kind kind() const { return Int; }
QString docs() const { return m_docs; } QString docs() const { return m_docs; }
QString id() const { return m_id; } QString id() const { return m_id; }
QString templateDocs() const { return m_tdocs; }
void addDependency(Input *) { Q_ASSERT(false); } void addDependency(Input *) { Q_ASSERT(false); }
void setEnabled(bool); void setEnabled(bool);
void updateDependencies() {} void updateDependencies() {}
void writeValue(QTextStream &t,QTextCodec *codec); void writeValue(QTextStream &t,QTextCodec *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
public slots: public slots:
void reset(); void reset();
...@@ -66,6 +68,7 @@ class InputInt : public QObject, public Input ...@@ -66,6 +68,7 @@ class InputInt : public QObject, public Input
QVariant m_value; QVariant m_value;
QString m_docs; QString m_docs;
QString m_id; QString m_id;
QString m_tdocs;
}; };
#endif #endif
...@@ -53,10 +53,12 @@ class InputString : public QObject, public Input ...@@ -53,10 +53,12 @@ class InputString : public QObject, public Input
Kind kind() const { return String; } Kind kind() const { return String; }
QString docs() const { return m_docs; } QString docs() const { return m_docs; }
QString id() const { return m_id; } QString id() const { return m_id; }
QString templateDocs() const { return m_tdocs; }
void addDependency(Input *) { Q_ASSERT(false); } void addDependency(Input *) { Q_ASSERT(false); }
void setEnabled(bool); void setEnabled(bool);
void updateDependencies() {} void updateDependencies() {}
void writeValue(QTextStream &t,QTextCodec *codec); void writeValue(QTextStream &t,QTextCodec *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
public slots: public slots:
void reset(); void reset();
...@@ -86,6 +88,7 @@ class InputString : public QObject, public Input ...@@ -86,6 +88,7 @@ class InputString : public QObject, public Input
QString m_docs; QString m_docs;
QString m_id; QString m_id;
bool m_absPath; bool m_absPath;
QString m_tdocs;
}; };
#endif #endif
...@@ -49,10 +49,12 @@ class InputStrList : public QObject, public Input ...@@ -49,10 +49,12 @@ class InputStrList : public QObject, public Input
Kind kind() const { return StrList; } Kind kind() const { return StrList; }
QString docs() const { return m_docs; } QString docs() const { return m_docs; }
QString id() const { return m_id; } QString id() const { return m_id; }
QString templateDocs() const { return m_tdocs; }
void addDependency(Input *) { Q_ASSERT(false); } void addDependency(Input *) { Q_ASSERT(false); }
void setEnabled(bool); void setEnabled(bool);
void updateDependencies() {} void updateDependencies() {}
void writeValue(QTextStream &t,QTextCodec *codec); void writeValue(QTextStream &t,QTextCodec *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
public slots: public slots:
void reset(); void reset();
...@@ -85,7 +87,7 @@ class InputStrList : public QObject, public Input ...@@ -85,7 +87,7 @@ class InputStrList : public QObject, public Input
QVariant m_value; QVariant m_value;
QString m_docs; QString m_docs;
QString m_id; QString m_id;
QString m_tdocs;
}; };
#endif #endif
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# Documents produced by Doxygen are derivative works derived from the # Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license. # input used in their production; they are not affected by this license.
all: language FORCE all: language config.doc FORCE
DOXYGEN_DOCDIR=$(DOXYDOCS); \ DOXYGEN_DOCDIR=$(DOXYDOCS); \
export DOXYGEN_DOCDIR; \ export DOXYGEN_DOCDIR; \
VERSION=$(VERSION) ; \ VERSION=$(VERSION) ; \
...@@ -33,4 +33,7 @@ language: language.doc ...@@ -33,4 +33,7 @@ language: language.doc
language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.py language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.py
python translator.py python translator.py
config.doc: ../src/config.xml ../src/configgen.py
python ../src/configgen.py -doc ../src/config.xml > config.doc
FORCE: FORCE:
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# Documents produced by Doxygen are derivative works derived from the # Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license. # input used in their production; they are not affected by this license.
all: language FORCE all: language config.doc FORCE
@xcopy /s /q /i ..\examples ..\html\examples @xcopy /s /q /i ..\examples ..\html\examples
set DOXYGEN_DOCDIR=. & \ set DOXYGEN_DOCDIR=. & \
set VERSION=$(VERSION) & \ set VERSION=$(VERSION) & \
...@@ -33,4 +33,8 @@ language: language.doc ...@@ -33,4 +33,8 @@ language: language.doc
language.doc: maintainers.txt language.tpl translator.py language.doc: maintainers.txt language.tpl translator.py
set DOXYGEN_DOCDIR=. & set VERSION=$(VERSION) & python translator.py set DOXYGEN_DOCDIR=. & set VERSION=$(VERSION) & python translator.py
config.doc: ..\src\config.xml ..\src\configgen.py
python ..\src\configgen.py -doc ..\src\config.xml > config.doc
FORCE: FORCE:
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# Documents produced by Doxygen are derivative works derived from the # Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license. # input used in their production; they are not affected by this license.
all: language FORCE all: language config.doc FORCE
@xcopy /s /q /i ..\examples ..\html\examples @xcopy /s /q /i ..\examples ..\html\examples
set DOXYGEN_DOCDIR=. set DOXYGEN_DOCDIR=.
set VERSION=$(VERSION) set VERSION=$(VERSION)
...@@ -35,4 +35,7 @@ language.doc: maintainers.txt language.tpl translator.py ...@@ -35,4 +35,7 @@ language.doc: maintainers.txt language.tpl translator.py
set VERSION=$(VERSION) set VERSION=$(VERSION)
python translator.py python translator.py
config.doc: ../src/config.xml ../src/configgen.py
python ../src/configgen.py -doc ../src/config.xml > config.doc
FORCE: FORCE:
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -74,10 +74,8 @@ class ConfigOption ...@@ -74,10 +74,8 @@ class ConfigOption
virtual void writeTemplate(FTextStream &t,bool sl,bool upd) = 0; virtual void writeTemplate(FTextStream &t,bool sl,bool upd) = 0;
virtual void convertStrToVal() {} virtual void convertStrToVal() {}
virtual void substEnvVars() = 0; virtual void substEnvVars() = 0;
virtual void writeXML(FTextStream&) {}
virtual void init() {} virtual void init() {}
QCString convertToComment(const QCString &s, const QCString &u);
void writeBoolValue(FTextStream &t,bool v); void writeBoolValue(FTextStream &t,bool v);
void writeIntValue(FTextStream &t,int i); void writeIntValue(FTextStream &t,int i);
void writeStringValue(FTextStream &t,QCString &s); void writeStringValue(FTextStream &t,QCString &s);
...@@ -103,16 +101,7 @@ class ConfigInfo : public ConfigOption ...@@ -103,16 +101,7 @@ class ConfigInfo : public ConfigOption
m_name = name; m_name = name;
m_doc = doc; m_doc = doc;
} }
void writeTemplate(FTextStream &t, bool sl,bool) void writeTemplate(FTextStream &t, bool sl,bool);
{
if (!sl)
{
t << "\n";
}
t << "#---------------------------------------------------------------------------\n";
t << "# " << m_doc << endl;
t << "#---------------------------------------------------------------------------\n";
}
void substEnvVars() {} void substEnvVars() {}
}; };
...@@ -133,24 +122,8 @@ class ConfigList : public ConfigOption ...@@ -133,24 +122,8 @@ class ConfigList : public ConfigOption
void setWidgetType(WidgetType w) { m_widgetType = w; } void setWidgetType(WidgetType w) { m_widgetType = w; }
WidgetType widgetType() const { return m_widgetType; } WidgetType widgetType() const { return m_widgetType; }
QStrList *valueRef() { return &m_value; } QStrList *valueRef() { return &m_value; }
void writeTemplate(FTextStream &t,bool sl,bool) void writeTemplate(FTextStream &t,bool sl,bool);
{
if (!sl)
{
t << endl;
t << convertToComment(m_doc, m_userComment);
t << endl;
}
else if (!m_userComment.isEmpty())
{
t << convertToComment("", m_userComment);
}
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
writeStringList(t,m_value);
t << "\n";
}
void substEnvVars(); void substEnvVars();
void writeXML(FTextStream&);
void init() { m_value.clear(); } void init() { m_value.clear(); }
private: private:
QStrList m_value; QStrList m_value;
...@@ -177,23 +150,7 @@ class ConfigEnum : public ConfigOption ...@@ -177,23 +150,7 @@ class ConfigEnum : public ConfigOption
} }
QCString *valueRef() { return &m_value; } QCString *valueRef() { return &m_value; }
void substEnvVars(); void substEnvVars();
void writeTemplate(FTextStream &t,bool sl,bool) void writeTemplate(FTextStream &t,bool sl,bool);
{
if (!sl)
{
t << endl;
t << convertToComment(m_doc, m_userComment);
t << endl;
}
else if (!m_userComment.isEmpty())
{
t << convertToComment("", m_userComment);
}
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
writeStringValue(t,m_value);
t << "\n";
}
void writeXML(FTextStream&);
void init() { m_value = m_defValue.copy(); } void init() { m_value = m_defValue.copy(); }
private: private:
...@@ -222,24 +179,8 @@ class ConfigString : public ConfigOption ...@@ -222,24 +179,8 @@ class ConfigString : public ConfigOption
WidgetType widgetType() const { return m_widgetType; } WidgetType widgetType() const { return m_widgetType; }
void setDefaultValue(const char *v) { m_defValue = v; } void setDefaultValue(const char *v) { m_defValue = v; }
QCString *valueRef() { return &m_value; } QCString *valueRef() { return &m_value; }
void writeTemplate(FTextStream &t,bool sl,bool) void writeTemplate(FTextStream &t,bool sl,bool);
{
if (!sl)
{
t << endl;
t << convertToComment(m_doc, m_userComment);
t << endl;
}
else if (!m_userComment.isEmpty())
{
t << convertToComment("", m_userComment);
}
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
writeStringValue(t,m_value);
t << "\n";
}
void substEnvVars(); void substEnvVars();
void writeXML(FTextStream&);
void init() { m_value = m_defValue.copy(); } void init() { m_value = m_defValue.copy(); }
private: private:
...@@ -269,30 +210,7 @@ class ConfigInt : public ConfigOption ...@@ -269,30 +210,7 @@ class ConfigInt : public ConfigOption
int maxVal() const { return m_maxVal; } int maxVal() const { return m_maxVal; }
void convertStrToVal(); void convertStrToVal();
void substEnvVars(); void substEnvVars();
void writeTemplate(FTextStream &t,bool sl,bool upd) void writeTemplate(FTextStream &t,bool sl,bool upd);
{
if (!sl)
{
t << endl;
t << convertToComment(m_doc, m_userComment);
t << endl;
}
else if (!m_userComment.isEmpty())
{
t << convertToComment("", m_userComment);
}
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
if (upd && !m_valueString.isEmpty())
{
writeStringValue(t,m_valueString);
}
else
{
writeIntValue(t,m_value);
}
t << "\n";
}
void writeXML(FTextStream&);
void init() { m_value = m_defValue; } void init() { m_value = m_defValue; }
private: private:
int m_value; int m_value;
...@@ -320,30 +238,7 @@ class ConfigBool : public ConfigOption ...@@ -320,30 +238,7 @@ class ConfigBool : public ConfigOption
void convertStrToVal(); void convertStrToVal();
void substEnvVars(); void substEnvVars();
void setValueString(const QCString &v) { m_valueString = v; } void setValueString(const QCString &v) { m_valueString = v; }
void writeTemplate(FTextStream &t,bool sl,bool upd) void writeTemplate(FTextStream &t,bool sl,bool upd);
{
if (!sl)
{
t << endl;
t << convertToComment(m_doc, m_userComment);
t << endl;
}
else if (!m_userComment.isEmpty())
{
t << convertToComment("", m_userComment);
}
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
if (upd && !m_valueString.isEmpty())
{
writeStringValue(t,m_valueString);
}
else
{
writeBoolValue(t,m_value);
}
t << "\n";
}
void writeXML(FTextStream&);
void init() { m_value = m_defValue; } void init() { m_value = m_defValue; }
private: private:
bool m_value; bool m_value;
...@@ -358,9 +253,8 @@ class ConfigObsolete : public ConfigOption ...@@ -358,9 +253,8 @@ class ConfigObsolete : public ConfigOption
public: public:
ConfigObsolete(const char *name) : ConfigOption(O_Obsolete) ConfigObsolete(const char *name) : ConfigOption(O_Obsolete)
{ m_name = name; } { m_name = name; }
void writeTemplate(FTextStream &,bool,bool) {} void writeTemplate(FTextStream &,bool,bool);
void substEnvVars() {} void substEnvVars() {}
void writeXML(FTextStream&);
}; };
/** Section marker for compile time optional options /** Section marker for compile time optional options
...@@ -370,13 +264,12 @@ class ConfigDisabled : public ConfigOption ...@@ -370,13 +264,12 @@ class ConfigDisabled : public ConfigOption
public: public:
ConfigDisabled(const char *name) : ConfigOption(O_Disabled) ConfigDisabled(const char *name) : ConfigOption(O_Disabled)
{ m_name = name; } { m_name = name; }
void writeTemplate(FTextStream &,bool,bool) {} void writeTemplate(FTextStream &,bool,bool);
void substEnvVars() {} void substEnvVars() {}
void writeXML(FTextStream&);
}; };
// some convenience macros // some convenience macros for access the config options
#define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val) #define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val)
#define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val) #define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val)
#define Config_getList(val) Config::instance()->getList(__FILE__,__LINE__,val) #define Config_getList(val) Config::instance()->getList(__FILE__,__LINE__,val)
...@@ -571,8 +464,7 @@ class Config ...@@ -571,8 +464,7 @@ class Config
*/ */
void writeTemplate(FTextStream &t,bool shortIndex,bool updateOnly); void writeTemplate(FTextStream &t,bool shortIndex,bool updateOnly);
/** Write XML representation of the config file */ void setHeader(const char *header) { m_header = header; }
void writeXML(FTextStream &t);
///////////////////////////// /////////////////////////////
// internal API // internal API
...@@ -658,6 +550,7 @@ class Config ...@@ -658,6 +550,7 @@ class Config
static Config *m_instance; static Config *m_instance;
QCString m_userComment; QCString m_userComment;
bool m_initialized; bool m_initialized;
QCString m_header;
}; };
#endif #endif
...@@ -77,7 +77,7 @@ static QCString configStringRecode( ...@@ -77,7 +77,7 @@ static QCString configStringRecode(
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
*/ */
QCString ConfigOption::convertToComment(const QCString &s, const QCString &u) static QCString convertToComment(const QCString &s, const QCString &u)
{ {
//printf("convertToComment(%s)=%s\n",s.data(),u.data()); //printf("convertToComment(%s)=%s\n",s.data(),u.data());
QCString result; QCString result;
...@@ -291,106 +291,120 @@ bool &Config::getBool(const char *fileName,int num,const char *name) const ...@@ -291,106 +291,120 @@ bool &Config::getBool(const char *fileName,int num,const char *name) const
return *((ConfigBool *)opt)->valueRef(); return *((ConfigBool *)opt)->valueRef();
} }
/* ----------------------------------------------------------------- /* ------------------------------------------ */
*/
void ConfigInt::writeXML(FTextStream& t)
{
t << " <option type='int' "
"id='" << convertToXML(name()) << "' "
"docs='\n" << convertToXML(docs()) << "' "
"minval='" << m_minVal << "' "
"maxval='" << m_maxVal << "' "
"defval='" << m_defValue << "'";
if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'";
t << "/>" << endl;
}
void ConfigBool::writeXML(FTextStream& t) void ConfigInfo::writeTemplate(FTextStream &t, bool sl,bool)
{ {
t << " <option type='bool' " if (!sl)
"id='" << convertToXML(name()) << "' " {
"docs='\n" << convertToXML(docs()) << "' " t << "\n";
"defval='" << m_defValue << "'"; }
if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'"; t << "#---------------------------------------------------------------------------\n";
t << "/>" << endl; t << "# " << m_doc << endl;
t << "#---------------------------------------------------------------------------\n";
} }
void ConfigString::writeXML(FTextStream& t) void ConfigList::writeTemplate(FTextStream &t,bool sl,bool)
{ {
QString format; if (!sl)
switch (m_widgetType) {
{ t << endl;
case String: format="string"; break; t << convertToComment(m_doc, m_userComment);
case File: format="file"; break; t << endl;
case Dir: format="dir"; break; }
} else if (!m_userComment.isEmpty())
t << " <option type='string' " {
"id='" << convertToXML(name()) << "' " t << convertToComment("", m_userComment);
"format='" << format << "' " }
"docs='\n" << convertToXML(docs()) << "' " t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
"defval='" << convertToXML(m_defValue) << "'"; writeStringList(t,m_value);
if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'"; t << "\n";
t << "/>" << endl;
} }
void ConfigEnum::writeXML(FTextStream &t) void ConfigEnum::writeTemplate(FTextStream &t,bool sl,bool)
{ {
t << " <option type='enum' " if (!sl)
"id='" << convertToXML(name()) << "' "
"defval='" << convertToXML(m_defValue) << "' "
"docs='\n" << convertToXML(docs()) << "'";
if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'";
t << ">" << endl;
char *enumVal = m_valueRange.first();
while (enumVal)
{ {
t << " <value name='" << convertToXML(enumVal) << "'/>" << endl; t << endl;
enumVal = m_valueRange.next(); t << convertToComment(m_doc, m_userComment);
t << endl;
} }
else if (!m_userComment.isEmpty())
t << " </option>" << endl; {
t << convertToComment("", m_userComment);
}
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
writeStringValue(t,m_value);
t << "\n";
} }
void ConfigList::writeXML(FTextStream &t) void ConfigString::writeTemplate(FTextStream &t,bool sl,bool)
{ {
QString format; if (!sl)
switch (m_widgetType)
{ {
case String: format="string"; break; t << endl;
case File: format="file"; break; t << convertToComment(m_doc, m_userComment);
case Dir: format="dir"; break; t << endl;
case FileAndDir: format="filedir"; break;
} }
t << " <option type='list' " else if (!m_userComment.isEmpty())
"id='" << convertToXML(name()) << "' "
"format='" << format << "' "
"docs='\n" << convertToXML(docs()) << "'";
if (!m_dependency.isEmpty()) t << " depends='" << m_dependency << "'";
t << ">" << endl;
char *enumVal = m_value.first();
while (enumVal)
{ {
t << " <value name='" << convertToXML(enumVal) << "'/>" << endl; t << convertToComment("", m_userComment);
enumVal = m_value.next();
} }
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
t << " </option>" << endl; writeStringValue(t,m_value);
t << "\n";
} }
void ConfigObsolete::writeXML(FTextStream &t) void ConfigInt::writeTemplate(FTextStream &t,bool sl,bool upd)
{ {
t << " <option type='obsolete' " if (!sl)
"id='" << convertToXML(name()) << "'/>" << endl; {
t << endl;
t << convertToComment(m_doc, m_userComment);
t << endl;
}
else if (!m_userComment.isEmpty())
{
t << convertToComment("", m_userComment);
}
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
if (upd && !m_valueString.isEmpty())
{
writeStringValue(t,m_valueString);
}
else
{
writeIntValue(t,m_value);
}
t << "\n";
} }
void ConfigDisabled::writeXML(FTextStream &t) void ConfigBool::writeTemplate(FTextStream &t,bool sl,bool upd)
{ {
t << " <option type='disabled' " if (!sl)
"id='" << convertToXML(name()) << "'/>" << endl; {
t << endl;
t << convertToComment(m_doc, m_userComment);
t << endl;
}
else if (!m_userComment.isEmpty())
{
t << convertToComment("", m_userComment);
}
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
if (upd && !m_valueString.isEmpty())
{
writeStringValue(t,m_valueString);
}
else
{
writeBoolValue(t,m_value);
}
t << "\n";
} }
void ConfigObsolete::writeTemplate(FTextStream &,bool,bool) {}
void ConfigDisabled::writeTemplate(FTextStream &,bool,bool) {}
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
* *
...@@ -830,17 +844,7 @@ void Config::writeTemplate(FTextStream &t,bool sl,bool upd) ...@@ -830,17 +844,7 @@ void Config::writeTemplate(FTextStream &t,bool sl,bool upd)
t << "# Doxyfile " << versionString << endl << endl; t << "# Doxyfile " << versionString << endl << endl;
if (!sl) if (!sl)
{ {
t << "# This file describes the settings to be used by the documentation system\n"; t << convertToComment(m_header,"");
t << "# doxygen (www.doxygen.org) for a project.\n";
t << "#\n";
t << "# All text after a double hash (##) is considered a comment and is placed\n";
t << "# in front of the TAG it is preceding .\n";
t << "# All text after a hash (#) is considered a comment and will be ignored.\n";
t << "# The format is:\n";
t << "# TAG = value [value, ...]\n";
t << "# For lists items can also be appended using:\n";
t << "# TAG += value [value, ...]\n";
t << "# Values that contain spaces should be placed between quotes (\" \").\n";
} }
ConfigOption *option = m_options->first(); ConfigOption *option = m_options->first();
while (option) while (option)
...@@ -856,36 +860,6 @@ void Config::writeTemplate(FTextStream &t,bool sl,bool upd) ...@@ -856,36 +860,6 @@ void Config::writeTemplate(FTextStream &t,bool sl,bool upd)
} }
} }
void Config::writeXML(FTextStream &t)
{
t << "<doxygenconfig>" << endl;
bool first=TRUE;
ConfigOption *option = m_options->first();
while (option)
{
if (option->kind()==ConfigOption::O_Info)
{
if (!first) t << " </group>" << endl;
t << " <group name='" << option->name() << "' "
"docs='" << option->docs() << "'>" << endl;
first=FALSE;
}
else
{
option->writeXML(t);
}
option = m_options->next();
}
option = m_obsolete->first();
while (option)
{
option->writeXML(t);
option = m_obsolete->next();
}
if (!first) t << " </group>" << endl;
t << "</doxygenconfig>" << endl;
}
void Config::convertStrToVal() void Config::convertStrToVal()
{ {
ConfigOption *option = m_options->first(); ConfigOption *option = m_options->first();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/****************************************************************************** /******************************************************************************
*
*
*
* *
* Copyright (C) 1997-2013 by Dimitri van Heesch. * Copyright (C) 1997-2013 by Dimitri van Heesch.
* *
......
...@@ -176,7 +176,6 @@ static QDict<FileDef> g_usingDeclarations(1009); // used classes ...@@ -176,7 +176,6 @@ static QDict<FileDef> g_usingDeclarations(1009); // used classes
static FileStorage *g_storage = 0; static FileStorage *g_storage = 0;
static bool g_successfulRun = FALSE; static bool g_successfulRun = FALSE;
static bool g_dumpSymbolMap = FALSE; static bool g_dumpSymbolMap = FALSE;
static bool g_dumpConfigAsXML = FALSE;
void clearAll() void clearAll()
{ {
...@@ -9756,18 +9755,6 @@ static void dumpSymbolMap() ...@@ -9756,18 +9755,6 @@ static void dumpSymbolMap()
} }
} }
//----------------------------------------------------------------------------
void dumpConfigAsXML()
{
QFile f("config.xml");
if (f.open(IO_WriteOnly))
{
FTextStream t(&f);
Config::instance()->writeXML(t);
}
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// print the usage of doxygen // print the usage of doxygen
...@@ -10184,9 +10171,6 @@ void readConfiguration(int argc, char **argv) ...@@ -10184,9 +10171,6 @@ void readConfiguration(int argc, char **argv)
case 'm': case 'm':
g_dumpSymbolMap = TRUE; g_dumpSymbolMap = TRUE;
break; break;
case 'x':
g_dumpConfigAsXML = TRUE;
break;
case '-': case '-':
if (qstrcmp(&argv[optind][2],"help")==0) if (qstrcmp(&argv[optind][2],"help")==0)
{ {
...@@ -10222,17 +10206,7 @@ void readConfiguration(int argc, char **argv) ...@@ -10222,17 +10206,7 @@ void readConfiguration(int argc, char **argv)
if (genConfig) if (genConfig)
{ {
if (g_dumpConfigAsXML) generateConfigFile(configName,shortList);
{
checkConfiguration();
generateConfigFile(configName,shortList);
dumpConfigAsXML();
exit(0);
}
else
{
generateConfigFile(configName,shortList);
}
cleanUpDoxygen(); cleanUpDoxygen();
exit(0); exit(0);
} }
......
...@@ -47,6 +47,6 @@ sub GenerateDep { ...@@ -47,6 +47,6 @@ sub GenerateDep {
#$ GenerateDep("config.cpp","config.l"); #$ GenerateDep("config.cpp","config.l");
$(LEX) -PconfigYY -t config.l >config.cpp $(LEX) -PconfigYY -t config.l >config.cpp
configoptions.cpp: config.xml configoptions.cpp: config.xml configgen.py
python configgen.py config.xml >configoptions.cpp python configgen.py -cpp config.xml >configoptions.cpp
This diff is collapsed.
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="&quot;S:\xapian\xapian-core-1.2.8\include&quot;,..\qtools" AdditionalIncludeDirectories="&quot;$(XAPIAN_DIR)\xapian-core-1.2.8\include&quot;,..\qtools"
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib" AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib"
OutputFile="..\bin\doxyindexer.exe" OutputFile="..\bin\doxyindexer.exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="&quot;S:\xapian\Debug&quot;;Debug" AdditionalLibraryDirectories="&quot;$(XAPIAN_DIR)\Debug&quot;;Debug"
GenerateManifest="false" GenerateManifest="false"
IgnoreAllDefaultLibraries="false" IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="&quot;S:\xapian\include&quot;,..\qtools" AdditionalIncludeDirectories="&quot;$(XAPIAN_DIR)\include&quot;,..\qtools"
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib" AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib"
OutputFile="..\bin\doxyindexer.exe" OutputFile="..\bin\doxyindexer.exe"
LinkIncremental="2" LinkIncremental="2"
AdditionalLibraryDirectories="&quot;S:\xapian\Debug64&quot;;Debug64" AdditionalLibraryDirectories="&quot;$(XAPIAN_DIR)\Debug64&quot;;Debug64"
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug64\$(TargetName).pdb" ProgramDatabaseFile=".\Debug64\$(TargetName).pdb"
SubSystem="1" SubSystem="1"
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="&quot;S:\xapian\xapian-core-1.2.8\include&quot;,..\qtools" AdditionalIncludeDirectories="&quot;$(XAPIAN_DIR)\include&quot;,..\qtools"
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib" AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib"
OutputFile="..\bin\Release\doxyindexer.exe" OutputFile="..\bin\Release\doxyindexer.exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="&quot;S:\xapian\Release&quot;;Release" AdditionalLibraryDirectories="&quot;$(XAPIAN_DIR)\Release&quot;;Release"
GenerateManifest="false" GenerateManifest="false"
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile=".\Release\$(TargetName).pdb" ProgramDatabaseFile=".\Release\$(TargetName).pdb"
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="&quot;S:\xapian\include&quot;,..\qtools" AdditionalIncludeDirectories="&quot;$(XAPIAN_DIR)\include&quot;,..\qtools"
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib" AdditionalDependencies="qtools.lib xapian.lib uuid.lib rpcrt4.lib ws2_32.lib"
OutputFile="..\bin\Release64\doxyindexer.exe" OutputFile="..\bin\Release64\doxyindexer.exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="&quot;S:\xapian\Release64&quot;;Release64" AdditionalLibraryDirectories="&quot;$(XAPIAN_DIR)\Release64&quot;;Release64"
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile=".\Release64\$(TargetName).pdb" ProgramDatabaseFile=".\Release64\$(TargetName).pdb"
SubSystem="1" SubSystem="1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment