summaryrefslogtreecommitdiffstats
path: root/src/printsupport
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-05-06 16:19:14 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-05-06 16:50:03 +0200
commit1326cd15f7ba985551f0fddc717e3bfc01ddda85 (patch)
tree024eb871ed5f4e8c02e21412475e6e9929a2b030 /src/printsupport
parentfe70367fe06984d1ac84cc276ca3fd3edc4193c7 (diff)
parentbeb7258a56b6ec76531b73cc07ee30132a3f548f (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
Diffstat (limited to 'src/printsupport')
-rw-r--r--src/printsupport/dialogs/qprintdialog_mac.mm16
-rw-r--r--src/printsupport/kernel/qpaintengine_alpha.cpp2
-rw-r--r--src/printsupport/printsupport.pro1
3 files changed, 9 insertions, 10 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_mac.mm b/src/printsupport/dialogs/qprintdialog_mac.mm
index 9ff7c4766a..ef3e88be39 100644
--- a/src/printsupport/dialogs/qprintdialog_mac.mm
+++ b/src/printsupport/dialogs/qprintdialog_mac.mm
@@ -143,11 +143,11 @@ QT_USE_NAMESPACE
CFURLGetFileSystemRepresentation(file, true, localFile, sizeof(localFile));
printer->setOutputFileName(QString::fromUtf8(reinterpret_cast<const char *>(localFile)));
} else {
- // Keep output format.
- QPrinter::OutputFormat format;
- format = printer->outputFormat();
- printer->setOutputFileName(QString());
- printer->setOutputFormat(format);
+ PMPrinter macPrinter;
+ PMSessionGetCurrentPrinter(session, &macPrinter);
+ QString printerId = QString::fromCFString(PMPrinterGetID(macPrinter));
+ if (printer->printerName() != printerId)
+ printer->setPrinterName(printerId);
}
}
@@ -160,13 +160,13 @@ QT_USE_NAMESPACE
PMOrientation orientation;
PMGetOrientation(pageFormat, &orientation);
QPageSize pageSize;
- QCFString key;
+ CFStringRef key;
double width = 0;
double height = 0;
// If the PPD name is empty then is custom, for some reason PMPaperIsCustom doesn't work here
PMPaperGetPPDPaperName(paper, &key);
if (PMPaperGetWidth(paper, &width) == noErr && PMPaperGetHeight(paper, &height) == noErr) {
- QString ppdKey = key;
+ QString ppdKey = QString::fromCFString(key);
if (ppdKey.isEmpty()) {
// Is using a custom page size as defined in the Print Dialog custom settings using mm or inches.
// We can't ask PMPaper what those units actually are, we can only get the point size which may return
@@ -185,7 +185,7 @@ QT_USE_NAMESPACE
pageSize = QPageSize(QSizeF(w / 100.0, h / 100.0), QPageSize::Inch);
}
} else {
- pageSize = QPlatformPrintDevice::createPageSize(key, QSize(width, height), QString());
+ pageSize = QPlatformPrintDevice::createPageSize(ppdKey, QSize(width, height), QString());
}
}
if (pageSize.isValid() && !pageSize.isEquivalentTo(printer->pageLayout().pageSize()))
diff --git a/src/printsupport/kernel/qpaintengine_alpha.cpp b/src/printsupport/kernel/qpaintengine_alpha.cpp
index 7d4dc18111..ddfa918b90 100644
--- a/src/printsupport/kernel/qpaintengine_alpha.cpp
+++ b/src/printsupport/kernel/qpaintengine_alpha.cpp
@@ -345,8 +345,8 @@ void QAlphaPaintEngine::flushAndInit(bool init)
d->m_picpainter->setFont(painter()->font());
d->m_picpainter->setOpacity(painter()->opacity());
d->m_picpainter->setTransform(painter()->combinedTransform());
- *d->m_picpainter->d_func()->state = *painter()->d_func()->state;
d->m_picengine->syncState();
+ *d->m_picpainter->d_func()->state = *painter()->d_func()->state;
}
}
diff --git a/src/printsupport/printsupport.pro b/src/printsupport/printsupport.pro
index b32ba91c07..6dd3eaab3c 100644
--- a/src/printsupport/printsupport.pro
+++ b/src/printsupport/printsupport.pro
@@ -1,7 +1,6 @@
TARGET = QtPrintSupport
QT = core-private gui-private widgets-private
-MODULE_CONFIG = needs_printsupport_plugin
DEFINES += QT_NO_USING_NAMESPACE
MODULE_PLUGIN_TYPES = \