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
#define QIODEVICE_H
#include <QtCore/qglobal.h>
#ifndef QT_NO_QOBJECT
#include <QtCore/qobject.h>
#else

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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