Avoid duplicate setPen() in PDF when reusing QPrinter

The simplePen property was not reset when reusing the QPrinter,
thus we would output two identical setPen() commands in the PDF
making the autotest that compares the results fail.

Task-number: QTBUG-27171
Change-Id: I601042ec59e45ef72a56f230f6112a91a259b4a5
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2012-09-10 14:10:41 +02:00 committed by Qt by Nokia
parent 260da7a832
commit 014ae2ad04
2 changed files with 1 additions and 3 deletions

View File

@ -1521,6 +1521,7 @@ bool QPdfEngine::begin(QPaintDevice *pdev)
d->info = 0;
d->graphicsState = 0;
d->patternColorSpace = 0;
d->simplePen = false;
d->pages.clear();
d->imageCache.clear();

View File

@ -985,9 +985,6 @@ void tst_QPrinter::taskQTBUG4497_reusePrinterOnDifferentFiles()
QFile file2("out2.ps");
QVERIFY(file2.open(QIODevice::ReadOnly));
#ifndef Q_OS_WIN
QEXPECT_FAIL("", "QTBUG-22562, QTBUG-22296", Abort);
#endif
QCOMPARE(file1.readAll(), file2.readAll());
}