aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqml.h
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-07-04 15:13:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-22 19:37:38 +0200
commit0181dc283f6a783783b7e622b4e2dc241edd8a54 (patch)
tree8ccc8a4f6c0f5067585091fa2c317af28594832a /src/qml/qml/qqml.h
parent6499098a04c7a8a1193413500cd562f781df38bb (diff)
Silence clang header-hygiene warning.
Clang complains about namespaces leaking from a header. However in case of the QtQml namespace this is a conscious decision. So we disable the warning. Change-Id: I2a0536363abaa13b66984ddd681297aeab67edbd Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src/qml/qml/qqml.h')
-rw-r--r--src/qml/qml/qqml.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h
index b48a776b4f..ee69985edb 100644
--- a/src/qml/qml/qqml.h
+++ b/src/qml/qml/qqml.h
@@ -428,8 +428,19 @@ namespace QtQml {
Q_QML_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *,
const QMetaObject *, bool create);
}
+
+#ifdef Q_CC_CLANG
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wheader-hygiene"
+#endif
+
+// This is necessary to allow for QtQuick1 and QtQuick2 scenes in a single application.
using namespace QtQml;
+#ifdef Q_CC_CLANG
+#pragma clang diagnostic pop
+#endif
+
template<typename T>
QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true)
{