don't use QT_{BEGIN,END}_INCLUDE_NAMESPACE needlessly
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Mon, 3 Sep 2012 14:56:48 +0000 (16:56 +0200)
committerQt by Nokia <qt-info@nokia.com>
Sat, 8 Sep 2012 11:36:24 +0000 (13:36 +0200)
these macros behave counter-intuitively, so don't use them unless the code
structure really suggests their use.

Change-Id: I58213b39f8a98e4368901217fac14ca49c28b8cf
Reviewed-by: hjk <qthjk@ovi.com>
src/corelib/kernel/qtimer.cpp
src/gui/opengl/qopenglframebufferobject_p.h
src/opengl/qgl_p.h
src/opengl/qglframebufferobject_p.h
src/opengl/qglpixelbuffer_p.h
src/widgets/dialogs/qinputdialog.cpp
src/widgets/kernel/qlayout.h
src/widgets/styles/qstylefactory.cpp

index 3f7927d..e9a4abd 100644 (file)
@@ -292,10 +292,6 @@ void QSingleShotTimer::timerEvent(QTimerEvent *)
     qDeleteInEventHandler(this);
 }
 
-QT_BEGIN_INCLUDE_NAMESPACE
-#include "qtimer.moc"
-QT_END_INCLUDE_NAMESPACE
-
 /*!
     \reentrant
     This static function calls a slot after a given time interval.
@@ -416,3 +412,5 @@ int QTimer::remainingTime() const
 */
 
 QT_END_NAMESPACE
+
+#include "qtimer.moc"
index 23cab8f..80276d0 100644 (file)
 // We mean it.
 //
 
-QT_BEGIN_NAMESPACE
-
-QT_BEGIN_INCLUDE_NAMESPACE
-
 #include <qopenglframebufferobject.h>
 #include <private/qopenglcontext_p.h>
 #include <private/qopenglextensions_p.h>
 
-QT_END_INCLUDE_NAMESPACE
+QT_BEGIN_NAMESPACE
 
 #ifndef QT_OPENGL_ES
 #define DEFAULT_FORMAT GL_RGBA8
index c2b16f9..b03214a 100644 (file)
@@ -66,6 +66,7 @@
 #include "qglpaintdevice_p.h"
 
 #include <QtGui/QOpenGLContext>
+#include <QtOpenGL/private/qglextensions_p.h>
 
 QT_BEGIN_NAMESPACE
 
@@ -73,10 +74,6 @@ class QGLContext;
 class QGLOverlayWidget;
 class QPixmap;
 
-QT_BEGIN_INCLUDE_NAMESPACE
-#include <QtOpenGL/private/qglextensions_p.h>
-QT_END_INCLUDE_NAMESPACE
-
 class QGLFormatPrivate
 {
 public:
index 37d786c..bab8491 100644 (file)
 // We mean it.
 //
 
-QT_BEGIN_NAMESPACE
-
-QT_BEGIN_INCLUDE_NAMESPACE
-
 #include <qglframebufferobject.h>
 #include <private/qglpaintdevice_p.h>
 #include <private/qgl_p.h>
 
-QT_END_INCLUDE_NAMESPACE
+QT_BEGIN_NAMESPACE
 
 #ifndef QT_OPENGL_ES
 #define DEFAULT_FORMAT GL_RGBA8
index 227d35a..105fc5f 100644 (file)
 // We mean it.
 //
 
-QT_BEGIN_NAMESPACE
-
-QT_BEGIN_INCLUDE_NAMESPACE
 #include "QtOpenGL/qglpixelbuffer.h"
 #include <private/qgl_p.h>
 #include <private/qglpaintdevice_p.h>
-QT_END_INCLUDE_NAMESPACE
+
+QT_BEGIN_NAMESPACE
 
 class QEglContext;
 
index a5f5d6b..fb7b025 100644 (file)
@@ -158,10 +158,6 @@ private:
     }
 };
 
-QT_BEGIN_INCLUDE_NAMESPACE
-#include "qinputdialog.moc"
-QT_END_INCLUDE_NAMESPACE
-
 class QInputDialogPrivate : public QDialogPrivate
 {
     Q_DECLARE_PUBLIC(QInputDialog)
@@ -1395,6 +1391,7 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
 
 QT_END_NAMESPACE
 
+#include "qinputdialog.moc"
 #include "moc_qinputdialog.cpp"
 
 #endif // QT_NO_INPUTDIALOG
index 9a13922..a7da8dc 100644 (file)
@@ -165,14 +165,11 @@ private:
 
 };
 
+QT_END_NAMESPACE
 
 //### support old includes
-QT_BEGIN_INCLUDE_NAMESPACE
 #include <QtWidgets/qboxlayout.h>
 #include <QtWidgets/qgridlayout.h>
-QT_END_INCLUDE_NAMESPACE
-
-QT_END_NAMESPACE
 
 QT_END_HEADER
 
index a49f6dc..b981c92 100644 (file)
 #include "qwindowsmobilestyle.h"
 #endif
 
-QT_BEGIN_NAMESPACE
-
 #if !defined(QT_NO_STYLE_MAC) && defined(Q_OS_MAC)
-QT_BEGIN_INCLUDE_NAMESPACE
 #  include "qmacstyle_mac.h"
-QT_END_INCLUDE_NAMESPACE
 #endif
 
+QT_BEGIN_NAMESPACE
+
 #ifndef QT_NO_LIBRARY
 Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
     (QStyleFactoryInterface_iid, QLatin1String("/styles"), Qt::CaseInsensitive))