Clean up the EXPORT macros in qglobal.h.

QtPlatformSupport is a static library. It should never export
anything, so Q_PLATFORMSUPPORT_EXPORT is unnecessary.

QtSql, QtXml, QtDBus, QtOpenGL and QtPrintSupport now have the macros
on their own source trees. It's possible these modules might be
separated out from qtbase in the future. For QtDBus, the macros are
moving back to where they used to be. This also leaves qglobal.h only
creating the macros for QtCore, QtGui, QtWidgets and QtNetwork, the
core libraries.

Q_CANVAS_EXPORT, Q_OPENVG_EXPORT and Q_COMPAT_EXPORT aren't used
anywhere in the Qt sources, so simply delete them. And the
Q_QUICK1_EXPORT macro in the static section was wrong, so remove it
too.

Change-Id: I50bdf86e783338f814903b25979721f788a7becf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
bb10
Thiago Macieira 2012-06-06 20:04:41 +02:00 committed by Qt by Nokia
parent 92283176ac
commit 2b904294a8
24 changed files with 241 additions and 63 deletions

View File

@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 2012 Intel Corporation.
** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
@ -499,51 +500,23 @@ class QDataStream;
# else
# define Q_WIDGETS_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_PLATFORMSUPPORT_LIB)
# define Q_PLATFORMSUPPORT_EXPORT Q_DECL_EXPORT
# else
# define Q_PLATFORMSUPPORT_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_PRINTSUPPORT_LIB)
# define Q_PRINTSUPPORT_EXPORT Q_DECL_EXPORT
# else
# define Q_PRINTSUPPORT_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_SQL_LIB)
# define Q_SQL_EXPORT Q_DECL_EXPORT
# else
# define Q_SQL_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_NETWORK_LIB)
# define Q_NETWORK_EXPORT Q_DECL_EXPORT
# else
# define Q_NETWORK_EXPORT Q_DECL_IMPORT
# endif
// ### Remove the following once their modules have been updated
# if defined(QT_BUILD_SVG_LIB)
# define Q_SVG_EXPORT Q_DECL_EXPORT
# else
# define Q_SVG_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_OPENGL_LIB)
# define Q_OPENGL_EXPORT Q_DECL_EXPORT
# else
# define Q_OPENGL_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_MULTIMEDIA_LIB)
# define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT
# else
# define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_OPENVG_LIB)
# define Q_OPENVG_EXPORT Q_DECL_EXPORT
# else
# define Q_OPENVG_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_XML_LIB)
# define Q_XML_EXPORT Q_DECL_EXPORT
# else
# define Q_XML_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_XMLPATTERNS_LIB)
# define Q_XMLPATTERNS_EXPORT Q_DECL_EXPORT
# else
@ -559,42 +532,16 @@ class QDataStream;
# else
# define Q_SCRIPTTOOLS_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_CANVAS_LIB)
# define Q_CANVAS_EXPORT Q_DECL_EXPORT
# else
# define Q_CANVAS_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_COMPAT_LIB)
# define Q_COMPAT_EXPORT Q_DECL_EXPORT
# else
# define Q_COMPAT_EXPORT Q_DECL_IMPORT
# endif
# if defined(QT_BUILD_DBUS_LIB)
# define Q_DBUS_EXPORT Q_DECL_EXPORT
# else
# define Q_DBUS_EXPORT Q_DECL_IMPORT
# endif
# endif
#else
# define Q_CORE_EXPORT
# define Q_GUI_EXPORT
# define Q_WIDGETS_EXPORT
# define Q_PLATFORMSUPPORT_EXPORT
# define Q_PRINTSUPPORT_EXPORT
# define Q_SQL_EXPORT
# define Q_NETWORK_EXPORT
# define Q_SVG_EXPORT
# define Q_QUICK1_EXPORT
# define Q_DECLARATIVE_EXPORT
# define Q_OPENGL_EXPORT
# define Q_MULTIMEDIA_EXPORT
# define Q_OPENVG_EXPORT
# define Q_XML_EXPORT
# define Q_SCRIPT_EXPORT
# define Q_SCRIPTTOOLS_EXPORT
# define Q_CANVAS_EXPORT
# define Q_COMPAT_EXPORT
# define Q_DBUS_EXPORT
#endif
/*

View File

@ -57,13 +57,24 @@
#include <QtCore/qvector.h>
#endif
// prevent syncqt complaints
#ifndef QT_NO_DBUS
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_DBUS
#ifndef QT_STATIC
# if defined(QT_BUILD_DBUS_LIB)
# define Q_DBUS_EXPORT Q_DECL_EXPORT
# else
# define Q_DBUS_EXPORT Q_DECL_IMPORT
# endif
#else
# define Q_DBUS_EXPORT
#endif
#endif // QT_NO_DBUS
QT_END_NAMESPACE
QT_END_HEADER
#endif // QT_NO_DBUS
#endif

View File

@ -29,7 +29,7 @@ HEADERS += qgl.h \
qglextensions_p.h \
qglpaintdevice_p.h \
qglbuffer.h \
qtopenglglobal.h
SOURCES += qgl.cpp \
qglcolormap.cpp \

View File

@ -44,6 +44,7 @@
#include <QtGui/qcolor.h>
#include <QtCore/qvector.h>
#include <QtOpenGL/qtopenglglobal.h>
QT_BEGIN_HEADER

View File

@ -54,6 +54,7 @@
//
#include <QtWidgets/qgraphicseffect.h>
#include <QtOpenGL/qtopenglglobal.h>
QT_BEGIN_HEADER

View File

@ -0,0 +1,65 @@
/****************************************************************************
**
** Copyright (C) 2012 Intel Corporation.
** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QTOPENGLGLOBAL_H
#define QTOPENGLGLOBAL_H
#include <QtCore/qglobal.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_STATIC
# if defined(QT_BUILD_OPENGL_LIB)
# define Q_OPENGL_EXPORT Q_DECL_EXPORT
# else
# define Q_OPENGL_EXPORT Q_DECL_IMPORT
# endif
#else
# define Q_OPENGL_EXPORT
#endif
QT_END_NAMESPACE
QT_END_HEADER
#endif // QTOPENGLGLOBAL_H

View File

@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
class QUnixEventDispatcherQPAPrivate;
class Q_PLATFORMSUPPORT_EXPORT QUnixEventDispatcherQPA : public QEventDispatcherUNIX
class QUnixEventDispatcherQPA : public QEventDispatcherUNIX
{
Q_OBJECT
Q_DECLARE_PRIVATE(QUnixEventDispatcherQPA)

View File

@ -43,6 +43,7 @@
#define QABSTRACTPAGESETUPDIALOG_H
#include <QtWidgets/qdialog.h>
#include <QtPrintSupport/qtprintsupportglobal.h>
QT_BEGIN_HEADER

View File

@ -43,6 +43,7 @@
#define QABSTRACTPRINTDIALOG_H
#include <QtWidgets/qdialog.h>
#include <QtPrintSupport/qtprintsupportglobal.h>
QT_BEGIN_HEADER

View File

@ -43,6 +43,7 @@
#define QPRINTPREVIEWDIALOG_H
#include <QtWidgets/qdialog.h>
#include <QtPrintSupport/qtprintsupportglobal.h>
#ifndef QT_NO_PRINTPREVIEWDIALOG

View File

@ -7,7 +7,8 @@ HEADERS += \
$$PWD/qprinterinfo.h \
$$PWD/qprinterinfo_p.h \
$$PWD/qplatformprintplugin.h \
$$PWD/qplatformprintersupport.h
$$PWD/qplatformprintersupport.h \
$$PWD/qtprintsupportglobal.h
SOURCES += \
$$PWD/qpaintengine_alpha.cpp \

View File

@ -55,6 +55,7 @@
#ifndef QT_NO_PRINTER
#include "private/qpaintengine_p.h"
#include <QtPrintSupport/qtprintsupportglobal.h>
QT_BEGIN_NAMESPACE

View File

@ -53,6 +53,7 @@
#include <QtCore/qplugin.h>
#include <QtCore/qfactoryinterface.h>
#include <QtPrintSupport/qtprintsupportglobal.h>
QT_BEGIN_HEADER

View File

@ -45,6 +45,7 @@
#include <QtCore/qstring.h>
#include <QtCore/qscopedpointer.h>
#include <QtGui/qpagedpaintdevice.h>
#include <QtPrintSupport/qtprintsupportglobal.h>
QT_BEGIN_HEADER

View File

@ -0,0 +1,65 @@
/****************************************************************************
**
** Copyright (C) 2012 Intel Corporation.
** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QTPRINTSUPPORTGLOBAL_H
#define QTPRINTSUPPORTGLOBAL_H
#include <QtCore/qglobal.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_STATIC
# if defined(QT_BUILD_PRINTSUPPORT_LIB)
# define Q_PRINTSUPPORT_EXPORT Q_DECL_EXPORT
# else
# define Q_PRINTSUPPORT_EXPORT Q_DECL_IMPORT
# endif
#else
# define Q_PRINTSUPPORT_EXPORT
#endif
QT_END_NAMESPACE
QT_END_HEADER
#endif // QTPRINTSUPPORTGLOBAL_H

View File

@ -48,6 +48,15 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_STATIC
# if defined(QT_BUILD_SQL_LIB)
# define Q_SQL_EXPORT Q_DECL_EXPORT
# else
# define Q_SQL_EXPORT Q_DECL_IMPORT
# endif
#else
# define Q_SQL_EXPORT
#endif
namespace QSql
{

View File

@ -44,6 +44,7 @@
#include <QtCore/qplugin.h>
#include <QtCore/qfactoryinterface.h>
#include <QtSql/qsql.h>
QT_BEGIN_HEADER

View File

@ -43,6 +43,7 @@
#define QSQLERROR_H
#include <QtCore/qstring.h>
#include <QtSql/qsql.h>
QT_BEGIN_HEADER

View File

@ -44,6 +44,7 @@
#include <QtCore/qvariant.h>
#include <QtCore/qstring.h>
#include <QtSql/qsql.h>
QT_BEGIN_HEADER

View File

@ -43,6 +43,7 @@
#define QSQLRECORD_H
#include <QtCore/qstring.h>
#include <QtSql/qsql.h>
QT_BEGIN_HEADER

View File

@ -42,6 +42,7 @@
#ifndef QDOM_H
#define QDOM_H
#include <QtXml/qtxmlglobal.h>
#include <QtCore/qstring.h>
QT_BEGIN_HEADER

65
src/xml/qtxmlglobal.h Normal file
View File

@ -0,0 +1,65 @@
/****************************************************************************
**
** Copyright (C) 2012 Intel Corporation.
** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QTXMLGLOBAL_H
#define QTXMLGLOBAL_H
#include <QtCore/qglobal.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_STATIC
# if defined(QT_BUILD_XML_LIB)
# define Q_XML_EXPORT Q_DECL_EXPORT
# else
# define Q_XML_EXPORT Q_DECL_IMPORT
# endif
#else
# define Q_XML_EXPORT
#endif
QT_END_NAMESPACE
QT_END_HEADER
#endif // QTXMLGLOBAL_H

View File

@ -42,6 +42,7 @@
#ifndef QXML_H
#define QXML_H
#include <QtXml/qtxmlglobal.h>
#include <QtCore/qtextstream.h>
#include <QtCore/qfile.h>
#include <QtCore/qstring.h>

View File

@ -8,6 +8,7 @@ win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x61000000
load(qt_module_config)
HEADERS += qtxmlglobal.h
QMAKE_DOCS = $$PWD/doc/qtxml.qdocconf
QMAKE_DOCS_INDEX = ../../doc