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:
parent
741eb8cbb1
commit
b9adf2a90e
@ -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
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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() {}
|
||||||
|
@ -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,
|
||||||
|
@ -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()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user