Commit f4f1b53b authored by Lars Knoll's avatar Lars Knoll
Browse files

Move printing into it's own library

Create a libQtPrintSupport library that contains our current
printing infrastructure. Long term this will get replaced
with a libQtPrint, as the current architecture is not
really maintainable.

Change-Id: I7362fff6786b58c5b4e9213c23eda36d15048aa2
Reviewed-on: http://codereview.qt.nokia.com/3209

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarGunnar Sletta <gunnar.sletta@nokia.com>
parent a1016213
......@@ -8,7 +8,7 @@ echo $files
for module in $modules; do
# once we change other things, change the line from == "QtWidgets" to != "Qt" to get everything fixed
if [ $module == "QtWidgets" ]; then
if [ $module == "QtWidgets" ] || [ $module == "QtPrintSupport" ]; then
echo $module ":"
includes=`ls $QTDIR/include/$module`
for i in $includes; do
......
......@@ -7,7 +7,7 @@ TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QT += widgets
QT += widgets printsupport
CONFIG += qt warn_on
#unix:contains(QT_CONFIG, dbus):QT += dbus widgets
......
......@@ -19,5 +19,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.doc images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/textedit
INSTALLS += target sources
QT += widgets
QT += widgets printsupport
symbian: CONFIG += qt_example
......@@ -21,7 +21,6 @@ include(text/text.pri)
include(painting/painting.pri)
include(util/util.pri)
include(math3d/math3d.pri)
include(printsupport/printsupport.pri)
include(egl/egl.pri)
......
......@@ -43,7 +43,6 @@
#include <QtGui/QPlatformFontDatabase>
#include <QtGui/QPlatformClipboard>
#include <QtGui/QPlatformPrinterSupport>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qpixmap_raster_p.h>
#include <private/qdnd_p.h>
......@@ -209,12 +208,7 @@ QPlatformGLContext *QPlatformIntegration::createPlatformGLContext(QGuiGLContext
QPlatformPrinterSupport *QPlatformIntegration::printerSupport() const
{
static QPlatformPrinterSupport *ps = 0;
#ifndef QT_NO_PRINTER
if (!ps)
ps = new QPlatformPrinterSupport;
#endif
return ps;
return 0;
}
/*!
......
......@@ -164,7 +164,7 @@ private:
class QPdfWriter;
class QPdfEnginePrivate;
class QPdfEngine : public QPaintEngine
class Q_GUI_EXPORT QPdfEngine : public QPaintEngine
{
Q_DECLARE_PRIVATE(QPdfEngine)
friend class QPdfWriter;
......@@ -210,7 +210,7 @@ private:
void updateClipPath(const QPainterPath & path, Qt::ClipOperation op);
};
class QPdfEnginePrivate : public QPaintEnginePrivate
class Q_GUI_EXPORT QPdfEnginePrivate : public QPaintEnginePrivate
{
Q_DECLARE_PUBLIC(QPdfEngine)
public:
......
......@@ -57,7 +57,6 @@
#include "qtextdocument.h"
#include "private/qtextdocument_p.h"
#include "qtextlist.h"
#include "qprinter.h"
#include "qtextdocumentwriter.h"
#include "private/qtextcursor_p.h"
#include "qpagedpaintdevice.h"
......
......@@ -55,7 +55,6 @@
#include "qtexthtmlparser_p.h"
#include "qpainter.h"
#include "qprinter.h"
#include <qfile.h>
#include <qfileinfo.h>
#include <qdir.h>
......@@ -63,7 +62,6 @@
#include "private/qdataurl_p.h"
#include "qtextdocument_p.h"
#include <private/qprinter_p.h>
#include <private/qabstracttextdocumentlayout_p.h>
#include "qpagedpaintdevice.h"
......
......@@ -10,5 +10,5 @@ QT.gui.sources = $$QT_MODULE_BASE/src/gui
QT.gui.libs = $$QT_MODULE_LIB_BASE
QT.gui.plugins = $$QT_MODULE_PLUGIN_BASE
QT.gui.imports = $$QT_MODULE_IMPORT_BASE
QT.gui.depends = core network
QT.gui.depends = core
QT.gui.DEFINES = QT_GUI_LIB
QT.printsupport.VERSION = 5.0.0
QT.printsupport.MAJOR_VERSION = 5
QT.printsupport.MINOR_VERSION = 0
QT.printsupport.PATCH_VERSION = 0
QT.printsupport.name = QtPrintSupport
QT.printsupport.includes = $$QT_MODULE_INCLUDE_BASE/QtPrintSupport
QT.printsupport.private_includes = $$QT_MODULE_INCLUDE_BASE/QtPrintSupport/$$QT.printsupport.VERSION
QT.printsupport.sources = $$QT_MODULE_BASE/src/printsupport
QT.printsupport.libs = $$QT_MODULE_LIB_BASE
QT.printsupport.plugins = $$QT_MODULE_PLUGIN_BASE
QT.printsupport.imports = $$QT_MODULE_IMPORT_BASE
QT.printsupport.depends = core gui widgets
QT.printsupport.DEFINES = QT_PRINTSUPPORT_LIB
QT += printsupport printsupport-private
HEADERS += $$PWD/qgenericunixprintersupport_p.h
SOURCES += $$PWD/qgenericunixprintersupport.cpp
......@@ -41,7 +41,7 @@
#include "qgenericunixprintersupport_p.h"
#include <QtGui/QPrinterInfo>
#include <QtPrintSupport/QPrinterInfo>
#include <private/qcups_p.h>
QT_BEGIN_NAMESPACE
......
......@@ -42,7 +42,7 @@
#ifndef QGENERICUNIXPRINTINGSUPPORT_H
#define QGENERICUNIXPRINTINGSUPPORT_H
#include <QtGui/QPlatformPrinterSupport>
#include <QtPrintSupport/QPlatformPrinterSupport>
QT_BEGIN_NAMESPACE
......
# Qt dialogs module
HEADERS += \
dialogs/qabstractprintdialog.h \
dialogs/qabstractprintdialog_p.h \
dialogs/qabstractpagesetupdialog.h \
dialogs/qabstractpagesetupdialog_p.h \
dialogs/qpagesetupdialog.h \
dialogs/qprintdialog.h \
dialogs/qprintpreviewdialog.h
!qpa:mac {
OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \
dialogs/qprintdialog_mac.mm
}
win32 {
qpa:DEFINES += QT_NO_PRINTDIALOG
SOURCES += dialogs/qpagesetupdialog_win.cpp \
dialogs/qprintdialog_win.cpp
}
!mac:!symbian:unix|qpa:!win32 {
HEADERS += dialogs/qpagesetupdialog_unix_p.h
SOURCES += dialogs/qprintdialog_unix.cpp \
dialogs/qpagesetupdialog_unix.cpp
FORMS += dialogs/qprintsettingsoutput.ui \
dialogs/qprintwidget.ui \
dialogs/qprintpropertieswidget.ui
}
INCLUDEPATH += $$PWD
SOURCES += \
dialogs/qabstractprintdialog.cpp \
dialogs/qabstractpagesetupdialog.cpp \
dialogs/qpagesetupdialog.cpp \
dialogs/qprintpreviewdialog.cpp
FORMS += dialogs/qpagesetupwidget.ui
RESOURCES += dialogs/qprintdialog.qrc
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment