From: Martin Smith Date: Thu, 10 May 2012 11:11:13 +0000 (+0200) Subject: qdoc: Removed some obsolete ifdefs X-Git-Tag: 071012110112~1085 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2456798c6d032ad27f518ed3cd7d3e82fc8d50a;p=profile%2Fivi%2Fqtbase.git qdoc: Removed some obsolete ifdefs Also removed a few useless comments. Change-Id: I62a52bb826c1299ea9da3f0f3c23f267703c6509 Reviewed-by: Casper van Donderen --- diff --git a/src/tools/qdoc/config.h b/src/tools/qdoc/config.h index 6ed37fc..baab42e 100644 --- a/src/tools/qdoc/config.h +++ b/src/tools/qdoc/config.h @@ -132,7 +132,7 @@ private: }; #define CONFIG_ALIAS "alias" -#define CONFIG_BASE "base" // ### don't document for now +#define CONFIG_BASE "base" #define CONFIG_BASEDIR "basedir" #define CONFIG_CODEINDENT "codeindent" #define CONFIG_DEFINES "defines" @@ -184,17 +184,13 @@ private: #define CONFIG_TEMPLATEDIR "templatedir" #define CONFIG_TABSIZE "tabsize" #define CONFIG_TAGFILE "tagfile" -#define CONFIG_TRANSLATORS "translators" // ### don't document for now +#define CONFIG_TRANSLATORS "translators" #define CONFIG_URL "url" #define CONFIG_VERSION "version" #define CONFIG_VERSIONSYM "versionsym" - #define CONFIG_FILEEXTENSIONS "fileextensions" #define CONFIG_IMAGEEXTENSIONS "imageextensions" - -#ifdef QDOC_QML #define CONFIG_QMLONLY "qmlonly" -#endif QT_END_NAMESPACE diff --git a/src/tools/qdoc/ditaxmlgenerator.h b/src/tools/qdoc/ditaxmlgenerator.h index 56cf486..20de6b8 100644 --- a/src/tools/qdoc/ditaxmlgenerator.h +++ b/src/tools/qdoc/ditaxmlgenerator.h @@ -556,9 +556,7 @@ private: NodeMap obsoleteClasses; NodeMap namespaceIndex; NodeMap serviceClasses; -#ifdef QDOC_QML NodeMap qmlClasses; -#endif QMap funcIndex; QMap legaleseTexts; static int id; @@ -573,7 +571,7 @@ private: #define DITAXMLGENERATOR_ADDRESS "address" #define DITAXMLGENERATOR_FOOTER "footer" -#define DITAXMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me +#define DITAXMLGENERATOR_GENERATEMACREFS "generatemacrefs" #define DITAXMLGENERATOR_POSTHEADER "postheader" #define DITAXMLGENERATOR_POSTPOSTHEADER "postpostheader" #define DITAXMLGENERATOR_STYLE "style" diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp index af7e26d..7033131 100644 --- a/src/tools/qdoc/doc.cpp +++ b/src/tools/qdoc/doc.cpp @@ -2027,13 +2027,8 @@ void DocParser::appendWord(const QString &word) void DocParser::appendToCode(const QString& markedCode) { Atom::Type lastType = priv->text.lastAtom()->type(); -#ifdef QDOC_QML if (lastType != Atom::Qml && lastType != Atom::Code && lastType != Atom::JavaScript) append(Atom::Qml); -#else - if (lastType != Atom::Code) - append(Atom::Code); -#endif priv->text.lastAtom()->appendString(markedCode); } diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 5755b9a..4fa2bb6 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -408,7 +408,6 @@ int HtmlGenerator::generateAtom(const Atom *atom, marker,relative)) << "\n"; break; -#ifdef QDOC_QML case Atom::Qml: out() << "
"
               << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
@@ -421,7 +420,6 @@ int HtmlGenerator::generateAtom(const Atom *atom,
                                                  marker,relative))
               << "
\n"; break; -#endif case Atom::CodeNew: out() << "

you can rewrite it as

\n" << "
"
@@ -1149,12 +1147,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
         out() << "\\" << protectEnc(atom->string())
               << "";
         break;
-#ifdef QDOC_QML
     case Atom::QmlText:
     case Atom::EndQmlText:
         // don't do anything with these. They are just tags.
         break;
-#endif
     default:
         unknownAtom(atom);
     }
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp
index a1031f2..17f717a 100644
--- a/src/tools/qdoc/qmlvisitor.cpp
+++ b/src/tools/qdoc/qmlvisitor.cpp
@@ -52,7 +52,7 @@
 
 QT_BEGIN_NAMESPACE
 
-#define COMMAND_DEPRECATED              Doc::alias(QLatin1String("deprecated")) // ### don't document
+#define COMMAND_DEPRECATED              Doc::alias(QLatin1String("deprecated"))
 #define COMMAND_INGROUP                 Doc::alias(QLatin1String("ingroup"))
 #define COMMAND_INTERNAL                Doc::alias(QLatin1String("internal"))
 #define COMMAND_OBSOLETE                Doc::alias(QLatin1String("obsolete"))
@@ -488,7 +488,6 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiPublicMember *member)
             if (qmlClass) {
                 QString name = member->name.toString();
                 QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlClass, name, type, false);
-                //qmlPropNode->setLocation(doc.location());
                 qmlPropNode->setReadOnly(member->isReadonlyMember);
                 if (member->isDefaultMember)
                     qmlPropNode->setDefault();