don't use QT_{BEGIN,END}_INCLUDE_NAMESPACE needlessly

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>
This commit is contained in:
Oswald Buddenhagen 2012-09-03 16:56:48 +02:00 committed by Qt by Nokia
parent 6a3a234742
commit 7ed5f3b867
8 changed files with 11 additions and 34 deletions

View File

@ -292,10 +292,6 @@ void QSingleShotTimer::timerEvent(QTimerEvent *)
qDeleteInEventHandler(this); qDeleteInEventHandler(this);
} }
QT_BEGIN_INCLUDE_NAMESPACE
#include "qtimer.moc"
QT_END_INCLUDE_NAMESPACE
/*! /*!
\reentrant \reentrant
This static function calls a slot after a given time interval. This static function calls a slot after a given time interval.
@ -416,3 +412,5 @@ int QTimer::remainingTime() const
*/ */
QT_END_NAMESPACE QT_END_NAMESPACE
#include "qtimer.moc"

View File

@ -53,15 +53,11 @@
// We mean it. // We mean it.
// //
QT_BEGIN_NAMESPACE
QT_BEGIN_INCLUDE_NAMESPACE
#include <qopenglframebufferobject.h> #include <qopenglframebufferobject.h>
#include <private/qopenglcontext_p.h> #include <private/qopenglcontext_p.h>
#include <private/qopenglextensions_p.h> #include <private/qopenglextensions_p.h>
QT_END_INCLUDE_NAMESPACE QT_BEGIN_NAMESPACE
#ifndef QT_OPENGL_ES #ifndef QT_OPENGL_ES
#define DEFAULT_FORMAT GL_RGBA8 #define DEFAULT_FORMAT GL_RGBA8

View File

@ -66,6 +66,7 @@
#include "qglpaintdevice_p.h" #include "qglpaintdevice_p.h"
#include <QtGui/QOpenGLContext> #include <QtGui/QOpenGLContext>
#include <QtOpenGL/private/qglextensions_p.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -73,10 +74,6 @@ class QGLContext;
class QGLOverlayWidget; class QGLOverlayWidget;
class QPixmap; class QPixmap;
QT_BEGIN_INCLUDE_NAMESPACE
#include <QtOpenGL/private/qglextensions_p.h>
QT_END_INCLUDE_NAMESPACE
class QGLFormatPrivate class QGLFormatPrivate
{ {
public: public:

View File

@ -53,15 +53,11 @@
// We mean it. // We mean it.
// //
QT_BEGIN_NAMESPACE
QT_BEGIN_INCLUDE_NAMESPACE
#include <qglframebufferobject.h> #include <qglframebufferobject.h>
#include <private/qglpaintdevice_p.h> #include <private/qglpaintdevice_p.h>
#include <private/qgl_p.h> #include <private/qgl_p.h>
QT_END_INCLUDE_NAMESPACE QT_BEGIN_NAMESPACE
#ifndef QT_OPENGL_ES #ifndef QT_OPENGL_ES
#define DEFAULT_FORMAT GL_RGBA8 #define DEFAULT_FORMAT GL_RGBA8

View File

@ -53,13 +53,11 @@
// We mean it. // We mean it.
// //
QT_BEGIN_NAMESPACE
QT_BEGIN_INCLUDE_NAMESPACE
#include "QtOpenGL/qglpixelbuffer.h" #include "QtOpenGL/qglpixelbuffer.h"
#include <private/qgl_p.h> #include <private/qgl_p.h>
#include <private/qglpaintdevice_p.h> #include <private/qglpaintdevice_p.h>
QT_END_INCLUDE_NAMESPACE
QT_BEGIN_NAMESPACE
class QEglContext; class QEglContext;

View File

@ -158,10 +158,6 @@ private:
} }
}; };
QT_BEGIN_INCLUDE_NAMESPACE
#include "qinputdialog.moc"
QT_END_INCLUDE_NAMESPACE
class QInputDialogPrivate : public QDialogPrivate class QInputDialogPrivate : public QDialogPrivate
{ {
Q_DECLARE_PUBLIC(QInputDialog) Q_DECLARE_PUBLIC(QInputDialog)
@ -1395,6 +1391,7 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
QT_END_NAMESPACE QT_END_NAMESPACE
#include "qinputdialog.moc"
#include "moc_qinputdialog.cpp" #include "moc_qinputdialog.cpp"
#endif // QT_NO_INPUTDIALOG #endif // QT_NO_INPUTDIALOG

View File

@ -165,14 +165,11 @@ private:
}; };
QT_END_NAMESPACE
//### support old includes //### support old includes
QT_BEGIN_INCLUDE_NAMESPACE
#include <QtWidgets/qboxlayout.h> #include <QtWidgets/qboxlayout.h>
#include <QtWidgets/qgridlayout.h> #include <QtWidgets/qgridlayout.h>
QT_END_INCLUDE_NAMESPACE
QT_END_NAMESPACE
QT_END_HEADER QT_END_HEADER

View File

@ -70,14 +70,12 @@
#include "qwindowsmobilestyle.h" #include "qwindowsmobilestyle.h"
#endif #endif
QT_BEGIN_NAMESPACE
#if !defined(QT_NO_STYLE_MAC) && defined(Q_OS_MAC) #if !defined(QT_NO_STYLE_MAC) && defined(Q_OS_MAC)
QT_BEGIN_INCLUDE_NAMESPACE
# include "qmacstyle_mac.h" # include "qmacstyle_mac.h"
QT_END_INCLUDE_NAMESPACE
#endif #endif
QT_BEGIN_NAMESPACE
#ifndef QT_NO_LIBRARY #ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QStyleFactoryInterface_iid, QLatin1String("/styles"), Qt::CaseInsensitive)) (QStyleFactoryInterface_iid, QLatin1String("/styles"), Qt::CaseInsensitive))