OSDN Git Service

make it obvious that defined Status before QSettings inclusion is bad
authorIvailo Monev <xakepa10@laimg.moc>
Mon, 7 Aug 2017 06:54:30 +0000 (06:54 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Mon, 7 Aug 2017 06:54:30 +0000 (06:54 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/io/qsettings.h

index b17d405..2844dd6 100644 (file)
 
 QT_BEGIN_HEADER
 
-QT_BEGIN_NAMESPACE
-QT_END_NAMESPACE
-
 #ifndef QT_NO_SETTINGS
 
-
 #include <ctype.h>
 
 QT_BEGIN_NAMESPACE
 
-#ifdef Status // we seem to pick up a macro Status --> int somewhere
-#undef Status
+#ifdef Status
+#error qsettings.h must be included before any header file that defines Status
 #endif
 
 class QIODevice;
@@ -183,14 +179,12 @@ public:
     static Format registerFormat(const QString &extension, ReadFunc readFunc, WriteFunc writeFunc,
                                  Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive);
 
-
 protected:
 #ifndef QT_NO_QOBJECT
     bool event(QEvent *event);
 #endif
 
 private:
-
     Q_DISABLE_COPY(QSettings)
 };