summaryrefslogtreecommitdiffstats
path: root/src/qdoc/qmlvisitor.h
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@theqtcompany.com>2016-02-29 13:07:11 +0100
committerMartin Smith <martin.smith@theqtcompany.com>2016-03-09 11:34:16 +0000
commit2b262fad86ef38a5fa692b4c73e6ec26a5d45a5f (patch)
tree4b61e71f6bd7f62bf5784ab5e11df80c42e12db3 /src/qdoc/qmlvisitor.h
parent6a3863ec30a0ff477fa73aff9b64ba5407d26347 (diff)
qdoc: Let qdoc run without QtDeclarative
When qdoc is built without QtDeclarative present, define QT_NO_DECLARATIVE. Then qdoc will not compile the QML and JS parsers from QtDeclarative, and if it encounters a request in the documentation to parse a QML or JS snippet or file, it prints an error message indicating that it can't parse QML or JS because QtDeclarative is not installed. Change-Id: I7e7948118244b7ffa563126520def083d75e3bb6 Task-number: QTBUG-51409 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'src/qdoc/qmlvisitor.h')
-rw-r--r--src/qdoc/qmlvisitor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qdoc/qmlvisitor.h b/src/qdoc/qmlvisitor.h
index 8a23eef75..bc7a3c003 100644
--- a/src/qdoc/qmlvisitor.h
+++ b/src/qdoc/qmlvisitor.h
@@ -37,8 +37,10 @@
#include "node.h"
#include <qstring.h>
+#ifndef QT_NO_DECLARATIVE
#include <private/qqmljsastvisitor_p.h>
#include <private/qqmljsengine_p.h>
+#endif
QT_BEGIN_NAMESPACE
@@ -57,6 +59,7 @@ struct QmlPropArgs
}
};
+#ifndef QT_NO_DECLARATIVE
class QmlDocVisitor : public QQmlJS::AST::Visitor
{
Q_DECLARE_TR_FUNCTIONS(QDoc::QmlDocVisitor)
@@ -115,6 +118,7 @@ private:
QSet<quint32> usedComments;
Aggregate *current;
};
+#endif
QT_END_NAMESPACE