Make sure that we #include qconfig.h before testing for features.

This is mandatory in public headers (qiodevice.h, qopengl*, etc.), but
it's a good idea even in private headers, in case someone includes
that header first somewhere. In particular, all platformsupport API is
private.

Change-Id: If287baa5d9ed14e93c1666efa0e6332c4c1cd9a4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Thiago Macieira 2013-03-10 13:34:52 -07:00 committed by The Qt Project
parent a1bc48422f
commit d1b4857d17
37 changed files with 77 additions and 5 deletions

View File

@ -42,6 +42,7 @@
#ifndef QIODEVICE_H #ifndef QIODEVICE_H
#define QIODEVICE_H #define QIODEVICE_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_QOBJECT #ifndef QT_NO_QOBJECT
#include <QtCore/qobject.h> #include <QtCore/qobject.h>
#else #else

View File

@ -42,6 +42,8 @@
#ifndef QFUNCTIONS_NACL_H #ifndef QFUNCTIONS_NACL_H
#define QFUNCTIONS_NACL_H #define QFUNCTIONS_NACL_H
#include <QtCore/qglobal.h>
#ifdef Q_OS_NACL #ifdef Q_OS_NACL
#include <sys/types.h> #include <sys/types.h>

View File

@ -41,6 +41,9 @@
#ifndef QFUNCTIONS_VXWORKS_H #ifndef QFUNCTIONS_VXWORKS_H
#define QFUNCTIONS_VXWORKS_H #define QFUNCTIONS_VXWORKS_H
#include <QtCore/qglobal.h>
#ifdef Q_OS_VXWORKS #ifdef Q_OS_VXWORKS
#include <unistd.h> #include <unistd.h>

View File

@ -41,6 +41,9 @@
#ifndef QFUNCTIONS_WINCE_H #ifndef QFUNCTIONS_WINCE_H
#define QFUNCTIONS_WINCE_H #define QFUNCTIONS_WINCE_H
#include <QtCore/qglobal.h>
#ifdef Q_OS_WINCE #ifdef Q_OS_WINCE
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -42,6 +42,8 @@
#ifndef QTIMER_H #ifndef QTIMER_H
#define QTIMER_H #define QTIMER_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_QOBJECT #ifndef QT_NO_QOBJECT
#include <QtCore/qbasictimer.h> // conceptual inheritance #include <QtCore/qbasictimer.h> // conceptual inheritance

View File

@ -42,6 +42,8 @@
#ifndef QREGEXP_H #ifndef QREGEXP_H
#define QREGEXP_H #define QREGEXP_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGEXP
#include <QtCore/qstring.h> #include <QtCore/qstring.h>

View File

@ -43,6 +43,8 @@
#ifndef QREGULAREXPRESSION_H #ifndef QREGULAREXPRESSION_H
#define QREGULAREXPRESSION_H #define QREGULAREXPRESSION_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_REGULAREXPRESSION #ifndef QT_NO_REGULAREXPRESSION
#include <QtCore/qstring.h> #include <QtCore/qstring.h>

View File

@ -39,6 +39,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtCore/qglobal.h>
#ifndef QT_NO_ACCESSIBILITY #ifndef QT_NO_ACCESSIBILITY
#ifndef QACCESSIBLE_H #ifndef QACCESSIBLE_H
#define QACCESSIBLE_H #define QACCESSIBLE_H

View File

@ -42,6 +42,8 @@
#ifndef QICONLOADER_P_H #ifndef QICONLOADER_P_H
#define QICONLOADER_P_H #define QICONLOADER_P_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_ICON #ifndef QT_NO_ICON
// //
// W A R N I N G // W A R N I N G

View File

@ -42,6 +42,8 @@
#ifndef QOPENGLCONTEXT_H #ifndef QOPENGLCONTEXT_H
#define QOPENGLCONTEXT_H #define QOPENGLCONTEXT_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#include <QtCore/qnamespace.h> #include <QtCore/qnamespace.h>

View File

@ -51,9 +51,10 @@
// source and binary incompatible with future versions of Qt. // source and binary incompatible with future versions of Qt.
// //
#include <QtCore/qnamespace.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#include <QtCore/qnamespace.h>
#include <QtGui/qsurfaceformat.h> #include <QtGui/qsurfaceformat.h>
#include <QtGui/qwindow.h> #include <QtGui/qwindow.h>
#include <QtGui/qopengl.h> #include <QtGui/qopengl.h>

View File

@ -42,10 +42,10 @@
#ifndef QOPENGL_H #ifndef QOPENGL_H
#define QOPENGL_H #define QOPENGL_H
#ifndef QT_NO_OPENGL
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL
// Windows always needs this to ensure that APIENTRY gets defined // Windows always needs this to ensure that APIENTRY gets defined
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
# include <QtCore/qt_windows.h> # include <QtCore/qt_windows.h>

View File

@ -42,6 +42,8 @@
#ifndef QOPENGLBUFFER_H #ifndef QOPENGLBUFFER_H
#define QOPENGLBUFFER_H #define QOPENGLBUFFER_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#include <QtCore/qscopedpointer.h> #include <QtCore/qscopedpointer.h>

View File

@ -42,6 +42,8 @@
#ifndef QOPENGLFRAMEBUFFEROBJECT_H #ifndef QOPENGLFRAMEBUFFEROBJECT_H
#define QOPENGLFRAMEBUFFEROBJECT_H #define QOPENGLFRAMEBUFFEROBJECT_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#include <QtGui/qopengl.h> #include <QtGui/qopengl.h>

View File

@ -42,6 +42,8 @@
#ifndef QOPENGLFUNCTIONS_H #ifndef QOPENGLFUNCTIONS_H
#define QOPENGLFUNCTIONS_H #define QOPENGLFUNCTIONS_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#ifdef __GLEW_H__ #ifdef __GLEW_H__

View File

@ -42,6 +42,8 @@
#ifndef QOPENGLPAINTDEVICE_H #ifndef QOPENGLPAINTDEVICE_H
#define QOPENGLPAINTDEVICE_H #define QOPENGLPAINTDEVICE_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#include <QtGui/qpaintdevice.h> #include <QtGui/qpaintdevice.h>

View File

@ -42,6 +42,8 @@
#ifndef QOPENGLSHADERPROGRAM_H #ifndef QOPENGLSHADERPROGRAM_H
#define QOPENGLSHADERPROGRAM_H #define QOPENGLSHADERPROGRAM_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#include <QtGui/qopengl.h> #include <QtGui/qopengl.h>

View File

@ -51,9 +51,10 @@
#ifndef QOPENGLVERSIONFUNCTIONS_H #ifndef QOPENGLVERSIONFUNCTIONS_H
#define QOPENGLVERSIONFUNCTIONS_H #define QOPENGLVERSIONFUNCTIONS_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#include <QtCore/QtGlobal>
#include <QtCore/qhash.h> #include <QtCore/qhash.h>
#include <QtCore/qpair.h> #include <QtCore/qpair.h>
#include <QtGui/qopengl.h> #include <QtGui/qopengl.h>

View File

@ -41,6 +41,9 @@
#ifndef QTEXTODFWRITER_H #ifndef QTEXTODFWRITER_H
#define QTEXTODFWRITER_H #define QTEXTODFWRITER_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_TEXTODFWRITER #ifndef QT_NO_TEXTODFWRITER
// //

View File

@ -42,6 +42,8 @@
#ifndef QZIPREADER_H #ifndef QZIPREADER_H
#define QZIPREADER_H #define QZIPREADER_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_TEXTODFWRITER #ifndef QT_NO_TEXTODFWRITER
// //

View File

@ -40,6 +40,9 @@
****************************************************************************/ ****************************************************************************/
#ifndef QZIPWRITER_H #ifndef QZIPWRITER_H
#define QZIPWRITER_H #define QZIPWRITER_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_TEXTODFWRITER #ifndef QT_NO_TEXTODFWRITER
// //

View File

@ -51,9 +51,10 @@
#ifndef QOPENGLEXTENSIONS_H #ifndef QOPENGLEXTENSIONS_H
#define QOPENGLEXTENSIONS_H #define QOPENGLEXTENSIONS_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
#include <QtCore/QtGlobal>
#include <QtGui/qopengl.h> #include <QtGui/qopengl.h>
class QOpenGLContext; class QOpenGLContext;

View File

@ -42,6 +42,8 @@
#ifndef QGENERICUNIXFONTDATABASE_H #ifndef QGENERICUNIXFONTDATABASE_H
#define QGENERICUNIXFONTDATABASE_H #define QGENERICUNIXFONTDATABASE_H
#include <QtCore/qglobal.h>
#ifdef Q_FONTCONFIGDATABASE #ifdef Q_FONTCONFIGDATABASE
#include <QtPlatformSupport/private/qfontconfigdatabase_p.h> #include <QtPlatformSupport/private/qfontconfigdatabase_p.h>
typedef QFontconfigDatabase QGenericUnixFontDatabase; typedef QFontconfigDatabase QGenericUnixFontDatabase;

View File

@ -41,6 +41,7 @@
#ifndef QCOCOAACCESIBILITYELEMENT_H #ifndef QCOCOAACCESIBILITYELEMENT_H
#define QCOCOAACCESIBILITYELEMENT_H #define QCOCOAACCESIBILITYELEMENT_H
#include <QtCore/qglobal.h>
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <AppKit/NSAccessibility.h> #import <AppKit/NSAccessibility.h>

View File

@ -43,6 +43,8 @@
#ifndef QCOCOASYSTEMTRAYICON_P_H #ifndef QCOCOASYSTEMTRAYICON_P_H
#define QCOCOASYSTEMTRAYICON_P_H #define QCOCOASYSTEMTRAYICON_P_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_SYSTEMTRAYICON #ifndef QT_NO_SYSTEMTRAYICON
#include "QtCore/qstring.h" #include "QtCore/qstring.h"

View File

@ -53,6 +53,8 @@
// We mean it. // We mean it.
// //
#include <QtCore/qglobal.h>
#ifndef QT_NO_PRINTER #ifndef QT_NO_PRINTER
#include <QtPrintSupport/qprinter.h> #include <QtPrintSupport/qprinter.h>

View File

@ -42,6 +42,8 @@
#ifndef QQNXCLIPBOARD_H #ifndef QQNXCLIPBOARD_H
#define QQNXCLIPBOARD_H #define QQNXCLIPBOARD_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
#include <qpa/qplatformclipboard.h> #include <qpa/qplatformclipboard.h>

View File

@ -42,6 +42,8 @@
#ifndef QWINDOWSFONTENGINEDIRECTWRITE_H #ifndef QWINDOWSFONTENGINEDIRECTWRITE_H
#define QWINDOWSFONTENGINEDIRECTWRITE_H #define QWINDOWSFONTENGINEDIRECTWRITE_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_DIRECTWRITE #ifndef QT_NO_DIRECTWRITE
#include <QtGui/private/qfontengine_p.h> #include <QtGui/private/qfontengine_p.h>

View File

@ -53,6 +53,8 @@
// We mean it. // We mean it.
// //
#include <QtCore/qglobal.h>
#ifndef QT_NO_PRINTER #ifndef QT_NO_PRINTER
#include "private/qpaintengine_p.h" #include "private/qpaintengine_p.h"
#include <QtPrintSupport/qtprintsupportglobal.h> #include <QtPrintSupport/qtprintsupportglobal.h>

View File

@ -53,6 +53,8 @@
// We mean it. // We mean it.
// //
#include <QtCore/qglobal.h>
#ifndef QT_NO_PRINTER #ifndef QT_NO_PRINTER
#include <QtGui/qpaintengine.h> #include <QtGui/qpaintengine.h>

View File

@ -53,6 +53,8 @@
// We mean it. // We mean it.
// //
#include <QtCore/qglobal.h>
#ifdef QT_PLUGIN #ifdef QT_PLUGIN
#define Q_EXPORT_SQLDRIVER_DB2 #define Q_EXPORT_SQLDRIVER_DB2
#else #else

View File

@ -47,6 +47,8 @@
#pragma qt_no_master_include #pragma qt_no_master_include
#endif #endif
#include <QtCore/qglobal.h>
#ifndef QT_NO_ACCESSIBILITY #ifndef QT_NO_ACCESSIBILITY
#define QVERIFY_EVENT(event) \ #define QVERIFY_EVENT(event) \

View File

@ -53,6 +53,8 @@
// We mean it. // We mean it.
// //
#include <QtCore/qglobal.h>
#ifndef QT_NO_FILEDIALOG #ifndef QT_NO_FILEDIALOG
#include "qfiledialog.h" #include "qfiledialog.h"

View File

@ -53,6 +53,8 @@
// We mean it. // We mean it.
// //
#include <QtCore/qglobal.h>
#ifndef QT_NO_WIZARD #ifndef QT_NO_WIZARD
#ifndef QT_NO_STYLE_WINDOWSVISTA #ifndef QT_NO_STYLE_WINDOWSVISTA

View File

@ -40,6 +40,9 @@
****************************************************************************/ ****************************************************************************/
#ifndef QWIDGETSFUNCTIONS_WCE_H #ifndef QWIDGETSFUNCTIONS_WCE_H
#define QWIDGETSFUNCTIONS_WCE_H #define QWIDGETSFUNCTIONS_WCE_H
#include <QtCore/qglobal.h>
#ifdef Q_OS_WINCE #ifdef Q_OS_WINCE
#include <QtCore/qfunctions_wince.h> #include <QtCore/qfunctions_wince.h>

View File

@ -39,6 +39,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtCore/qglobal.h>
#ifndef QT_NO_IMAGEFORMAT_XPM #ifndef QT_NO_IMAGEFORMAT_XPM
// //

View File

@ -53,6 +53,8 @@
// We mean it. // We mean it.
// //
#include <QtCore/qglobal.h>
#ifndef QT_NO_SCROLLAREA #ifndef QT_NO_SCROLLAREA
#include "private/qabstractscrollarea_p.h" #include "private/qabstractscrollarea_p.h"