<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/7709c7210a677e58cec97c5463e1e4d56d2a835a">https://github.com/macports/macports-ports/commit/7709c7210a677e58cec97c5463e1e4d56d2a835a</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 7709c7210a6 xpdf: enable building with qt4 for old systems, fix compiler choice to support atomics
</span>7709c7210a6 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 7709c7210a677e58cec97c5463e1e4d56d2a835a
</span>Author: Sergey Fedorov <barracuda@macos-powerpc.org>
AuthorDate: Sun Jul 28 12:21:42 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> xpdf: enable building with qt4 for old systems, fix compiler choice to support atomics
</span>---
graphics/xpdf/Portfile | 37 +++++--
graphics/xpdf/files/patch-fix-qt4.diff | 175 +++++++++++++++++++++++++++++++++
2 files changed, 202 insertions(+), 10 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/xpdf/Portfile b/graphics/xpdf/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 6392c461040..84deafacbeb 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/xpdf/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/xpdf/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,6 +2,7 @@
</span>
PortSystem 1.0
PortGroup cmake 1.1
<span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup compiler_blacklist_versions 1.0
</span>
name xpdf
version 4.05
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -23,28 +24,44 @@ checksums rmd160 0c2d6533dd117aab8df935b89c3225531c5468c6 \
</span> sha256 92707ed5acb6584fbd73f34091fda91365654ded1f31ba72f0970022cf2a5cea \
size 986596
<span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.cxx_standard 2011
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant qt6 conflicts qt5 description {Use Qt 6} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-fix-qt4.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# PDFCore.h: error: atomic: No such file or directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.blacklist-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {clang < 601}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant qt6 conflicts qt4 qt5 description {Use Qt 6} {
</span> PortGroup qt6 1.0
qt6.find_method module_path
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant qt5 conflicts qt6 description {Use Qt 5} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant qt5 conflicts qt4 qt6 description {Use Qt 5} {
</span> PortGroup qt5 1.0
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {![variant_isset qt5]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://doc.qt.io/qt-6/macos.html
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.major} >= 21 || ${os.platform} ne "darwin"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # icons are missing when using Qt6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # default_variants-append +qt6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant qt4 conflicts qt5 qt6 description {Use Qt 4} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PortGroup qt4 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {![variant_isset qt6]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_variants-append +qt5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.platform} eq "darwin" && ${os.major} < 12} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants-append +qt4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset qt5]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://doc.qt.io/qt-6/macos.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} >= 21 || ${os.platform} ne "darwin"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # icons are missing when using Qt6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # default_variants-append +qt6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset qt6]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants-append +qt5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
variant no_mangle_names description {do not mangle the CLI tool names, conflicts with poppler} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/xpdf/files/patch-fix-qt4.diff b/graphics/xpdf/files/patch-fix-qt4.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..d8471f68931
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/xpdf/files/patch-fix-qt4.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,175 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- xpdf-qt/XpdfViewer.cc.orig 2024-02-08 04:32:41.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ xpdf-qt/XpdfViewer.cc 2024-07-28 11:58:15.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -49,6 +49,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <QToolBar>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <QTreeView>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <QVBoxLayout>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <QDesktopWidget>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "GString.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "GList.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "GlobalParams.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -883,7 +886,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QSize hint = sizeHint();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QRect screen = QGuiApplication::primaryScreen()->availableGeometry();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QRect screen = QApplication::desktop()->availableGeometry();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int w = hint.width();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int h = hint.height();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (w > screen.width() - 60) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2794,6 +2801,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // for historical reasons xpdf uses X11 button numbering for mouse
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // wheel events
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QPoint delta = e->angleDelta();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (delta.y() > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ keyCode = xpdfKeyCodeMousePress4;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2804,8 +2812,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (delta.x() < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ keyCode = xpdfKeyCodeMousePress7;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((cmds = globalParams->getKeyBinding(keyCode,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ getModifiers(e->modifiers()),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ getContext(e->modifiers())))) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- xpdf-qt/XpdfWidget.cc.orig 2024-02-08 04:32:41.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ xpdf-qt/XpdfWidget.cc 2024-07-28 11:56:14.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1282,7 +1282,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (color == pdfImageColorGray) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mode = splashModeMono8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ paperColor[0] = 0xff;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- format = QImage::Format_Grayscale8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ format = QImage::Format_Indexed8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mode = splashModeRGB8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ paperColor[0] = paperColor[1] = paperColor[2] = 0xff;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1388,7 +1388,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (color == pdfImageColorGray) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mode = splashModeMono8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ paperColor[0] = 0xff;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- format = QImage::Format_Grayscale8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ format = QImage::Format_Indexed8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mode = splashModeRGB8;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ paperColor[0] = paperColor[1] = paperColor[2] = 0xff;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2163,7 +2163,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lastMousePressTime[1] = lastMousePressTime[2];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lastMousePressX[2] = e->pos().x();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lastMousePressY[2] = e->pos().y();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= 0x050000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lastMousePressTime[2] = e->timestamp();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lastMouseEventWasPress = true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!mousePassthrough) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ x = (int)(e->pos().x() * scaleFactor);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2202,6 +2204,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // single clicks just have to be "nearby"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ulong maxTime = (ulong)QApplication::doubleClickInterval();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int maxDistance = QApplication::startDragDistance();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= 0x050000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (e->timestamp() - lastMousePressTime[0] < 2 * maxTime &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ abs(e->pos().x() - lastMousePressX[0])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ + abs(e->pos().y() - lastMousePressY[0]) <= maxDistance) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2220,6 +2223,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ + abs(e->pos().y() - lastMousePressY[2]) <= maxDistance) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ emit mouseClick(e);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (abs(e->pos().x() - lastMousePressX[2])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ + abs(e->pos().y() - lastMousePressY[2]) <= maxDistance) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ emit mouseClick(e);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void XpdfWidget::mouseMoveEvent(QMouseEvent *e) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- xpdf-qt/QtPDFCore.cc.orig 2024-02-08 04:32:41.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ xpdf-qt/QtPDFCore.cc 2024-07-28 11:59:05.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -24,6 +24,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <QStyle>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <QUrl>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <QWidget>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <QDesktopWidget>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "gmem.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "gmempp.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "gfile.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -98,10 +101,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ double QtPDFCore::computeScaleFactor() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // get Qt's HiDPI scale factor
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QGuiApplication *app = (QGuiApplication *)QGuiApplication::instance();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QScreen *screen = app->primaryScreen();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return screen->devicePixelRatio();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -109,9 +112,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int QtPDFCore::computeDisplayDpi() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QGuiApplication *app = (QGuiApplication *)QGuiApplication::instance();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QScreen *screen = app->primaryScreen();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return (int)(screen->logicalDotsPerInch() * computeScaleFactor());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (int)(qApp->desktop()->logicalDpiX() * computeScaleFactor());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ //------------------------------------------------------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- xpdf-qt/XpdfWidgetPrint.cc.orig 2024-02-08 04:32:41.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ xpdf-qt/XpdfWidgetPrint.cc 2024-07-28 11:54:37.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -62,7 +62,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QPrinter::ColorMode colorMode;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QSize paperSize;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QPrinter::PaperSource paperSource;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= 0x050000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QPageLayout::Orientation pageOrientation;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QPrinter::Orientation pageOrientation;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FILE *f;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GBool deletePDFFile;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int startPage, endPage, pg, i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -117,9 +121,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ //--- get other parameters
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ colorMode = prt->colorMode();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= 0x050000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ paperSize = prt->pageLayout().pageSize().sizePoints();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ paperSource = prt->paperSource();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pageOrientation = prt->pageLayout().orientation();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ paperSource = prt->paperSource();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pageOrientation = prt->orientation();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ //--- create the Session and PrintSettings
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -232,7 +241,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ //--- set page orientation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PMGetAdjustedPaperRect(pageFormat, &paperRect);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (pageOrientation == QPageLayout::Landscape) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (pageOrientation == QPrinter::Landscape) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PMSetOrientation(pageFormat, kPMLandscape, kPMUnlocked);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ paperRect2 = CGRectMake(paperRect.top,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ paperRect.left,
</span></pre><pre style='margin:0'>
</pre>