Clean up old PostScript printing code

PostScript support was removed back in 2011:
34f712e79e

- The QPSPrint* classes are gone
- The QPrinter::OutputFormat enum only has NativeFormat and PdfFormat
  constants
- QPaintEngine::PostScript is unused now

Change-Id: I27d595b92341f41e14bd1e4fd860eac6826d7890
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
Sze Howe Koh 2013-05-11 09:56:48 +08:00 committed by The Qt Project
parent 741eb8cbb1
commit b9adf2a90e
6 changed files with 4 additions and 16 deletions

View File

@ -374,7 +374,7 @@ void QPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDraw
\value CoreGraphics Mac OS X's Quartz2D (CoreGraphics) \value CoreGraphics Mac OS X's Quartz2D (CoreGraphics)
\value QuickDraw Mac OS X's QuickDraw \value QuickDraw Mac OS X's QuickDraw
\value QWindowSystem Qt for Embedded Linux \value QWindowSystem Qt for Embedded Linux
\value PostScript \value PostScript (No longer supported)
\value OpenGL \value OpenGL
\value Picture QPicture format \value Picture QPicture format
\value SVG Scalable Vector Graphics XML format \value SVG Scalable Vector Graphics XML format

View File

@ -196,7 +196,7 @@ public:
Windows, Windows,
QuickDraw, CoreGraphics, MacPrinter, QuickDraw, CoreGraphics, MacPrinter,
QWindowSystem, QWindowSystem,
PostScript, PostScript, // ### Qt 6: Remove, update documentation
OpenGL, OpenGL,
Picture, Picture,
SVG, SVG,
@ -253,7 +253,6 @@ private:
#ifndef QT_NO_QWS_QPF2 #ifndef QT_NO_QWS_QPF2
friend class QFontEngineQPF; friend class QFontEngineQPF;
#endif #endif
friend class QPSPrintEngine;
friend class QMacPrintEngine; friend class QMacPrintEngine;
friend class QMacPrintEnginePrivate; friend class QMacPrintEnginePrivate;
friend class QFontEngineQPA; friend class QFontEngineQPA;

View File

@ -285,7 +285,6 @@ private:
friend class QFontInfo; friend class QFontInfo;
friend class QPainter; friend class QPainter;
friend class QPainterPrivate; friend class QPainterPrivate;
friend class QPSPrintEngineFont;
friend class QApplication; friend class QApplication;
friend class QWidget; friend class QWidget;
friend class QWidgetPrivate; friend class QWidgetPrivate;

View File

@ -411,8 +411,6 @@ public:
virtual void setFallbackFamiliesList(const QStringList &) {} virtual void setFallbackFamiliesList(const QStringList &) {}
protected: protected:
friend class QPSPrintEnginePrivate;
friend class QPSPrintEngineFontMulti;
friend class QRawFont; friend class QRawFont;
virtual void loadEngine(int at) = 0; virtual void loadEngine(int at) = 0;
virtual void ensureFallbackFamiliesQueried() {} virtual void ensureFallbackFamiliesQueried() {}

View File

@ -188,7 +188,6 @@ private:
Q_DISABLE_COPY(QTextLayout) Q_DISABLE_COPY(QTextLayout)
friend class QPainter; friend class QPainter;
friend class QPSPrinter;
friend class QGraphicsSimpleTextItemPrivate; friend class QGraphicsSimpleTextItemPrivate;
friend class QGraphicsSimpleTextItem; friend class QGraphicsSimpleTextItem;
friend void qt_format_text(const QFont &font, const QRectF &_r, int tf, const QTextOption *, const QString& str, friend void qt_format_text(const QFont &font, const QRectF &_r, int tf, const QTextOption *, const QString& str,

View File

@ -562,15 +562,8 @@ void QPrintPreviewDialogPrivate::_q_print()
#if defined(Q_OS_WIN) || defined(Q_OS_MAC) #if defined(Q_OS_WIN) || defined(Q_OS_MAC)
if (printer->outputFormat() != QPrinter::NativeFormat) { if (printer->outputFormat() != QPrinter::NativeFormat) {
QString title; QString title = QCoreApplication::translate("QPrintPreviewDialog", "Export to PDF");
QString suffix; QString suffix = QLatin1String(".pdf");
if (printer->outputFormat() == QPrinter::PdfFormat) {
title = QCoreApplication::translate("QPrintPreviewDialog", "Export to PDF");
suffix = QLatin1String(".pdf");
} else {
title = QCoreApplication::translate("QPrintPreviewDialog", "Export to PostScript");
suffix = QLatin1String(".ps");
}
QString fileName = QFileDialog::getSaveFileName(q, title, printer->outputFileName(), QString fileName = QFileDialog::getSaveFileName(q, title, printer->outputFileName(),
QLatin1Char('*') + suffix); QLatin1Char('*') + suffix);
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {