From c8bc3519acee2e79f91f47c66ea4addf741fad91 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Apr 15 2010 16:12:10 +0000 Subject: - backport from 4.7 branch to get the printDialog to check for default paperSize via CUPS, it replaces the patch qt-everywhere-opensource-src-4.6.2-cups.patch --- diff --git a/qt-everywhere-opensource-src-4.6.2-cups-QTBUG-6471.patch b/qt-everywhere-opensource-src-4.6.2-cups-QTBUG-6471.patch new file mode 100644 index 0000000..82e894d --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-cups-QTBUG-6471.patch @@ -0,0 +1,68 @@ +--- a/src/gui/dialogs/qprintdialog_unix.cpp ++++ b/src/gui/dialogs/qprintdialog_unix.cpp +@@ -154,6 +154,9 @@ + bool checkFields(); + void setupPrinter(); + void setOptionsPane(QPrintDialogPrivate *pane); ++#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) ++ void setCupsProperties(); ++#endif + + // slots + void _q_printerChanged(int index); +@@ -942,7 +945,7 @@ + + void QUnixPrintWidgetPrivate::_q_btnPropertiesClicked() + { +- if (propertiesDialog == 0) { ++ if (!propertiesDialog) { + propertiesDialog = new QPrintPropertiesDialog(q); + propertiesDialog->setResult(QDialog::Rejected); + } +@@ -962,6 +965,35 @@ + propertiesDialog->exec(); + } + ++#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) ++void QUnixPrintWidgetPrivate::setCupsProperties() ++{ ++ if (cups && QCUPSSupport::isAvailable()) { ++ QPrintEngine *engine = printer->printEngine(); ++ const ppd_option_t* pageSizes = cups->pageSizes(); ++ QByteArray cupsPageSize; ++ for (int i = 0; i < pageSizes->num_choices; ++i) { ++ if (static_cast(pageSizes->choices[i].marked) == 1) ++ cupsPageSize = pageSizes->choices[i].choice; ++ } ++ engine->setProperty(PPK_CupsStringPageSize, QString::fromLatin1(cupsPageSize)); ++ engine->setProperty(PPK_CupsOptions, cups->options()); ++ ++ QRect pageRect = cups->pageRect(cupsPageSize); ++ engine->setProperty(PPK_CupsPageRect, pageRect); ++ ++ QRect paperRect = cups->paperRect(cupsPageSize); ++ engine->setProperty(PPK_CupsPaperRect, paperRect); ++ ++ for (int ps = 0; ps < QPrinter::NPaperSize; ++ps) { ++ QPdf::PaperSize size = QPdf::paperSize(QPrinter::PaperSize(ps)); ++ if (size.width == paperRect.width() && size.height == paperRect.height()) ++ printer->setPaperSize(static_cast(ps)); ++ } ++ } ++} ++#endif ++ + void QUnixPrintWidgetPrivate::setupPrinter() + { + const int printerCount = widget.printers->count(); +@@ -986,6 +1018,10 @@ + + if (propertiesDialog && propertiesDialog->result() == QDialog::Accepted) + propertiesDialog->setupPrinter(); ++#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) ++ if (!propertiesDialog) ++ setCupsProperties(); ++#endif + } + + \ No newline at end of file diff --git a/qt-everywhere-opensource-src-4.6.2-sparc64-webkit-fix.patch b/qt-everywhere-opensource-src-4.6.2-sparc64-webkit-fix.patch deleted file mode 100644 index 48ffa74..0000000 --- a/qt-everywhere-opensource-src-4.6.2-sparc64-webkit-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.sparc qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h ---- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.sparc 2010-03-23 10:39:06.138490870 -0400 -+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2010-03-23 10:42:09.660492875 -0400 -@@ -729,7 +729,10 @@ - #endif - - #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64) --#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || PLATFORM(IA64) || PLATFORM(ALPHA) -+#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) \ -+ || PLATFORM(IA64) \ -+ || PLATFORM(ALPHA) \ -+ || PLATFORM(SPARC64) - #define WTF_USE_JSVALUE64 1 - #elif PLATFORM(ARM) || PLATFORM(PPC64) - #define WTF_USE_JSVALUE32 1 diff --git a/qt.spec b/qt.spec index 1539afe..90b9aad 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 13%{?dist} +Release: 14%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -56,8 +56,6 @@ Patch53: qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch # fix invalid assumptions about mysql_config --libs # http://bugzilla.redhat.com/440673 Patch54: qt-x11-opensource-src-4.5.1-mysql_config.patch -# http://bugs.kde.org/show_bug.cgi?id=180051#c22 -Patch55: qt-everywhere-opensource-src-4.6.2-cups.patch # fix type cast issue on s390x Patch56: qt-everywhere-opensource-src-4.6.2-webkit-s390x.patch # fix type cast issue on sparc64 @@ -87,6 +85,7 @@ Patch213: qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch # it should be included in 4.6.3 Patch214: qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch patch215: qt-everywhere-opensource-src-4.6.2-atomic-s390.patch +patch216: qt-everywhere-opensource-src-4.6.2-cups-QTBUG-6471.patch Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg Source11: hi16-phonon-gstreamer.png @@ -421,7 +420,6 @@ Qt libraries used for drawing widgets and OpenGL items. %patch53 -p1 -b .qatomic-inline-asm ## TODO: upstream me %patch54 -p1 -b .mysql_config -%patch55 -p1 -b .cups-1 %patch56 -p1 -b .typecast_s390x %patch57 -p1 -b .typecast_sparc64 @@ -445,6 +443,7 @@ Qt libraries used for drawing widgets and OpenGL items. %patch213 -p1 -b .tablet-wacom-QTBUG-8599 %patch214 -p1 -b .QTBUG-6932 %patch215 -p1 -b .atomic-s390 +%patch216 -p1 -b .cups-QTBUG-6471 # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -1038,6 +1037,11 @@ fi %changelog +* Thu Apr 15 2010 Than Ngo - 4.6.2-14 +- backport from 4.7 branch to get the printDialog to check + for default paperSize via CUPS, it replaces the patch + qt-everywhere-opensource-src-4.6.2-cups.patch + * Tue Apr 06 2010 Than Ngo - 4.6.2-13 - backport from 4.7 branch to fix s390(x) atomic ops crashes