diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/doxygen.cpp | 2 | ||||
-rw-r--r-- | src/layout.cpp | 7 | ||||
-rw-r--r-- | src/layout.h | 7 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 7b4810e..45f07a4 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -10387,7 +10387,7 @@ void readConfiguration(int argc, char **argv) layoutName=getArg(argc,argv,optind); if (!layoutName) { layoutName="DoxygenLayout.xml"; } - writeDefaultLayoutFile(layoutName); + LayoutDocManager::instance().writeDefault(layoutName); cleanUpDoxygen(); exit(0); break; diff --git a/src/layout.cpp b/src/layout.cpp index 38a55f4..c560147 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -265,9 +265,6 @@ class LayoutParser : public QXmlDefaultHandler m_part = -1; // invalid m_rootNav = 0; - //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); - //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); - //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA); bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); // start & end handlers @@ -1549,9 +1546,7 @@ void LayoutDocManager::parse(const char *fileName) reader.parse( source ); } -//--------------------------------------------------------------------------------- - -void writeDefaultLayoutFile(const char *fileName) +void LayoutDocManager::writeDefault(const char *fileName) const { QFile f(fileName); bool ok = openOutputFile(fileName,f); diff --git a/src/layout.h b/src/layout.h index b1facf5..3260a28 100644 --- a/src/layout.h +++ b/src/layout.h @@ -162,8 +162,7 @@ struct LayoutNavEntry QCString title() const { return m_title; } QCString intro() const { return m_intro; } QCString url() const; - bool visible() { return m_visible; } - void clear() { m_children.clear(); } + bool visible() const { return m_visible; } void addChild(LayoutNavEntry *e) { m_children.append(e); } void prependChild(LayoutNavEntry *e) { m_children.prepend(e); } const QList<LayoutNavEntry> &children() const { return m_children; } @@ -172,6 +171,7 @@ struct LayoutNavEntry private: LayoutNavEntry() : m_parent(0), m_kind(None), m_visible(FALSE) {} LayoutNavEntry *m_parent; + void clear() { m_children.clear(); } Kind m_kind; bool m_visible; QCString m_baseFile; @@ -179,6 +179,7 @@ struct LayoutNavEntry QCString m_intro; QList<LayoutNavEntry> m_children; friend class LayoutDocManager; + friend class LayoutParser; }; /** @brief Singleton providing access to the (user configurable) layout of the documentation */ @@ -203,6 +204,7 @@ class LayoutDocManager /** Parses a user provided layout */ void parse(const char *fileName); void init(); + void writeDefault(const char *fileName) const; private: void addEntry(LayoutPart p,LayoutDocEntry*e); void clear(LayoutPart p); @@ -212,7 +214,6 @@ class LayoutDocManager friend class LayoutParser; }; -void writeDefaultLayoutFile(const char *fileName); #endif |