From 7ed5f3b867db5eb5b0bd6dc49828e0e6931b60f9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 3 Sep 2012 16:56:48 +0200 Subject: 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 --- src/widgets/dialogs/qinputdialog.cpp | 5 +---- src/widgets/kernel/qlayout.h | 5 +---- src/widgets/styles/qstylefactory.cpp | 6 ++---- 3 files changed, 4 insertions(+), 12 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp index a5f5d6b7b9..fb7b025483 100644 --- a/src/widgets/dialogs/qinputdialog.cpp +++ b/src/widgets/dialogs/qinputdialog.cpp @@ -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 diff --git a/src/widgets/kernel/qlayout.h b/src/widgets/kernel/qlayout.h index 9a13922cb1..a7da8dc4e7 100644 --- a/src/widgets/kernel/qlayout.h +++ b/src/widgets/kernel/qlayout.h @@ -165,14 +165,11 @@ private: }; +QT_END_NAMESPACE //### support old includes -QT_BEGIN_INCLUDE_NAMESPACE #include #include -QT_END_INCLUDE_NAMESPACE - -QT_END_NAMESPACE QT_END_HEADER diff --git a/src/widgets/styles/qstylefactory.cpp b/src/widgets/styles/qstylefactory.cpp index a49f6dcdf1..b981c92505 100644 --- a/src/widgets/styles/qstylefactory.cpp +++ b/src/widgets/styles/qstylefactory.cpp @@ -70,14 +70,12 @@ #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)) -- cgit v1.2.3