From 2e95ce7459c98f17f5b8d0c983bfb32102fd9932 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 19 Aug 2011 10:39:45 +0200 Subject: [PATCH] Fix build. - Introduced EXPORT definition for new QPrintSupport library. - Fixed dependencies in src.pro - Fixed some includes. Change-Id: I9863233ca2767928b37cf3fd1fdec31351b5da6b Reviewed-on: http://codereview.qt.nokia.com/3253 Reviewed-by: Qt Sanity Bot Reviewed-by: Friedemann Kleint --- src/corelib/global/qglobal.h | 16 +++ src/gui/painting/qpdfwriter.h | 1 + .../platforms/windows/qwindowsintegration.cpp | 9 -- .../platforms/windows/qwindowsintegration.h | 1 - .../platforms/windows/qwindowsnativeimage.cpp | 1 - .../platforms/windows/qwindowsprintersupport.cpp | 134 --------------------- .../platforms/windows/qwindowsprintersupport.h | 62 ---------- src/plugins/platforms/windows/windows.pro | 2 - .../dialogs/qabstractpagesetupdialog.h | 2 +- src/printsupport/dialogs/qabstractprintdialog.h | 2 +- src/printsupport/dialogs/qpagesetupdialog.h | 2 +- src/printsupport/dialogs/qprintdialog.h | 4 +- src/printsupport/dialogs/qprintpreviewdialog.h | 2 +- src/printsupport/kernel/qcups_p.h | 2 +- .../kernel/qplatformprintersupport_qpa.h | 2 +- src/printsupport/kernel/qplatformprintplugin_qpa.h | 2 +- src/printsupport/kernel/qprintengine.h | 2 +- src/printsupport/kernel/qprintengine_pdf.cpp | 4 + src/printsupport/kernel/qprintengine_pdf_p.h | 4 +- src/printsupport/kernel/qprinter.cpp | 4 +- src/printsupport/kernel/qprinter.h | 2 +- src/printsupport/kernel/qprinter_p.h | 2 +- src/printsupport/kernel/qprinterinfo.h | 2 +- src/printsupport/kernel/qprinterinfo_unix.cpp | 2 +- src/printsupport/widgets/qprintpreviewwidget.h | 2 +- src/src.pro | 6 +- 26 files changed, 43 insertions(+), 231 deletions(-) delete mode 100644 src/plugins/platforms/windows/qwindowsprintersupport.cpp delete mode 100644 src/plugins/platforms/windows/qwindowsprintersupport.h diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 2f6f33e..94e0197 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1265,6 +1265,11 @@ class QDataStream; # else # define Q_WIDGETS_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 @@ -1350,6 +1355,7 @@ class QDataStream; # define Q_CORE_EXPORT Q_DECL_IMPORT # define Q_GUI_EXPORT Q_DECL_IMPORT # define Q_WIDGETS_EXPORT Q_DECL_IMPORT +# define Q_PRINTSUPPORT_EXPORT Q_DECL_IMPORT # define Q_SQL_EXPORT Q_DECL_IMPORT # define Q_NETWORK_EXPORT Q_DECL_IMPORT # define Q_SVG_EXPORT Q_DECL_IMPORT @@ -1383,6 +1389,7 @@ class QDataStream; # define Q_CORE_EXPORT Q_DECL_EXPORT # define Q_GUI_EXPORT Q_DECL_EXPORT # define Q_WIDGETS_EXPORT Q_DECL_EXPORT +# define Q_PRINTSUPPORT_EXPORT Q_DECL_EXPORT # define Q_SQL_EXPORT Q_DECL_EXPORT # define Q_NETWORK_EXPORT Q_DECL_EXPORT # define Q_SVG_EXPORT Q_DECL_EXPORT @@ -1402,6 +1409,7 @@ class QDataStream; # define Q_CORE_EXPORT # define Q_GUI_EXPORT # define Q_WIDGETS_EXPORT +# define Q_PRINTSUPPORT_EXPORT # define Q_SQL_EXPORT # define Q_NETWORK_EXPORT # define Q_SVG_EXPORT @@ -1437,6 +1445,11 @@ class QDataStream; # else # define Q_WIDGETS_EXPORT_INLINE inline # endif +# if defined(QT_BUILD_PRINTSUPPORT_LIB) +# define Q_PRINTSUPPORT_EXPORT_INLINE Q_PRINTSUPPORT_EXPORT inline +# else +# define Q_PRINTSUPPORT_EXPORT_INLINE inline +# endif # if defined(QT_BUILD_COMPAT_LIB) # define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline # else @@ -1449,11 +1462,13 @@ class QDataStream; # define Q_CORE_EXPORT_INLINE inline # define Q_GUI_EXPORT_INLINE inline # define Q_WIDGETS_EXPORT_INLINE inline +# define Q_PRINTSUPPORT_EXPORT_INLINE inline # define Q_COMPAT_EXPORT_INLINE inline #else # define Q_CORE_EXPORT_INLINE Q_CORE_EXPORT inline # define Q_GUI_EXPORT_INLINE Q_GUI_EXPORT inline # define Q_WIDGETS_EXPORT_INLINE Q_WIDGETS_EXPORT inline +# define Q_PRINTSUPPORT_EXPORT_INLINE Q_PRINTSUPPORT_EXPORT inline # define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline #endif @@ -2023,6 +2038,7 @@ static inline bool qIsNull(float f) return false; \ } #else + # define Q_DUMMY_COMPARISON_OPERATOR(C) #endif diff --git a/src/gui/painting/qpdfwriter.h b/src/gui/painting/qpdfwriter.h index b224c12..005d8e6 100644 --- a/src/gui/painting/qpdfwriter.h +++ b/src/gui/painting/qpdfwriter.h @@ -51,6 +51,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Gui) +class QIODevice; class QPdfWriterPrivate; class Q_GUI_EXPORT QPdfWriter : public QObject, public QPagedPaintDevice diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index a0fada2..e0ba369 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -46,7 +46,6 @@ #include "qwindowsglcontext.h" #include "qwindowsscreen.h" #include "qwindowsfontdatabase.h" -#include "qwindowsprintersupport.h" #include "qwindowsguieventdispatcher.h" #include "qwindowsclipboard.h" #include "qwindowsdrag.h" @@ -131,7 +130,6 @@ struct QWindowsIntegrationPrivate const bool m_openGL; QWindowsContext m_context; - QWindowsPrinterSupport m_printerSupport; QWindowsFontDatabase m_fontDatabase; QWindowsNativeInterface m_nativeInterface; QWindowsClipboard m_clipboard; @@ -232,13 +230,6 @@ QPlatformFontDatabase *QWindowsIntegration::fontDatabase() const return &d->m_fontDatabase; } -QPlatformPrinterSupport *QWindowsIntegration::printerSupport() const -{ - if (QWindowsContext::verboseIntegration) - qDebug() << __FUNCTION__; - return &d->m_printerSupport; -} - QPlatformNativeInterface *QWindowsIntegration::nativeInterface() const { return &d->m_nativeInterface; diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h index a2d3d3a..70f12f8 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.h +++ b/src/plugins/platforms/windows/qwindowsintegration.h @@ -67,7 +67,6 @@ public: virtual QPlatformDrag *drag() const; virtual QPlatformInputContext *inputContext() const; virtual QPlatformNativeInterface *nativeInterface() const; - virtual QPlatformPrinterSupport *printerSupport() const; virtual QPlatformFontDatabase *fontDatabase() const; static QWindowsIntegration *instance(); diff --git a/src/plugins/platforms/windows/qwindowsnativeimage.cpp b/src/plugins/platforms/windows/qwindowsnativeimage.cpp index 53311c5..2ecf334 100644 --- a/src/plugins/platforms/windows/qwindowsnativeimage.cpp +++ b/src/plugins/platforms/windows/qwindowsnativeimage.cpp @@ -42,7 +42,6 @@ #include "qwindowsnativeimage.h" #include "qwindowscontext.h" -#include #include #include diff --git a/src/plugins/platforms/windows/qwindowsprintersupport.cpp b/src/plugins/platforms/windows/qwindowsprintersupport.cpp deleted file mode 100644 index 3d43c61..0000000 --- a/src/plugins/platforms/windows/qwindowsprintersupport.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (info@qt.nokia.com) -** -** This file is part of the plugins 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$ -** -****************************************************************************/ - -#include "qwindowsprintersupport.h" - -#ifdef HAS_PRINTENGINE -# include -#endif - -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -QPrintEngine *QWindowsPrinterSupport::createNativePrintEngine(QPrinter::PrinterMode mode) -{ -#ifdef HAS_PRINTENGINE - return new QWin32PrintEngine(mode); -#else - Q_UNUSED(mode); - Q_UNIMPLEMENTED(); - return 0; -#endif -} - -QPaintEngine *QWindowsPrinterSupport::createPaintEngine(QPrintEngine *engine, QPrinter::PrinterMode) -{ -#ifdef HAS_PRINTENGINE - return static_cast(engine); -#else - Q_UNIMPLEMENTED(); - Q_UNUSED(engine); - return 0; -#endif -} - -QList QWindowsPrinterSupport::supportedPaperSizes(const QPrinterInfo &printerInfo) const -{ - QList paperSizes; - const QString printerName = printerInfo.printerName(); - const wchar_t *nameUtf16 = reinterpret_cast(printerName.utf16()); - DWORD size = DeviceCapabilities(nameUtf16, NULL, DC_PAPERS, NULL, NULL); - if ((int)size != -1) { - wchar_t *papers = new wchar_t[size]; - size = DeviceCapabilities(nameUtf16, NULL, DC_PAPERS, papers, NULL); -#ifdef HAS_PRINTENGINE - for (int c = 0; c < (int)size; ++c) - paperSizes.append(mapDevmodePaperSize(papers[c])); -#endif - delete [] papers; - } - return paperSizes; -} - -QList QWindowsPrinterSupport::availablePrinters() -{ - QList printers; - - DWORD needed = 0; - DWORD returned = 0; - if (!EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, NULL, 4, 0, 0, &needed, &returned)) { - LPBYTE buffer = new BYTE[needed]; - if (EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, NULL, 4, buffer, needed, &needed, &returned)) { - PPRINTER_INFO_4 infoList = reinterpret_cast(buffer); - QPrinterInfo defPrn = defaultPrinter(); - for (uint i = 0; i < returned; ++i) { - const QString printerName(QString::fromWCharArray(infoList[i].pPrinterName)); - const bool isDefault = printerName == defPrn.printerName(); - printers.append(QPlatformPrinterSupport::printerInfo(printerName, - isDefault)); - } - } - delete [] buffer; - } - - return printers; -} - -QPrinterInfo QWindowsPrinterSupport::defaultPrinter() -{ - QString noPrinters(QStringLiteral("qt_no_printers")); - wchar_t buffer[256]; - GetProfileString(L"windows", L"device", (wchar_t*)noPrinters.utf16(), buffer, 256); - QString output = QString::fromWCharArray(buffer); - if (output != noPrinters) { - // Filter out the name of the printer, which should be everything before a comma. - const QString printerName = output.split(QLatin1Char(',')).value(0); - return QPlatformPrinterSupport::printerInfo(printerName, true); - } - - return QPrinterInfo(); -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowsprintersupport.h b/src/plugins/platforms/windows/qwindowsprintersupport.h deleted file mode 100644 index c0a8190..0000000 --- a/src/plugins/platforms/windows/qwindowsprintersupport.h +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (info@qt.nokia.com) -** -** This file is part of the plugins 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 QWINDOWSPRINTERSUPPORT_H -#define QWINDOWSPRINTERSUPPORT_H - -#include - -QT_BEGIN_NAMESPACE - -class QWindowsPrinterSupport : public QPlatformPrinterSupport -{ -public: - virtual QPrintEngine *createNativePrintEngine(QPrinter::PrinterMode); - virtual QPaintEngine *createPaintEngine(QPrintEngine *, QPrinter::PrinterMode); - - virtual QList supportedPaperSizes(const QPrinterInfo &) const; - virtual QPrinterInfo defaultPrinter(); - virtual QList availablePrinters(); -}; - -QT_END_NAMESPACE - -#endif // QWINDOWSPRINTERSUPPORT_H diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro index c9be003..7e652f7 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -27,7 +27,6 @@ SOURCES += \ qwindowscontext.cpp \ qwindowsbackingstore.cpp \ qwindowsscreen.cpp \ - qwindowsprintersupport.cpp \ qwindowskeymapper.cpp \ qwindowsfontengine.cpp \ qwindowsfontdatabase.cpp \ @@ -48,7 +47,6 @@ HEADERS += \ qwindowscontext.h \ qwindowsbackingstore.h \ qwindowsscreen.h \ - qwindowsprintersupport.h \ qwindowskeymapper.h \ qwindowsfontengine.h \ qwindowsfontdatabase.h \ diff --git a/src/printsupport/dialogs/qabstractpagesetupdialog.h b/src/printsupport/dialogs/qabstractpagesetupdialog.h index a867a81..597a725 100644 --- a/src/printsupport/dialogs/qabstractpagesetupdialog.h +++ b/src/printsupport/dialogs/qabstractpagesetupdialog.h @@ -56,7 +56,7 @@ class QAbstractPageSetupDialogPrivate; class QPrinter; // ### Qt 5: Remove this class -class Q_WIDGETS_EXPORT QAbstractPageSetupDialog : public QDialog +class Q_PRINTSUPPORT_EXPORT QAbstractPageSetupDialog : public QDialog { Q_DECLARE_PRIVATE(QAbstractPageSetupDialog) Q_OBJECT diff --git a/src/printsupport/dialogs/qabstractprintdialog.h b/src/printsupport/dialogs/qabstractprintdialog.h index 29c05d5..2f8a750 100644 --- a/src/printsupport/dialogs/qabstractprintdialog.h +++ b/src/printsupport/dialogs/qabstractprintdialog.h @@ -56,7 +56,7 @@ class QAbstractPrintDialogPrivate; class QPrinter; // ### Qt 5: remove this class -class Q_WIDGETS_EXPORT QAbstractPrintDialog : public QDialog +class Q_PRINTSUPPORT_EXPORT QAbstractPrintDialog : public QDialog { Q_DECLARE_PRIVATE(QAbstractPrintDialog) Q_OBJECT diff --git a/src/printsupport/dialogs/qpagesetupdialog.h b/src/printsupport/dialogs/qpagesetupdialog.h index 3e983d3..1581ce6 100644 --- a/src/printsupport/dialogs/qpagesetupdialog.h +++ b/src/printsupport/dialogs/qpagesetupdialog.h @@ -54,7 +54,7 @@ QT_MODULE(Gui) class QPageSetupDialogPrivate; -class Q_WIDGETS_EXPORT QPageSetupDialog : public QAbstractPageSetupDialog +class Q_PRINTSUPPORT_EXPORT QPageSetupDialog : public QAbstractPageSetupDialog { Q_OBJECT Q_DECLARE_PRIVATE(QPageSetupDialog) diff --git a/src/printsupport/dialogs/qprintdialog.h b/src/printsupport/dialogs/qprintdialog.h index bb53ae6..1b04263 100644 --- a/src/printsupport/dialogs/qprintdialog.h +++ b/src/printsupport/dialogs/qprintdialog.h @@ -59,7 +59,7 @@ class QPrinter; #if defined (Q_OS_UNIX) && !defined(QTOPIA_PRINTDIALOG) && !defined(Q_WS_MAC) && !defined(Q_OS_SYMBIAN) class QUnixPrintWidgetPrivate; -class Q_WIDGETS_EXPORT QUnixPrintWidget : public QWidget +class Q_PRINTSUPPORT_EXPORT QUnixPrintWidget : public QWidget { Q_OBJECT @@ -78,7 +78,7 @@ private: }; #endif -class Q_WIDGETS_EXPORT QPrintDialog : public QAbstractPrintDialog +class Q_PRINTSUPPORT_EXPORT QPrintDialog : public QAbstractPrintDialog { Q_OBJECT Q_DECLARE_PRIVATE(QPrintDialog) diff --git a/src/printsupport/dialogs/qprintpreviewdialog.h b/src/printsupport/dialogs/qprintpreviewdialog.h index fa67f02..f2997b0 100644 --- a/src/printsupport/dialogs/qprintpreviewdialog.h +++ b/src/printsupport/dialogs/qprintpreviewdialog.h @@ -56,7 +56,7 @@ class QGraphicsView; class QPrintPreviewDialogPrivate; class QPrinter; -class Q_WIDGETS_EXPORT QPrintPreviewDialog : public QDialog +class Q_PRINTSUPPORT_EXPORT QPrintPreviewDialog : public QDialog { Q_OBJECT Q_DECLARE_PRIVATE(QPrintPreviewDialog) diff --git a/src/printsupport/kernel/qcups_p.h b/src/printsupport/kernel/qcups_p.h index 33a4e26..cb7a79e 100644 --- a/src/printsupport/kernel/qcups_p.h +++ b/src/printsupport/kernel/qcups_p.h @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(cups_option_t, Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE); -class Q_GUI_EXPORT QCUPSSupport +class Q_PRINTSUPPORT_EXPORT QCUPSSupport { public: struct Printer diff --git a/src/printsupport/kernel/qplatformprintersupport_qpa.h b/src/printsupport/kernel/qplatformprintersupport_qpa.h index 3fe4ff0..800713c 100644 --- a/src/printsupport/kernel/qplatformprintersupport_qpa.h +++ b/src/printsupport/kernel/qplatformprintersupport_qpa.h @@ -54,7 +54,7 @@ QT_MODULE(Gui) class QPrintEngine; -class Q_GUI_EXPORT QPlatformPrinterSupport +class Q_PRINTSUPPORT_EXPORT QPlatformPrinterSupport { public: QPlatformPrinterSupport(); diff --git a/src/printsupport/kernel/qplatformprintplugin_qpa.h b/src/printsupport/kernel/qplatformprintplugin_qpa.h index 7c7e329..831a054 100644 --- a/src/printsupport/kernel/qplatformprintplugin_qpa.h +++ b/src/printsupport/kernel/qplatformprintplugin_qpa.h @@ -73,7 +73,7 @@ struct QPlatformPrinterSupportFactoryInterface : public QFactoryInterface Q_DECLARE_INTERFACE(QPlatformPrinterSupportFactoryInterface, QPlatformPrinterSupportFactoryInterface_iid) -class Q_GUI_EXPORT QPlatformPrinterSupportPlugin : public QObject, public QPlatformPrinterSupportFactoryInterface +class Q_PRINTSUPPORT_EXPORT QPlatformPrinterSupportPlugin : public QObject, public QPlatformPrinterSupportFactoryInterface { Q_OBJECT Q_INTERFACES(QPlatformPrinterSupportFactoryInterface:QFactoryInterface) diff --git a/src/printsupport/kernel/qprintengine.h b/src/printsupport/kernel/qprintengine.h index 550079d..782b6ef 100644 --- a/src/printsupport/kernel/qprintengine.h +++ b/src/printsupport/kernel/qprintengine.h @@ -53,7 +53,7 @@ QT_MODULE(Gui) #ifndef QT_NO_PRINTER -class Q_GUI_EXPORT QPrintEngine +class Q_PRINTSUPPORT_EXPORT QPrintEngine { public: virtual ~QPrintEngine() {} diff --git a/src/printsupport/kernel/qprintengine_pdf.cpp b/src/printsupport/kernel/qprintengine_pdf.cpp index eb1bf16..c8ce2cf 100644 --- a/src/printsupport/kernel/qprintengine_pdf.cpp +++ b/src/printsupport/kernel/qprintengine_pdf.cpp @@ -58,6 +58,10 @@ #include "private/qcore_unix_p.h" // overrides QT_OPEN #endif +#ifdef Q_OS_WIN +#include // _close. +#endif + QT_BEGIN_NAMESPACE //#define FONT_DUMP diff --git a/src/printsupport/kernel/qprintengine_pdf_p.h b/src/printsupport/kernel/qprintengine_pdf_p.h index e27adda..483cde9 100644 --- a/src/printsupport/kernel/qprintengine_pdf_p.h +++ b/src/printsupport/kernel/qprintengine_pdf_p.h @@ -89,8 +89,8 @@ namespace QPdf { struct PaperSize { int width, height; // in postscript points }; - Q_GUI_EXPORT PaperSize paperSize(QPrinter::PaperSize paperSize); - Q_GUI_EXPORT const char *paperSizeToString(QPrinter::PaperSize paperSize); + Q_PRINTSUPPORT_EXPORT PaperSize paperSize(QPrinter::PaperSize paperSize); + Q_PRINTSUPPORT_EXPORT const char *paperSizeToString(QPrinter::PaperSize paperSize); } class QPdfPrintEnginePrivate; diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index a074097..ae21594 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -118,7 +118,7 @@ static const float qt_paperSizes[][2] = { }; /// return the multiplier of converting from the unit value to postscript-points. -Q_GUI_EXPORT double qt_multiplierForUnit(QPrinter::Unit unit, int resolution) +Q_PRINTSUPPORT_EXPORT double qt_multiplierForUnit(QPrinter::Unit unit, int resolution) { switch(unit) { case QPrinter::Millimeter: @@ -140,7 +140,7 @@ Q_GUI_EXPORT double qt_multiplierForUnit(QPrinter::Unit unit, int resolution) } // not static: it's needed in qpagesetupdialog_unix.cpp -Q_GUI_EXPORT QSizeF qt_printerPaperSize(QPrinter::Orientation orientation, +Q_PRINTSUPPORT_EXPORT QSizeF qt_printerPaperSize(QPrinter::Orientation orientation, QPrinter::PaperSize paperSize, QPrinter::Unit unit, int resolution) diff --git a/src/printsupport/kernel/qprinter.h b/src/printsupport/kernel/qprinter.h index f3c6615..7d04099 100644 --- a/src/printsupport/kernel/qprinter.h +++ b/src/printsupport/kernel/qprinter.h @@ -63,7 +63,7 @@ class QPaintEngine; class QPrintEngine; class QPrinterInfo; -class Q_GUI_EXPORT QPrinter : public QPagedPaintDevice +class Q_PRINTSUPPORT_EXPORT QPrinter : public QPagedPaintDevice { Q_DECLARE_PRIVATE(QPrinter) public: diff --git a/src/printsupport/kernel/qprinter_p.h b/src/printsupport/kernel/qprinter_p.h index b339612..08877f0 100644 --- a/src/printsupport/kernel/qprinter_p.h +++ b/src/printsupport/kernel/qprinter_p.h @@ -70,7 +70,7 @@ class QPrintEngine; class QPreviewPaintEngine; class QPicture; -class Q_GUI_EXPORT QPrinterPrivate +class Q_PRINTSUPPORT_EXPORT QPrinterPrivate { Q_DECLARE_PUBLIC(QPrinter) public: diff --git a/src/printsupport/kernel/qprinterinfo.h b/src/printsupport/kernel/qprinterinfo.h index f00503f..535c29c 100644 --- a/src/printsupport/kernel/qprinterinfo.h +++ b/src/printsupport/kernel/qprinterinfo.h @@ -55,7 +55,7 @@ QT_MODULE(Gui) #ifndef QT_NO_PRINTER class QPrinterInfoPrivate; class QPrinterInfoPrivateDeleter; -class Q_GUI_EXPORT QPrinterInfo +class Q_PRINTSUPPORT_EXPORT QPrinterInfo { public: QPrinterInfo(); diff --git a/src/printsupport/kernel/qprinterinfo_unix.cpp b/src/printsupport/kernel/qprinterinfo_unix.cpp index 3c66481..c7dbb7c 100644 --- a/src/printsupport/kernel/qprinterinfo_unix.cpp +++ b/src/printsupport/kernel/qprinterinfo_unix.cpp @@ -741,7 +741,7 @@ void qt_parseQconfig(QList *printers) } while (!ts.atEnd()); } -Q_GUI_EXPORT int qt_getLprPrinters(QList& printers) +Q_PRINTSUPPORT_EXPORT int qt_getLprPrinters(QList& printers) { QByteArray etcLpDefault; qt_parsePrintcap(&printers, QLatin1String("/etc/printcap")); diff --git a/src/printsupport/widgets/qprintpreviewwidget.h b/src/printsupport/widgets/qprintpreviewwidget.h index 6a90755..1c12bc0 100644 --- a/src/printsupport/widgets/qprintpreviewwidget.h +++ b/src/printsupport/widgets/qprintpreviewwidget.h @@ -55,7 +55,7 @@ QT_MODULE(Gui) class QPrintPreviewWidgetPrivate; -class Q_WIDGETS_EXPORT QPrintPreviewWidget : public QWidget +class Q_PRINTSUPPORT_EXPORT QPrintPreviewWidget : public QWidget { Q_OBJECT Q_DECLARE_PRIVATE(QPrintPreviewWidget) diff --git a/src/src.pro b/src/src.pro index 8c3c3cc..1e072fb 100644 --- a/src/src.pro +++ b/src/src.pro @@ -10,7 +10,7 @@ SRC_SUBDIRS += src_corelib !cross_compile { win32:!wince*: SRC_SUBDIRS += src_tools_idc } -SRC_SUBDIRS += src_network src_sql src_gui src_xml src_uitools src_printsupport src_widgets src_testlib src_platformsupport +SRC_SUBDIRS += src_network src_sql src_gui src_xml src_uitools src_widgets src_printsupport src_testlib src_platformsupport nacl: SRC_SUBDIRS -= src_network src_testlib !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus contains(QT_CONFIG, no-gui): SRC_SUBDIRS -= src_gui @@ -60,8 +60,8 @@ src_platformsupport.target = sub-platformsupport !wince*:!ordered:!symbian-abld:!symbian-sbsv2 { src_corelib.depends = src_tools_moc src_tools_rcc src_gui.depends = src_corelib - src_printsupport.depends = src_corelib src_gui - src_widgets.depends = src_corelib src_gui src_printsupport src_tools_uic + src_printsupport.depends = src_corelib src_gui src_widgets + src_widgets.depends = src_corelib src_gui src_tools_uic embedded: src_gui.depends += src_network src_xml.depends = src_corelib src_uitools.depends = src_corelib src_widgets -- 2.7.4