Ignore the QT_NAMESPACE for moc runs
authorLars Knoll <lars.knoll@digia.com>
Fri, 21 Sep 2012 09:37:31 +0000 (11:37 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 24 Sep 2012 22:08:16 +0000 (00:08 +0200)
Moc should not see a defined QT_NAMESPACE, to
keep the names of all symbols consistent with
an un-namespaced Qt.

Change-Id: Ia72afabaa0820b02a0863148510122ce942a5082
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/corelib/global/qglobal.h

index 06e490a..60b90dc 100644 (file)
@@ -79,7 +79,7 @@
 
 #include <algorithm>
 
-#ifndef QT_NAMESPACE /* user namespace */
+#if !defined(QT_NAMESPACE) || defined(Q_MOC_RUN) /* user namespace */
 
 # define QT_PREPEND_NAMESPACE(name) ::name
 # define QT_USE_NAMESPACE