From 878ccfceae29cb7bfbd42e6ab41e3d81b201f91b Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 29 Sep 2009 06:40:58 +0000 Subject: [PATCH 01/41] Initialize branch F-12 for qt --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..06de2d2 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-12 From b722a239360f4691ffede36b716da5baf986c571 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 3 Oct 2009 15:29:14 +0000 Subject: [PATCH 02/41] - if ! phonon_internal, exclude more/all phonon headers - qt-devel must Requires: phonon-devel (#520323) Tue Sep 29 2009 Rex Dieter - 4.5.2-21 - switch to external/kde phonon --- qt.spec | 57 +++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/qt.spec b/qt.spec index f450eda..65ac6f0 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.2 -Release: 20%{?dist} +Release: 22%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -97,7 +97,11 @@ Source31: hi48-app-qt4-logo.png %define psql -plugin-sql-psql %define sqlite -plugin-sql-sqlite %define phonon -phonon +# if building with -phonon, define to internal version (ie, Obsolete external phonon) +#define phonon_internal 1 %define phonon_backend -phonon-backend +# if -phonon-backend, include in packaging (else it's omitted) +#define phonon_backend_packaged 1 %define phonon_version 4.3.1 %define phonon_version_major 4.3 %define phonon_release 100 @@ -237,6 +241,8 @@ Requires: libjpeg-devel Requires: pkgconfig %if 0%{?phonon:1} Provides: qt4-phonon-devel = %{version}-%{release} +%endif +%if 0%{?phonon_internal} Obsoletes: phonon-devel < 4.3.1-100 Provides: phonon-devel = %{phonon_version}-%{phonon_release} %endif @@ -312,10 +318,12 @@ Provides: qt4-postgresql = %{version}-%{release} Summary: Qt GUI-related libraries Group: System Environment/Libraries %if 0%{?phonon:1} +Requires: phonon-backend%{?_isa} >= %{phonon_version_major} +%endif +%if 0%{?phonon_internal} Obsoletes: phonon < 4.3.1-100 Provides: phonon = %{phonon_version}-%{phonon_release} Provides: phonon%{?_isa} = %{phonon_version}-%{phonon_release} -Requires: phonon-backend%{?_isa} >= %{phonon_version_major} Provides: qt4-phonon = %{version}-%{release} %endif %if 0%{?webkit:1} @@ -510,6 +518,12 @@ done # nuke dangling reference(s) to %buildroot sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" %{buildroot}%{_qt4_libdir}/*.prl +# nuke QMAKE_PRL_LIBS, seems similar to static linking and .la files (#520323) +sed -i -e "s|^QMAKE_PRL_LIBS|#QMAKE_PRL_LIBS|" %{buildroot}%{_qt4_libdir}/*.prl + +# .la files, die, die, die. +rm -f %{buildroot}%{_qt4_libdir}/lib*.la + %if 0 #if "%{_qt4_docdir}" != "%{_qt4_prefix}/doc" # -doc make symbolic link to _qt4_docdir @@ -549,9 +563,6 @@ for lib in libQt*.a ; do done popd -# .la files, die, die, die. -rm -f %{buildroot}%{_qt4_libdir}/lib*.la - %ifarch %{multilib_archs} # multilib: qconfig.h mv %{buildroot}%{_qt4_headerdir}/Qt/qconfig.h %{buildroot}%{_qt4_headerdir}/QtCore/qconfig-%{_arch}.h @@ -579,9 +590,11 @@ install -p -m644 -D %{SOURCE4} %{buildroot}%{_qt4_sysconfdir}/Trolltech.conf # qt4-logo (generic) icons install -p -m644 -D %{SOURCE30} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/qt4-logo.png install -p -m644 -D %{SOURCE31} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/qt4-logo.png +%if 0%{?docs} # assistant icons install -p -m644 -D tools/assistant/tools/assistant/images/assistant.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/assistant.png install -p -m644 -D tools/assistant/tools/assistant/images/assistant-128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/assistant.png +%endif # designer icons install -p -m644 -D tools/designer/src/designer/images/designer.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/designer.png # linguist icons @@ -633,14 +646,26 @@ EOF # create/own %%_qt4_plugindir/styles mkdir %{buildroot}%{_qt4_plugindir}/styles -%if 0%{?phonon:1} +%if 0%{?phonon_internal} mkdir -p %{buildroot}%{_qt4_plugindir}/phonon_backend +# This should no longer be required, but... -- Rex pushd %{buildroot}%{_qt4_headerdir} ln -s phonon Phonon popd +%else +rm -fv %{buildroot}%{_qt4_libdir}/libphonon.so* +rm -rfv %{buildroot}%{_libdir}/pkgconfig/phonon.pc +# contents slightly different between phonon-4.3.1 and qt-4.5.0 +rm -fv %{buildroot}%{_includedir}/phonon/phononnamespace.h +# contents dup'd but should remove just in case +rm -fv %{buildroot}%{_includedir}/phonon/*.h +rm -rfv %{buildroot}%{_qt4_headerdir}/phonon* +#rm -rfv %{buildroot}%{_qt4_headerdir}/Qt/phonon* +rm -fv %{buildroot}%{_datadir}/dbus-1/interfaces/org.kde.Phonon.AudioOutput.xml %endif -%if "%{?phonon_backend}" == "-phonon-backend" +#if "%{?phonon_backend}" == "-phonon-backend" +%if 0%{?phonon_backend_packaged} install -D -m 0644 %{SOURCE10} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/phonon-gstreamer.svg install -D -m 0644 %{SOURCE11} %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/phonon-gstreamer.png install -D -m 0644 %{SOURCE12} %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/phonon-gstreamer.png @@ -685,7 +710,8 @@ touch --no-create %{_datadir}/icons/hicolor ||: gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||: fi -%if "%{?phonon_backend}" == "-phonon-backend" +#if "%{?phonon_backend}" == "-phonon-backend" +%if 0%{?phonon_backend_packaged} %post -n phonon-backend-gstreamer touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null ||: @@ -815,6 +841,8 @@ fi %{_qt4_datadir}/q3porting.xml %if 0%{?phonon:1} %{_qt4_libdir}/libphonon.prl +%endif +%if 0%{?phonon_internal} %{_qt4_libdir}/libphonon.so %endif %{_qt4_libdir}/libQt*.so @@ -873,7 +901,7 @@ fi %files x11 %defattr(-,root,root,-) %{_sysconfdir}/rpm/macros.* -%if 0%{?phonon:1} +%if 0%{?phonon_internal} %{_qt4_libdir}/libphonon.so.4* %dir %{_datadir}/kde4/services/phononbackends/ %{_datadir}/dbus-1/interfaces/org.kde.Phonon.AudioOutput.xml @@ -891,7 +919,8 @@ fi %{?webkit:%{_qt4_libdir}/libQtWebKit.so.*} %{_qt4_plugindir}/* %exclude %{_qt4_plugindir}/sqldrivers -%if "%{?phonon_backend}" == "-phonon-backend" +#if "%{?phonon_backend}" == "-phonon-backend" +%if 0%{?phonon_backend_packaged} %exclude %{_qt4_plugindir}/phonon_backend/*_gstreamer.so %endif %if "%{_qt4_bindir}" != "%{_bindir}" @@ -905,7 +934,15 @@ fi %{_datadir}/applications/*qtconfig.desktop %{_datadir}/icons/hicolor/*/apps/qt4-logo.* + %changelog +* Sat Oct 03 2009 Rex Dieter - 4.5.2-22 +- if ! phonon_internal, exclude more/all phonon headers +- qt-devel must Requires: phonon-devel (#520323) + +* Tue Sep 29 2009 Rex Dieter - 4.5.2-21 +- switch to external/kde phonon + * Mon Sep 28 2009 Rex Dieter - 4.5.2-20 - use internal Qt Assistant/Designer icons - -devel: move designer.qch,linguist.qch here From 3d411228a777c4e9ed0e4dd60c29ca96632bdc11 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 3 Oct 2009 16:30:46 +0000 Subject: [PATCH 03/41] buildfixes from devel/ branch --- qt.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt.spec b/qt.spec index 65ac6f0..423bb1d 100644 --- a/qt.spec +++ b/qt.spec @@ -673,6 +673,9 @@ install -D -m 0644 %{SOURCE13} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/ install -D -m 0644 %{SOURCE14} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/phonon-gstreamer.png install -D -m 0644 %{SOURCE15} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/phonon-gstreamer.png install -D -m 0644 %{SOURCE16} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/phonon-gstreamer.png +%else +rm -fv %{buildroot}%{_qt4_plugindir}/phonon_backend/*_gstreamer.so +rm -fv %{buildroot}%{_datadir}/kde4/services/phononbackends/gstreamer.desktop %endif From 6e2acfbfa935d4783e2e2c99a93fdff52a4c5c06 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Sun, 4 Oct 2009 07:24:11 +0000 Subject: [PATCH 04/41] rhel cleanup --- qt.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/qt.spec b/qt.spec index 423bb1d..63a7345 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.2 -Release: 22%{?dist} +Release: 23%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -97,11 +97,13 @@ Source31: hi48-app-qt4-logo.png %define psql -plugin-sql-psql %define sqlite -plugin-sql-sqlite %define phonon -phonon -# if building with -phonon, define to internal version (ie, Obsolete external phonon) -#define phonon_internal 1 %define phonon_backend -phonon-backend +%if 0%{?rhel} +# if building with -phonon, define to internal version (ie, Obsolete external phonon) +%define phonon_internal 1 # if -phonon-backend, include in packaging (else it's omitted) -#define phonon_backend_packaged 1 +%define phonon_backend_packaged 1 +%endif %define phonon_version 4.3.1 %define phonon_version_major 4.3 %define phonon_release 100 @@ -939,6 +941,9 @@ fi %changelog +* Sun Oct 04 2009 Than Ngo - 4.5.2-23 +- rhel cleanup + * Sat Oct 03 2009 Rex Dieter - 4.5.2-22 - if ! phonon_internal, exclude more/all phonon headers - qt-devel must Requires: phonon-devel (#520323) From a045a0a262928ffef89a51e92e22fd204b3f2288 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 9 Oct 2009 13:57:16 +0000 Subject: [PATCH 05/41] - disable JavaScriptCore JIT, SE Linux crashes (#527079) --- ...rce-src-4.5.3-javascript-disable-jit.patch | 24 +++++++++++++++++++ qt.spec | 9 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch diff --git a/qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch b/qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch new file mode 100644 index 0000000..123908a --- /dev/null +++ b/qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch @@ -0,0 +1,24 @@ +diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri.javascriptcore-disable-jit qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri +--- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri.javascriptcore-disable-jit 2009-09-29 13:01:35.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri 2009-10-06 10:39:55.976466622 +0200 +@@ -13,20 +13,6 @@ win32-* { + LIBS += -lwinmm + } + +-# Disable the JIT due to numerous observed miscompilations :( +-CONFIG(release):isEqual(QT_ARCH,i386) { +- JIT_DEFINES = ENABLE_JIT ENABLE_WREC ENABLE_JIT_OPTIMIZE_CALL ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS ENABLE_JIT_OPTIMIZE_ARITHMETIC +- # Require gcc >= 4.1 +- linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { +- DEFINES += $$JIT_DEFINES WTF_USE_JIT_STUB_ARGUMENT_VA_LIST +- QMAKE_CXXFLAGS += -fno-stack-protector +- QMAKE_CFLAGS += -fno-stack-protector +- } +- win32-msvc* { +- DEFINES += $$JIT_DEFINES WTF_USE_JIT_STUB_ARGUMENT_REGISTER +- } +-} +- + win32-msvc*: INCLUDEPATH += $$PWD/os-win32 + wince* { + INCLUDEPATH += $$PWD/os-wince diff --git a/qt.spec b/qt.spec index 63a7345..30428e9 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.2 -Release: 23%{?dist} +Release: 24%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -44,6 +44,9 @@ Patch21: qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch # use system ca-bundle certs, http://bugzilla.redhat.com/521911 Patch22: qt-x11-opensource-src-4.5.2-system_ca_certificates.patch Requires: ca-certificates +# disable JavaScriptCore JIT as it crashes with SE Linux +# http://bugzilla.redhat.com/527079 +Patch23: qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch ## upstreamable bits # http://bugzilla.redhat.com/485677 @@ -361,6 +364,7 @@ Qt libraries used for drawing widgets and OpenGL items. %patch19 -p1 -b .servicesfile %patch21 -p1 -b .gst-pulsaudio %patch22 -p1 -b .system_ca_certificates +%patch23 -p1 -b .javascriptcore-disable-jit %patch51 -p1 -b .qdoc3 %patch52 -p1 -b .sparc64 %patch53 -p1 -b .qatomic-inline-asm @@ -941,6 +945,9 @@ fi %changelog +* Tue Oct 06 2009 Jaroslav Reznik - 4.5.2-24 +- disable JavaScriptCore JIT, SE Linux crashes (#527079) + * Sun Oct 04 2009 Than Ngo - 4.5.2-23 - rhel cleanup From 9a5bc66ccf06c399fccdfce3129a39b2eaf25d31 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 9 Oct 2009 15:04:45 +0000 Subject: [PATCH 06/41] - qt webkit crash on drag (#528094) --- ...urce-src-4.5.2-fix-webkit-drag-crash.patch | 28 +++++++++++++++++++ qt.spec | 15 +++++----- 2 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch diff --git a/qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch b/qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch new file mode 100644 index 0000000..6a16e97 --- /dev/null +++ b/qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch @@ -0,0 +1,28 @@ +diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp +index 4caf336..b21a3fe 100644 +--- qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp ++++ qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp +@@ -44,6 +44,7 @@ + #include "XMLTokenizer.h" + #include "markup.h" + #include ++#include + + namespace WebCore { + +diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/page/DragController.cpp qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/page/DragController.cpp +index 10a11f2..c756da8 100644 +--- qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/page/DragController.cpp ++++ qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/page/DragController.cpp +@@ -157,7 +157,7 @@ void DragController::dragExited(DragData* dragData) + Frame* mainFrame = m_page->mainFrame(); + + if (RefPtr v = mainFrame->view()) { +- ClipboardAccessPolicy policy = m_document->securityOrigin()->isLocal() ? ClipboardReadable : ClipboardTypesReadable; ++ ClipboardAccessPolicy policy = (!m_document || m_document->securityOrigin()->isLocal()) ? ClipboardReadable : ClipboardTypesReadable; + RefPtr clipboard = dragData->createClipboard(policy); + clipboard->setSourceOperation(dragData->draggingSourceOperationMask()); + mainFrame->eventHandler()->cancelDragAndDrop(createMouseEvent(dragData), clipboard.get()); +-- +1.6.2.5 + diff --git a/qt.spec b/qt.spec index 30428e9..2915089 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.2 -Release: 24%{?dist} +Release: 25%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -61,9 +61,10 @@ Patch55: qt-x11-opensource-src-4.5.2-timestamp.patch # compile with openssl-1.0 Patch56: qt-x11-opensource-src-4.5.2-ossl10.patch -# security patches +## upstream/security patches Patch100: qt-x11-opensource-src-4.5.2-CVE-2009-1725.patch Patch101: qt-x11-opensource-src-4.5.2-CVE-2009-2700.patch +Patch102: qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch # switch to kde-qt branches, qt-copy doesn't exist anymore Patch200: kde-qt-patches-20090820git.patch @@ -372,9 +373,10 @@ Qt libraries used for drawing widgets and OpenGL items. %patch55 -p1 -b .timestamp %patch56 -p1 -b .ossl10 -# security fixes +# upstream/security fixes %patch100 -p1 -b .CVE-2009-1725 %patch101 -p1 -b .CVE-2009-2700 +%patch102 -p1 -b .webkit_drag_crash # kde-qt branch %patch200 -p1 -b .kde-qt-patches-20090820git @@ -384,10 +386,6 @@ Qt libraries used for drawing widgets and OpenGL items. # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` -# hack around (hopefully temporary) gcc borkage (#522576) -#if 0%{?fedora} > 11 -#RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-var-tracking-assignments" -#endif %define platform linux-g++ %if "%{_qt4_datadir}" != "%{_qt4_prefix}" && "%{_lib}" == "lib64" @@ -945,6 +943,9 @@ fi %changelog +* Fri Oct 09 2009 Rex Dieter - 4.5.2-25 +- qt webkit crash on drag (#528094) + * Tue Oct 06 2009 Jaroslav Reznik - 4.5.2-24 - disable JavaScriptCore JIT, SE Linux crashes (#527079) From 4101233f143cd6cd906b4c695a7a9fab174e3564 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 10 Oct 2009 20:14:41 +0000 Subject: [PATCH 07/41] sync w/devel branch (for 4.5.3) --- .cvsignore | 3 +- ...object-name-as-a-fallback-for-window.patch | 117 + ...s-override-redirect-windows-popup-me.patch | 67 + ...ges-QObjectPrivateVersion-thus-preve.patch | 37 + ...s-support-for-using-isystem-to-allow.patch | 56 + ...are-inserted-or-removed-in-a-QTabBar.patch | 47 + ...e-to-do-an-out-of-source-build-on-wi.patch | 67 + ...e-outside-qt-src-tree-it-sometimes-g.patch | 73 + ...In-a-treeview-with-columns-like-this.patch | 52 + ...-deserialization-of-values-with-cust.patch | 54 + ...ME.qt-copy-from-the-original-qt-copy.patch | 207 ++ ...e-to-reflect-the-workflow-with-Git-a.patch | 257 +++ ...-QMenu-respect-the-minimum-width-set.patch | 31 + ...rg-XFree-multimedia-special-launcher.patch | 660 ++++++ ...Add-context-to-tr-calls-in-QShortcut.patch | 70 + 0274-shm-native-image-fix.patch | 88 + kde-qt-patches-20090820git.patch | 2042 ----------------- kde-qt-patches.sh | 4 + qt-copy-patches-svn_checkout.sh | 23 - ...1-opensource-src-4.5.2-CVE-2009-1725.patch | 25 - ...1-opensource-src-4.5.2-CVE-2009-2700.patch | 12 - ...urce-src-4.5.2-fix-webkit-drag-crash.patch | 28 - qt-x11-opensource-src-4.5.2-ossl10.patch | 157 -- ...rce-src-4.5.2-system_ca_certificates.patch | 42 - qt-x11-opensource-src-4.5.2-timestamp.patch | 92 - ...rce-src-4.5.3-system_ca_certificates.patch | 25 + qt.spec | 101 +- sources | 2 +- 28 files changed, 1979 insertions(+), 2460 deletions(-) create mode 100644 0001-This-patch-uses-object-name-as-a-fallback-for-window.patch create mode 100644 0002-This-patch-makes-override-redirect-windows-popup-me.patch create mode 100644 0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch create mode 100644 0004-This-patch-adds-support-for-using-isystem-to-allow.patch create mode 100644 0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch create mode 100644 0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch create mode 100644 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch create mode 100644 0008-In-a-treeview-with-columns-like-this.patch create mode 100644 0009-This-patch-fixes-deserialization-of-values-with-cust.patch create mode 100644 0010-Import-README.qt-copy-from-the-original-qt-copy.patch create mode 100644 0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch create mode 100644 0015-Make-QMenu-respect-the-minimum-width-set.patch create mode 100644 0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch create mode 100644 0017-Add-context-to-tr-calls-in-QShortcut.patch create mode 100644 0274-shm-native-image-fix.patch delete mode 100644 kde-qt-patches-20090820git.patch create mode 100644 kde-qt-patches.sh delete mode 100755 qt-copy-patches-svn_checkout.sh delete mode 100644 qt-x11-opensource-src-4.5.2-CVE-2009-1725.patch delete mode 100644 qt-x11-opensource-src-4.5.2-CVE-2009-2700.patch delete mode 100644 qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch delete mode 100644 qt-x11-opensource-src-4.5.2-ossl10.patch delete mode 100644 qt-x11-opensource-src-4.5.2-system_ca_certificates.patch delete mode 100644 qt-x11-opensource-src-4.5.2-timestamp.patch create mode 100644 qt-x11-opensource-src-4.5.3-system_ca_certificates.patch diff --git a/.cvsignore b/.cvsignore index 4c7bf95..870ad62 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,11 +1,10 @@ hi128-app-qt4-logo.png hi48-app-qt4-logo.png gstreamer-logo.svg -qt-x11-opensource-src-4.5.2.tar.bz2 -qt-copy-patches-20090626svn.tar.bz2 hi128-phonon-gstreamer.png hi16-phonon-gstreamer.png hi22-phonon-gstreamer.png hi32-phonon-gstreamer.png hi48-phonon-gstreamer.png hi64-phonon-gstreamer.png +qt-x11-opensource-src-4.5.3.tar.gz diff --git a/0001-This-patch-uses-object-name-as-a-fallback-for-window.patch b/0001-This-patch-uses-object-name-as-a-fallback-for-window.patch new file mode 100644 index 0000000..189e565 --- /dev/null +++ b/0001-This-patch-uses-object-name-as-a-fallback-for-window.patch @@ -0,0 +1,117 @@ +From b48e2091871516496cf0b133249fbf5326a55831 Mon Sep 17 00:00:00 2001 +From: Lubos Lunak +Date: Sat, 23 Feb 2008 16:44:52 +0100 +Subject: [PATCH 01/18] This patch uses object name as a fallback for window role if no window + role is set explicitly using setWindowRole(). Since Qt3 always used + the object name as the window role and most Qt3/KDE3 code is ported to + call setObjectName(), + +this makes the window role set in many cases (which KWin uses for window identifying). + +NOTE: It is suggested to apply patch #0209 as well when this patch is used. + +qt-bugs@ issue : 167704 +Trolltech task ID : 168283 (status: "fixed" for Qt 4.4.0, but effectively refused) +--- + src/corelib/kernel/qobject.cpp | 8 ++++++++ + src/corelib/kernel/qobject_p.h | 3 +++ + src/gui/kernel/qwidget_p.h | 1 + + src/gui/kernel/qwidget_x11.cpp | 27 +++++++++++++++++++++------ + 4 files changed, 33 insertions(+), 6 deletions(-) + +diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp +index 6487194..ef0369e 100644 +--- a/src/corelib/kernel/qobject.cpp ++++ b/src/corelib/kernel/qobject.cpp +@@ -993,8 +993,16 @@ void QObject::setObjectName(const QString &name) + { + Q_D(QObject); + d->objectName = name; ++#if defined(Q_WS_X11) ++ d->checkWindowRole(); ++#endif + } + ++#if defined(Q_WS_X11) ++void QObjectPrivate::checkWindowRole() ++{ ++} ++#endif + + #ifdef QT3_SUPPORT + /*! \internal +diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h +index 0bcccba..6ab9e10 100644 +--- a/src/corelib/kernel/qobject_p.h ++++ b/src/corelib/kernel/qobject_p.h +@@ -144,6 +144,9 @@ public: + mutable quint32 connectedSignals; + + QString objectName; ++#if defined(Q_WS_X11) ++ virtual void checkWindowRole(); ++#endif + + // Note: you must hold the signalSlotLock() before accessing the lists below or calling the functions + struct Connection +diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h +index 774e390..176d6fa 100644 +--- a/src/gui/kernel/qwidget_p.h ++++ b/src/gui/kernel/qwidget_p.h +@@ -358,6 +358,7 @@ public: + + #if defined(Q_WS_X11) + void setWindowRole(); ++ virtual void checkWindowRole(); + void sendStartupMessage(const char *message) const; + void setNetWmWindowTypes(); + void x11UpdateIsOpaque(); +diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp +index 79ee8c9..b56849c 100644 +--- a/src/gui/kernel/qwidget_x11.cpp ++++ b/src/gui/kernel/qwidget_x11.cpp +@@ -778,13 +778,17 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + data.fstrut_dirty = 1; + + // declare the widget's window role ++ QByteArray windowRole; + if (QTLWExtra *topData = maybeTopData()) { +- if (!topData->role.isEmpty()) { +- QByteArray windowRole = topData->role.toUtf8(); +- XChangeProperty(dpy, id, +- ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, +- (unsigned char *)windowRole.constData(), windowRole.length()); +- } ++ if (!topData->role.isEmpty()) ++ windowRole = topData->role.toUtf8(); ++ } ++ if (windowRole.isEmpty()) // use object name as a fallback ++ windowRole = objectName.toUtf8(); ++ if (!windowRole.isEmpty()) { ++ XChangeProperty(dpy, id, ++ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, ++ (unsigned char *)windowRole.constData(), windowRole.length()); + } + + // set client leader property +@@ -2768,6 +2772,17 @@ void QWidgetPrivate::setWindowRole() + (unsigned char *)windowRole.constData(), windowRole.length()); + } + ++void QWidgetPrivate::checkWindowRole() ++{ ++ Q_Q(QWidget); ++ if( !q->windowRole().isEmpty() || !q->internalWinId()) ++ return; ++ QByteArray windowRole = objectName.toUtf8(); // use as a fallback ++ XChangeProperty(X11->display, q->internalWinId(), ++ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, ++ (unsigned char *)windowRole.constData(), windowRole.length()); ++} ++ + Q_GLOBAL_STATIC(QX11PaintEngine, qt_widget_paintengine) + QPaintEngine *QWidget::paintEngine() const + { +-- +1.6.2.5 + diff --git a/0002-This-patch-makes-override-redirect-windows-popup-me.patch b/0002-This-patch-makes-override-redirect-windows-popup-me.patch new file mode 100644 index 0000000..a33e083 --- /dev/null +++ b/0002-This-patch-makes-override-redirect-windows-popup-me.patch @@ -0,0 +1,67 @@ +From 339e220e29ff39b86705438b4be6f90e5618d27b Mon Sep 17 00:00:00 2001 +From: Lubos Lunak +Date: Tue, 2 Oct 2007 16:08:32 +0200 +Subject: [PATCH 02/18] This patch makes override-redirect windows (popup menu, dropdown menu, + tooltip, combobox, etc.) also have more window properties like WM_CLASS, + so they can be used when compositing. + +qt-bugs@ issue : none +bugs.kde.org number : none +--- + src/gui/kernel/qwidget_x11.cpp | 21 +++++++++++++++------ + 1 files changed, 15 insertions(+), 6 deletions(-) + +diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp +index 79ee8c9..a74a849 100644 +--- a/src/gui/kernel/qwidget_x11.cpp ++++ b/src/gui/kernel/qwidget_x11.cpp +@@ -719,6 +719,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + Q_ASSERT(id); + XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder, + &wsa); ++ XClassHint class_hint; ++ QByteArray appName = qAppName().toLatin1(); ++ class_hint.res_name = appName.data(); // application name ++ class_hint.res_class = const_cast(QX11Info::appClass()); // application class ++ XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint); + } else if (topLevel && !desktop) { // top-level widget + if (!X11->wm_client_leader) + create_wm_client_leader(); +@@ -769,13 +774,21 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + // set EWMH window types + setNetWmWindowTypes(); + ++ // when we create a toplevel widget, the frame strut should be dirty ++ data.fstrut_dirty = 1; ++ ++ } else { ++ // non-toplevel widgets don't have a frame, so no need to ++ // update the strut ++ data.fstrut_dirty = 0; ++ } ++ ++ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows + // set _NET_WM_PID + long curr_pid = getpid(); + XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace, + (unsigned char *) &curr_pid, 1); + +- // when we create a toplevel widget, the frame strut should be dirty +- data.fstrut_dirty = 1; + + // declare the widget's window role + if (QTLWExtra *topData = maybeTopData()) { +@@ -791,10 +804,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER), + XA_WINDOW, 32, PropModeReplace, + (unsigned char *)&X11->wm_client_leader, 1); +- } else { +- // non-toplevel widgets don't have a frame, so no need to +- // update the strut +- data.fstrut_dirty = 0; + } + + if (initializeWindow && q->internalWinId()) { +-- +1.6.2.5 + diff --git a/0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch b/0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch new file mode 100644 index 0000000..d40ce77 --- /dev/null +++ b/0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch @@ -0,0 +1,37 @@ +From 68eaa07de69e873b89d4aba341c6ed1ca81f6819 Mon Sep 17 00:00:00 2001 +From: Lubos Lunak +Date: Wed, 30 Jan 2008 14:24:01 +0100 +Subject: [PATCH 03/18] This patch changes QObjectPrivateVersion, thus preventing mixing + parts of upstream Qt and qt-copy. In general it is a bad idea to mix + e.g. libQtCore from one build and libQtGui from another one, and other + qt-copy patches could make changes in Qt internal structures that could + cause problems when mixed with upstream Qt. + +This patch does not make qt-copy binary incompatible with upstream Qt. +It only further enforces using the same sources for the whole Qt build. + +qt-bugs@ issue : none +Trolltech task ID : none +bugs.kde.org number : none +--- + src/corelib/kernel/qobject_p.h | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h +index 0bcccba..88192fd 100644 +--- a/src/corelib/kernel/qobject_p.h ++++ b/src/corelib/kernel/qobject_p.h +@@ -83,7 +83,9 @@ extern QSignalSpyCallbackSet Q_CORE_EXPORT qt_signal_spy_callback_set; + + inline QObjectData::~QObjectData() {} + +-enum { QObjectPrivateVersion = QT_VERSION }; ++// add 0x1000000 to mark it as qt-copy version, with possible modifications ++// in some Q*Private class ++enum { QObjectPrivateVersion = QT_VERSION + 0x1000000 }; + + class Q_CORE_EXPORT QObjectPrivate : public QObjectData + { +-- +1.6.2.5 + diff --git a/0004-This-patch-adds-support-for-using-isystem-to-allow.patch b/0004-This-patch-adds-support-for-using-isystem-to-allow.patch new file mode 100644 index 0000000..daa15fd --- /dev/null +++ b/0004-This-patch-adds-support-for-using-isystem-to-allow.patch @@ -0,0 +1,56 @@ +From 86fc0d43cdcf3232ae0e4e6f4f28cf8f1a45ede5 Mon Sep 17 00:00:00 2001 +From: Benjamin Reed +Date: Tue, 19 Feb 2008 17:37:37 +0100 +Subject: [PATCH 04/18] This patch adds support for using -isystem to allow putting an include + directory at the end of the compiler's header search path. + +I don't have the exact output anymore (I've since patched Qt's configure) but +essentially, since I have pcre.h in /opt/kde4-deps/include, it was +conflicting with Qt's (modified) pcre.h in the WebKit bits, since +-I /opt/kde4-deps/include ends up in CXXFLAGS in the generated makefiles, it +comes *before* the specific locations in INCPATH on the compile line, and you +end up with a conflict with the system-installed pcre.h. + +Presumably, if your pcre.h is in /usr/include as on most Linux systems, you +wouldn't notice this issue since /usr/include's already in your include path +and people likely don't pass -I /usr/include to configure. I suspect that on +any platform with a regular, system-installed pcre.h (or clucene headers), +adding -I /usr/include would exhibit this bug, just as a custom-installed +pcre/clucene in another root would. + +qt-bugs@ issue : 199610 +Trolltech task ID : +bugs.kde.org number : +--- + configure | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/configure b/configure +index 2c108ad..610a201 100755 +--- a/configure ++++ b/configure +@@ -927,6 +927,11 @@ while [ "$#" -gt 0 ]; do + VAL=`echo $1 | sed 's,-D,,'` + fi + ;; ++ -isystem) ++ VAR="add_isystempath" ++ shift ++ VAL="$1" ++ ;; + -I?*|-I) + VAR="add_ipath" + if [ "$1" = "-I" ]; then +@@ -1890,6 +1895,9 @@ while [ "$#" -gt 0 ]; do + add_ipath) + I_FLAGS="$I_FLAGS -I\"${VAL}\"" + ;; ++ add_isystempath) ++ I_FLAGS="$I_FLAGS -isystem \"${VAL}\"" ++ ;; + add_lpath) + L_FLAGS="$L_FLAGS -L\"${VAL}\"" + ;; +-- +1.6.2.5 + diff --git a/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch b/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch new file mode 100644 index 0000000..e383e94 --- /dev/null +++ b/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch @@ -0,0 +1,47 @@ +From 733d1afd03908d695aa8a6518f453b9ff0e5b8a2 Mon Sep 17 00:00:00 2001 +From: Robert Knight +Date: Sun, 20 Apr 2008 16:28:31 +0200 +Subject: [PATCH 05/18] When tabs are inserted or removed in a QTabBar, + QTabBarPrivate::refresh() is called to update the layout. If the + tabbar widget is hidden, this just sets a boolean variable + (layoutDirty) and returns, so the parent widget's layout is not + notified about the possible geometry change. + +Prior to Qt 4.4 this was not a problem because the geometry was +recalculated in QTabBar::sizeHint() if the layoutDirty variable was +set. In Qt 4.4 however the layout caches size hint information in +QWidgetItemV2. Since the cache information is not invalidated, the +layout may end up using out-of-date size hint information to compute +the widget size. + +If the QTabBar is empty when QTabBar::sizeHint() is called, it will +return a size with a height of 0, which will be kept in the cache and +so the tab bar will never be shown. + +This patch fixes the problem by calling updateGeometry() whenever the +tab bar's layout is refreshed. + +qt-bugs@ issue : 208185 +Trolltech task ID : 208349 +bugs.kde.org number : 159014 +--- + src/gui/widgets/qtabbar.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp +index 419d456..41107a0 100644 +--- a/src/gui/widgets/qtabbar.cpp ++++ b/src/gui/widgets/qtabbar.cpp +@@ -678,8 +678,8 @@ void QTabBarPrivate::refresh() + layoutTabs(); + makeVisible(currentIndex); + q->update(); +- q->updateGeometry(); + } ++ q->updateGeometry(); + } + + /*! +-- +1.6.2.5 + diff --git a/0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch b/0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch new file mode 100644 index 0000000..384f027 --- /dev/null +++ b/0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch @@ -0,0 +1,67 @@ +From 8e28e0603a900e1b18ebfd14c4f87b16dabf4cf6 Mon Sep 17 00:00:00 2001 +From: Christian Ehrlicher +Date: Fri, 19 Sep 2008 17:41:26 +0200 +Subject: [PATCH 06/18] Fix configure.exe to do an out-of-source build on windows + +qt-bugs@ issue : N227213 +Trolltech task ID : none yet +--- + bin/syncqt | 6 +++++- + projects.pro | 3 +++ + src/tools/moc/main.cpp | 6 ++++++ + 3 files changed, 14 insertions(+), 1 deletions(-) + +diff --git a/bin/syncqt b/bin/syncqt +index 7a9f1d3..b5a8e1c 100755 +--- a/bin/syncqt ++++ b/bin/syncqt +@@ -365,9 +365,13 @@ sub fixPaths { + $match_dir = $tmp; + $i = $slash; + } ++ my $cnt_ofs = 0; ++ if($match_dir =~ /^[a-zA-Z]:$/) { ++ $cnt_ofs = 1; ++ } + if($match_dir) { + my $after = substr($dir, length($match_dir)); +- my $count = ($after =~ tr,/,,); ++ my $count = ($after =~ tr,/,,) - $cnt_ofs; + my $dots = ""; + for(my $i = 0; $i < $count; $i++) { + $dots .= "../"; +diff --git a/projects.pro b/projects.pro +index 2596c0a..3ba0688 100644 +--- a/projects.pro ++++ b/projects.pro +@@ -127,6 +127,9 @@ unix { + DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g + mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default + } ++win32 { ++ mkspecs.files += $$QT_BUILD_TREE/mkspecs/default ++} + INSTALLS += mkspecs + + false:macx { #mac install location +diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp +index d519b09..7979836 100644 +--- a/src/tools/moc/main.cpp ++++ b/src/tools/moc/main.cpp +@@ -94,7 +94,13 @@ static QByteArray combinePath(const char *infile, const char *outfile) + inSplitted.prepend(QLatin1String("..")); + } + inSplitted.append(inFileInfo.fileName()); ++#ifdef Q_WS_WIN ++ const QString rel = inSplitted.join(QLatin1String("/")); ++ const QString abs = inFileInfo.absoluteFilePath(); ++ return QFile::encodeName(rel.length() < abs.length() ? rel : abs); ++#else + return QFile::encodeName(inSplitted.join(QLatin1String("/"))); ++#endif + } + + +-- +1.6.2.5 + diff --git a/0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch b/0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch new file mode 100644 index 0000000..cd66e4c --- /dev/null +++ b/0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch @@ -0,0 +1,73 @@ +From 0afcf33127c6ccbe5dfaae4f4c5e02f28dc10ae1 Mon Sep 17 00:00:00 2001 +From: Christian Ehrlicher +Date: Thu, 8 May 2008 21:25:49 +0200 +Subject: [PATCH 07/18] When using qmake outside qt src tree, it sometimes generates wrong + paths (wrong path separator) + +qt-bugs@ issue : none +Trolltech task ID : 214661 +--- + qmake/property.cpp | 29 ++++++++++++++++------------- + 1 files changed, 16 insertions(+), 13 deletions(-) + +diff --git a/qmake/property.cpp b/qmake/property.cpp +index 8ba89f9..dd78349 100644 +--- a/qmake/property.cpp ++++ b/qmake/property.cpp +@@ -81,29 +81,32 @@ QMakeProperty::keyBase(bool version) const + QString + QMakeProperty::value(QString v, bool just_check) + { ++ QString ret; + if(v == "QT_INSTALL_PREFIX") +- return QLibraryInfo::location(QLibraryInfo::PrefixPath); ++ ret = QLibraryInfo::location(QLibraryInfo::PrefixPath); + else if(v == "QT_INSTALL_DATA") +- return QLibraryInfo::location(QLibraryInfo::DataPath); ++ ret = QLibraryInfo::location(QLibraryInfo::DataPath); + else if(v == "QT_INSTALL_DOCS") +- return QLibraryInfo::location(QLibraryInfo::DocumentationPath); ++ ret = QLibraryInfo::location(QLibraryInfo::DocumentationPath); + else if(v == "QT_INSTALL_HEADERS") +- return QLibraryInfo::location(QLibraryInfo::HeadersPath); ++ ret = QLibraryInfo::location(QLibraryInfo::HeadersPath); + else if(v == "QT_INSTALL_LIBS") +- return QLibraryInfo::location(QLibraryInfo::LibrariesPath); ++ ret = QLibraryInfo::location(QLibraryInfo::LibrariesPath); + else if(v == "QT_INSTALL_BINS") +- return QLibraryInfo::location(QLibraryInfo::BinariesPath); ++ ret = QLibraryInfo::location(QLibraryInfo::BinariesPath); + else if(v == "QT_INSTALL_PLUGINS") +- return QLibraryInfo::location(QLibraryInfo::PluginsPath); ++ ret = QLibraryInfo::location(QLibraryInfo::PluginsPath); + else if(v == "QT_INSTALL_TRANSLATIONS") +- return QLibraryInfo::location(QLibraryInfo::TranslationsPath); ++ ret = QLibraryInfo::location(QLibraryInfo::TranslationsPath); + else if(v == "QT_INSTALL_CONFIGURATION") +- return QLibraryInfo::location(QLibraryInfo::SettingsPath); ++ ret = QLibraryInfo::location(QLibraryInfo::SettingsPath); + else if(v == "QT_INSTALL_EXAMPLES") +- return QLibraryInfo::location(QLibraryInfo::ExamplesPath); ++ ret = QLibraryInfo::location(QLibraryInfo::ExamplesPath); + else if(v == "QT_INSTALL_DEMOS") +- return QLibraryInfo::location(QLibraryInfo::DemosPath); +- else if(v == "QMAKE_MKSPECS") ++ ret = QLibraryInfo::location(QLibraryInfo::DemosPath); ++ if(!ret.isEmpty()) ++ return QDir::toNativeSeparators(ret); ++ if(v == "QMAKE_MKSPECS") + return qmake_mkspec_paths().join(Option::target_mode == Option::TARG_WIN_MODE ? ";" : ":"); + else if(v == "QMAKE_VERSION") + return qmake_version(); +@@ -116,7 +119,7 @@ QMakeProperty::value(QString v, bool just_check) + int slash = v.lastIndexOf('/'); + QVariant var = settings->value(keyBase(slash == -1) + v); + bool ok = var.isValid(); +- QString ret = var.toString(); ++ ret = var.toString(); + if(!ok) { + QString version = qmake_version(); + if(slash != -1) { +-- +1.6.2.5 + diff --git a/0008-In-a-treeview-with-columns-like-this.patch b/0008-In-a-treeview-with-columns-like-this.patch new file mode 100644 index 0000000..af6ffae --- /dev/null +++ b/0008-In-a-treeview-with-columns-like-this.patch @@ -0,0 +1,52 @@ +From 1ec9dd029abaa0f00798535fdb1722154b1c63f6 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Rafael=20Fern=C3=A1ndez=20L=C3=B3pez?= +Date: Sun, 26 Oct 2008 10:40:51 +0100 +Subject: [PATCH 08/18] In a treeview with columns like this: + +Column 1 | Column 2 | ... | Column k | ... | Column n + +When selecting with rubberband (by clicking on the blank part of the viewport) while Column k is +hidden, you get double items on the selection model, when asking for selection(). This is becase +ranges are incorrectly calculated when there are hidden columns. A way to reproduce: + +Column 1 | Column 2 | Column 4 (Column 3 is hidden) + item + item + item + x <- press button here and move it up to select items (on this same column) + +If you do like this: + +Column 1 | Column 2 | Column 4 (Column 3 is hidden) + item + item + item + x <- press button here and move it up + +you won't be able to reproduce, since you need the hidden column to be between the one you click and +the last one. The reason is that columnRanges returns two ranges when there is supposed to return 1 +range (even when there are hidden columns). + +qt-bugs@ issue : N232819 +Trolltech task ID : 232831 +bugs.kde.org number : 171436 +--- + src/gui/itemviews/qtreeview.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp +index ed6ad03..dc147f2 100644 +--- a/src/gui/itemviews/qtreeview.cpp ++++ b/src/gui/itemviews/qtreeview.cpp +@@ -3575,7 +3575,7 @@ QList > QTreeViewPrivate::columnRanges(const QModelIndex &topInd + current.first = -2; // -1 is not enough because -1+1 = 0 + current.second = -2; + foreach (int logicalColumn, logicalIndexes) { +- if (current.second + 1 != logicalColumn) { ++ if (current.second + 1 != logicalColumn && !header->isSectionHidden(current.second + 1)) { + if (current.first != -2) { + //let's save the current one + ret += current; +-- +1.6.2.5 + diff --git a/0009-This-patch-fixes-deserialization-of-values-with-cust.patch b/0009-This-patch-fixes-deserialization-of-values-with-cust.patch new file mode 100644 index 0000000..083a1fc --- /dev/null +++ b/0009-This-patch-fixes-deserialization-of-values-with-cust.patch @@ -0,0 +1,54 @@ +From b274bbaf4768dcfdfcf95ceda08b6402ffedb80d Mon Sep 17 00:00:00 2001 +From: George Goldberg +Date: Tue, 28 Apr 2009 17:08:07 +0200 +Subject: [PATCH 09/18] This patch fixes deserialization of values with custom types when setting + properties on dbus adaptors. It is needed, in particular by telepathy/Qt + programs and libraries. The bug was reported to Nokia on 2009-01-07 along + with the patch supplied here. The summary of the issue from the Qt + Software task tracker follows: + +When calling the setter for a DBus property, if that property has a custom type +(e.g. a struct with dbus type (uss)), QtDBus fails to demarshall the +QDBusArgument before attempting to set the property on the adaptor. The result +is that it attempts to call adaptor->setProperty() with a QDBusArgument of type +"uss" instead of with the type of the custom struct. + +qt-bugs@ issue : N240326 +Qt Software task ID : 240608 +bugs.kde.org number : none +--- + src/dbus/qdbusinternalfilters.cpp | 16 +++++++++++++++- + 1 files changed, 15 insertions(+), 1 deletions(-) + +diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp +index c71f2f4..d261d01 100644 +--- a/src/dbus/qdbusinternalfilters.cpp ++++ b/src/dbus/qdbusinternalfilters.cpp +@@ -274,9 +274,23 @@ QDBusMessage qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNode &node + QDBusAdaptorConnector::AdaptorMap::ConstIterator it; + it = qLowerBound(connector->adaptors.constBegin(), connector->adaptors.constEnd(), + interface_name); +- if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) ++ if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) { ++ if (value.userType() == qMetaTypeId()) { ++ QDBusArgument valueArg = qvariant_cast(value); ++ if (valueArg.currentType() != -1) { ++ int mid = it->adaptor->metaObject()->property(it->adaptor->metaObject()->indexOfProperty(property_name)).userType(); ++ void *null = 0; ++ QVariant valueStore(mid, null); ++ QDBusMetaType::demarshall(valueArg, mid, valueStore.data()); ++ ++ if (it->adaptor->setProperty(property_name, valueStore)) ++ return msg.createReply(); ++ } ++ } ++ + if (it->adaptor->setProperty(property_name, value)) + return msg.createReply(); ++ } + } + } + +-- +1.6.2.5 + diff --git a/0010-Import-README.qt-copy-from-the-original-qt-copy.patch b/0010-Import-README.qt-copy-from-the-original-qt-copy.patch new file mode 100644 index 0000000..758a4dc --- /dev/null +++ b/0010-Import-README.qt-copy-from-the-original-qt-copy.patch @@ -0,0 +1,207 @@ +From 9a3fe8fc4912bf82b791c4131f553c18140ca838 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Sun, 21 Jun 2009 13:17:13 -0300 +Subject: [PATCH 10/18] Import README.qt-copy from the original qt-copy + +--- + README.kde-qt | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 188 insertions(+), 0 deletions(-) + create mode 100644 README.kde-qt + +diff --git a/README.kde-qt b/README.kde-qt +new file mode 100644 +index 0000000..f605a0b +--- /dev/null ++++ b/README.kde-qt +@@ -0,0 +1,188 @@ ++This is a copy of Qt version 4.5.1. It may include ++modifications which are necessary for KDE; these are listed in the ++patches directory. ++ ++1. Qt-copy patches ++================== ++ ++You may also consider running the apply_patches script before configuring qt-copy, ++which will apply all not yet applied patches from the patches/ directory that ++are considered safe (they mostly include optimizations and features that don't ++add new API). Note that most of those patches haven't been accepted ++by Qt Software yet. and therefore they'll make your qt-copy differ from official ++Qt version. ++ ++2. Configuring Qt ++================= ++ ++The recommended compile line is: ++ ++--default-config-begin-- ++./configure -qt-gif -debug -fast -no-exceptions -no-separate-debug-info \ ++ -system-libpng -system-libjpeg -system-zlib \ ++ -dbus -webkit -no-phonon -plugin-sql-mysql \ ++ -nomake examples -nomake demos -prefix ++--default-config-end-- ++ ++It contains "-debug", which greatly improves the use for backtraces (but ++also needs a lot more disk space and makes things slower). To build in ++release mode, replace it with "-release". ++ ++It also contains "-no-separate-debug-info", which disables separate .debug ++files. Instead, the debug information will be built into the libraries. ++This option is needed when you install Qt. ++If you don't install Qt, it can be useful to disable this option, ++thus having separate debug symbol files. With separate debug files, you can ++just move those debug files to another directory to remove Qt debug symbols. ++Moving the files back will enable Qt debug symbols again. ++This is useful if you rarely need to step into Qt functions during debugging, ++because GDB loads much faster and uses less memory without Qt debug symbols. ++In the rare case you need to step into Qt code, you can temporarily enable ++debug symbols again by moving the debug files back. You can even load the Qt ++debug symbols from within GDB on demand, using the "symbol-file" command. ++ ++It also contains the "-no-exceptions" argument, which disables C++ ++exception support. Disabling exception support may improve memory ++consumption if GCC is being used. However, that also disables the ++QtXmlPatterns module since that requires exception support. If you ++plan on using that module, remove the option. ++ ++If you are planning to compile Qt using an Icecream cluster you have to ++pass the option -no-pch (no precompiled headers) to configure to make ++distributed compilation work. ++ ++3. Compiling Qt ++=============== ++ ++To compile Qt on a Unix platform, run: ++ ++ export MAKEFLAGS=-j2 ++ make ++ make install ++ ++If your computer has more than one core or processor, you may consider ++increasing the "2" above. If you've got a compile farm available, you ++should adjust the -j argument to match the number of slots in that ++farm. ++ ++4. Modifying & rebuilding Qt ++============================ ++ ++If you make modifications to the Qt source code, you don't need to ++build everything again. Simply go to the directory containing the ++Makefile closest to the files you changed and run "make" again. ++ ++For example, if you modified src/corelib/io/qiodevice.cpp, do: ++ ++ cd src/corelib ++ make ++ ++Do not commit your modifications to qt-copy as such. If you have a fix ++that benefit others, see the "Creating Qt-copy patches" section below. ++ ++5. Building Qt examples and demos ++================================= ++ ++The "-nomake examples -nomake demos" arguments to the configure script ++mean that those two sections will not be configured for ++building. Which is unneeded for usage of the library. If you want to ++compile the examples or demos later; just enter either directory and ++type: ++ ++ qmake ++ make ++ ++6. Building Qt documentation (only applies to Snapshot versions of Qt) ++============================ ++ ++To build and install the documentation, run: ++ ++ make docs ++ ./config.status ++ make install ++ ++It is necessary to do this once only, even if you rebuild Qt later. ++ ++7. Using Qt uninstalled ++======================= ++ ++To use without having to install it, configure it as follows: ++ ++ ./configure -prefix $PWD ++ make sub-src ++ make sub-tools ++ ++Attention: DO NOT run ++ ++ make install ++ ++If you do, Qt will overwrite your include/ directory with its ++installation. ++ ++8. Creating Qt-copy patches ++=========================== ++ ++If you have fixed a bug in Qt or modified it in any way that may ++benefit others, please share your change in the form of a patch. Do ++not commit your changes directly to the qt-copy module because they ++may be lost in a future update if they have not been added to the ++official Qt release. ++ ++The exception to the above rule is that if the fix has been accepted ++by Qt Software (and so will appear in the next release of Qt), then ++it can be applied directly to qt-copy. In this case, the patch ++should still be placed in patches/ as usual, but it should have a ++header line ++ Applied: yes ++ ++Before creating a patch, it is recommended to contact Qt Software ++support via qt-bugs@trolltech.com and explain the situation. There may ++be a solution for the problem already or a new direction that should ++be accounted for. ++ ++To create a patch, do the following: ++ a) make sure your Qt sources are clean of other changes. Run: ++ svn revert -R . ++ b) make your changes to the Qt source code and verify that it ++ compiles, links and works. ++ c) open the patches/README file and get the next patch number ++ (you must read and understand the README file; if you don't, ask for ++ help from other KDE developers) ++ d) create the patch with: ++ svn diff > patches/NNNN-short-description-of-your-patch.diff ++ where NNNN is the next available number. ++ e) open the file you've just created and add the header to it. The ++ header should be the template in patches/README followed by a longer ++ description of your patch. ++ ++Don't forget to submit your patch to qt-bugs@trolltech.com along with ++the long description of the issue found, if you haven't already. ++Qt Software does not monitor the patches/ directory, so qt-copy ++patches do not get automatically applied to Qt official releases. ++ ++When you receive the issue number and task tracker numbers, update the ++patch file. ++ ++9. Known issues with current Qt code ++==================================== ++ ++In case you have strange issues with non-resizing windows and similar, use ++ export QT_USE_NATIVE_WINDOWS=1 ++before starting KDE. ++ ++10. Troubleshooting: Re-configuring and re-compiling ++=================================================== ++ ++For those updating the source in a directory where Qt has already ++been compiled, you may need to run the following commands from the ++top directory of your Qt sources: ++ ++ find . -name '*.moc' | xargs rm ++ ++Sometimes ./configure will refuse to run. You may need to: ++ rm .qmake.cache ++ ++If you think you may have run "make install" on an install-less Qt ++(srcdir == $QTDIR), run: ++ ++ svn revert -R include +-- +1.6.2.5 + diff --git a/0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch b/0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch new file mode 100644 index 0000000..870c9ab --- /dev/null +++ b/0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch @@ -0,0 +1,257 @@ +From 39b24a10e4dee27357b9760b735c2ab98b132963 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Sun, 21 Jun 2009 13:46:54 -0300 +Subject: [PATCH 11/18] Update this file to reflect the workflow with Git, as well as use Git commands + +--- + README.kde-qt | 163 +++++++++++++++++++++++++++++++-------------------------- + 1 files changed, 88 insertions(+), 75 deletions(-) + +diff --git a/README.kde-qt b/README.kde-qt +index f605a0b..db3feb6 100644 +--- a/README.kde-qt ++++ b/README.kde-qt +@@ -1,27 +1,20 @@ +-This is a copy of Qt version 4.5.1. It may include +-modifications which are necessary for KDE; these are listed in the +-patches directory. ++This is a patched version of Qt. It may include changes made by KDE ++and Qt developers that have either not been accepted for inclusion ++into Qt, or have been accepted for a later version of Qt than this ++one. + +-1. Qt-copy patches +-================== +- +-You may also consider running the apply_patches script before configuring qt-copy, +-which will apply all not yet applied patches from the patches/ directory that +-are considered safe (they mostly include optimizations and features that don't +-add new API). Note that most of those patches haven't been accepted +-by Qt Software yet. and therefore they'll make your qt-copy differ from official +-Qt version. +- +-2. Configuring Qt ++1. Configuring Qt + ================= + + The recommended compile line is: + + --default-config-begin-- +-./configure -qt-gif -debug -fast -no-exceptions -no-separate-debug-info \ +- -system-libpng -system-libjpeg -system-zlib \ +- -dbus -webkit -no-phonon -plugin-sql-mysql \ +- -nomake examples -nomake demos -prefix ++ ++ ./configure -qt-gif -debug -fast -no-separate-debug-info \ ++ -system-libpng -system-libjpeg -system-zlib \ ++ -dbus -webkit -plugin-sql-mysql \ ++ -nomake examples -nomake demos -prefix ++ + --default-config-end-- + + It contains "-debug", which greatly improves the use for backtraces (but +@@ -31,6 +24,7 @@ release mode, replace it with "-release". + It also contains "-no-separate-debug-info", which disables separate .debug + files. Instead, the debug information will be built into the libraries. + This option is needed when you install Qt. ++ + If you don't install Qt, it can be useful to disable this option, + thus having separate debug symbol files. With separate debug files, you can + just move those debug files to another directory to remove Qt debug symbols. +@@ -41,17 +35,11 @@ In the rare case you need to step into Qt code, you can temporarily enable + debug symbols again by moving the debug files back. You can even load the Qt + debug symbols from within GDB on demand, using the "symbol-file" command. + +-It also contains the "-no-exceptions" argument, which disables C++ +-exception support. Disabling exception support may improve memory +-consumption if GCC is being used. However, that also disables the +-QtXmlPatterns module since that requires exception support. If you +-plan on using that module, remove the option. +- + If you are planning to compile Qt using an Icecream cluster you have to + pass the option -no-pch (no precompiled headers) to configure to make + distributed compilation work. + +-3. Compiling Qt ++2. Compiling Qt + =============== + + To compile Qt on a Unix platform, run: +@@ -65,34 +53,49 @@ increasing the "2" above. If you've got a compile farm available, you + should adjust the -j argument to match the number of slots in that + farm. + +-4. Modifying & rebuilding Qt ++3. Modifying & rebuilding Qt + ============================ + + If you make modifications to the Qt source code, you don't need to + build everything again. Simply go to the directory containing the + Makefile closest to the files you changed and run "make" again. + +-For example, if you modified src/corelib/io/qiodevice.cpp, do: ++For example, if you've modified src/corelib/io/qiodevice.cpp, do: + + cd src/corelib + make + +-Do not commit your modifications to qt-copy as such. If you have a fix +-that benefit others, see the "Creating Qt-copy patches" section below. ++If you make a change that is not temporary, you should create a Git ++commit out of it. However, you shouldn't push those changes to ++kde-qt.git. If you have a fix that benefit others, see the "Creating ++kde-qt.git modifications" section below. + +-5. Building Qt examples and demos ++4. Building Qt examples and demos + ================================= + + The "-nomake examples -nomake demos" arguments to the configure script +-mean that those two sections will not be configured for +-building. Which is unneeded for usage of the library. If you want to +-compile the examples or demos later; just enter either directory and +-type: ++mean that those two sections will not be configured for building, ++which is unneeded for usage of the library. If you want to compile ++the examples or demos later, just enter either directory and type: + + qmake + make + +-6. Building Qt documentation (only applies to Snapshot versions of Qt) ++5. Build Qt tests ++================= ++ ++(Official information: http://qt.gitorious.org/qt/pages/QtAutotestsEnvironment) ++ ++In order to run Qt tests, you must have a "developer build" of Qt. For ++that, you need to reconfigure Qt and add the "-developer-build" ++option. That option is technically equivalent to the options: ++ ++ -debug -prefix $PWD -DQT_BUILD_INTERNAL ++ ++To run a test, go to its source dir in tests/auto/testname. Type ++"make" to build it, then run it (either ./tst_testname, or "make install"). ++ ++6. Building Qt documentation + ============================ + + To build and install the documentation, run: +@@ -119,21 +122,25 @@ Attention: DO NOT run + If you do, Qt will overwrite your include/ directory with its + installation. + +-8. Creating Qt-copy patches +-=========================== ++8. Creating kde-qt.git modifications ++==================================== + + If you have fixed a bug in Qt or modified it in any way that may + benefit others, please share your change in the form of a patch. Do +-not commit your changes directly to the qt-copy module because they ++not commit your changes directly to the main branch because they + may be lost in a future update if they have not been added to the + official Qt release. + + The exception to the above rule is that if the fix has been accepted +-by Qt Software (and so will appear in the next release of Qt), then +-it can be applied directly to qt-copy. In this case, the patch +-should still be placed in patches/ as usual, but it should have a +-header line +- Applied: yes ++by Qt Software (and so will appear in the very next release of Qt), ++then it should be simply cherry-picked from the Qt development ++branch. Note that you shouldn't do this for changes that have been ++accepted into a release which is not the very next. ++In this case, you should use the following command: ++ ++ git cherry-pick -x SHA1_OF_THE_FIX ++where SHA1_OF_THE_FIX is the SHA-1 of the commit that you want to ++introduce. Then push the change to the server. + + Before creating a patch, it is recommended to contact Qt Software + support via qt-bugs@trolltech.com and explain the situation. There may +@@ -141,37 +148,42 @@ be a solution for the problem already or a new direction that should + be accounted for. + + To create a patch, do the following: +- a) make sure your Qt sources are clean of other changes. Run: +- svn revert -R . +- b) make your changes to the Qt source code and verify that it +- compiles, links and works. +- c) open the patches/README file and get the next patch number +- (you must read and understand the README file; if you don't, ask for +- help from other KDE developers) +- d) create the patch with: +- svn diff > patches/NNNN-short-description-of-your-patch.diff +- where NNNN is the next available number. +- e) open the file you've just created and add the header to it. The +- header should be the template in patches/README followed by a longer +- description of your patch. +- +-Don't forget to submit your patch to qt-bugs@trolltech.com along with +-the long description of the issue found, if you haven't already. +-Qt Software does not monitor the patches/ directory, so qt-copy +-patches do not get automatically applied to Qt official releases. +- +-When you receive the issue number and task tracker numbers, update the +-patch file. +- +-9. Known issues with current Qt code +-==================================== +- +-In case you have strange issues with non-resizing windows and similar, use +- export QT_USE_NATIVE_WINDOWS=1 +-before starting KDE. +- +-10. Troubleshooting: Re-configuring and re-compiling +-=================================================== ++ a) look at the listing of branches in ++ http://qt.gitorious.org/+kde-developers/qt/kde-qt/commits/HEAD and ++ select the next number. ++ ++ b) create a new branch out of a clean, released version of Qt, (for ++ example, 4.5.1), using the number above and a brief description of ++ your fix. For example: ++ git checkout -b patches/0180-window-role v4.5.1 ++ You can see the available released versions of Qt with: ++ git tag ++ ++ c) make your changes to the Qt source code and verify that it ++ compiles, links and works (please run the respective unit tests). ++ ++ c) commit your changes to Git, using the "git commit" command. Please ++ see http://qt.gitorious.org/qt/pages/GitIntroductionWithQt and ++ http://qt.gitorious.org/qt/pages/QtCodingStyle for information on ++ how to create commits ++ Note that you can create multiple commits. ++ ++ e) merge the change to the main branch, for example, 4.5.1-patched: ++ git checkout 4.5.1-patched ++ git merge patches/0180-window-role ++ ++ f) push the changes you made to your branch and to the main server: ++ git push git@gitorious.org:qt/kde-qt.git 4.5.1-patched patches/0180-window-role ++ (Don't forget to list both branch names) ++ ++Don't forget to submit your patch to using the Qt Contribution Model, ++along with the long description of the issue found. See ++http://qt.gitorious.org/qt/pages/QtContributionGuidelines for ++information how. You can submit the branch you've just sent to the ++server. ++ ++9. Troubleshooting: Re-configuring and re-compiling ++================================================== + + For those updating the source in a directory where Qt has already + been compiled, you may need to run the following commands from the +@@ -185,4 +197,5 @@ Sometimes ./configure will refuse to run. You may need to: + If you think you may have run "make install" on an install-less Qt + (srcdir == $QTDIR), run: + +- svn revert -R include ++ rm -rf include ++ bin/syncqt +-- +1.6.2.5 + diff --git a/0015-Make-QMenu-respect-the-minimum-width-set.patch b/0015-Make-QMenu-respect-the-minimum-width-set.patch new file mode 100644 index 0000000..609a9bd --- /dev/null +++ b/0015-Make-QMenu-respect-the-minimum-width-set.patch @@ -0,0 +1,31 @@ +From 01f26d0756839fbe783c637ca7dec5b7987f7e14 Mon Sep 17 00:00:00 2001 +From: Aaron Seigo +Date: Mon, 27 Jul 2009 21:46:22 -0600 +Subject: [PATCH 15/18] Make QMenu respect the minimum width set + +If one sets a minimum width on a QMenu and that size is larger than the +smallest size needed by the large menu item, it ignores the minimum +width and just uses the largest menu item size. + +This results in ugly painting artifacts. This currently affects +(at least) the tasks widget in Plasma in KDE4. +--- + src/gui/widgets/qmenu.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp +index 9fbbb04..5d62ea6 100644 +--- a/src/gui/widgets/qmenu.cpp ++++ b/src/gui/widgets/qmenu.cpp +@@ -280,7 +280,7 @@ void QMenuPrivate::calcActionRects(QMap &actionRects, QListminimumWidth(), qMax(max_column_width, sz.width())); + //wrapping + if (!scroll && + y+sz.height()+vmargin > dh - (q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, 0, q) * 2)) { +-- +1.6.2.5 + diff --git a/0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch b/0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch new file mode 100644 index 0000000..604cbd7 --- /dev/null +++ b/0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch @@ -0,0 +1,660 @@ +From 1a94cd7b132497f70a2b97ec2b58f6e2b1c5076a Mon Sep 17 00:00:00 2001 +From: Helio Chissini de Castro +Date: Fri, 10 Jul 2009 16:00:13 -0300 +Subject: [PATCH 16/18] Fill gap of X.org/XFree multimedia/special/launcher keys + Qt up to 4.5.x is missing whole setup of multimedia keys already defined by X + +--- + src/corelib/global/qnamespace.h | 97 ++++++++++++- + src/gui/kernel/qkeymapper_x11.cpp | 286 ++++++++++++++++++++++++++++++------- + src/gui/kernel/qkeysequence.cpp | 174 +++++++++++++++++------ + 3 files changed, 461 insertions(+), 96 deletions(-) + +diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h +index 3edbca7..ddf27a8 100644 +--- a/src/corelib/global/qnamespace.h ++++ b/src/corelib/global/qnamespace.h +@@ -895,12 +895,10 @@ public: + Key_Dead_Horn = 0x01001262, + + // multimedia/internet keys - ignored by default - see QKeyEvent c'tor +- + Key_Back = 0x01000061, + Key_Forward = 0x01000062, + Key_Stop = 0x01000063, + Key_Refresh = 0x01000064, +- + Key_VolumeDown = 0x01000070, + Key_VolumeMute = 0x01000071, + Key_VolumeUp = 0x01000072, +@@ -909,7 +907,6 @@ public: + Key_BassDown = 0x01000075, + Key_TrebleUp = 0x01000076, + Key_TrebleDown = 0x01000077, +- + Key_MediaPlay = 0x01000080, + Key_MediaStop = 0x01000081, + Key_MediaPrevious = 0x01000082, +@@ -918,13 +915,11 @@ public: + #endif + Key_MediaNext = 0x01000083, + Key_MediaRecord = 0x01000084, +- + Key_HomePage = 0x01000090, + Key_Favorites = 0x01000091, + Key_Search = 0x01000092, + Key_Standby = 0x01000093, + Key_OpenUrl = 0x01000094, +- + Key_LaunchMail = 0x010000a0, + Key_LaunchMedia = 0x010000a1, + Key_Launch0 = 0x010000a2, +@@ -943,6 +938,98 @@ public: + Key_LaunchD = 0x010000af, + Key_LaunchE = 0x010000b0, + Key_LaunchF = 0x010000b1, ++ Key_MonBrightnessUp = 0x010000b2, ++ Key_MonBrightnessDown = 0x010000b3, ++ Key_KeyboardLightOnOff = 0x010000b4, ++ Key_KeyboardBrightnessUp = 0x010000b5, ++ Key_KeyboardBrightnessDown = 0x010000b6, ++ Key_PowerOff = 0x010000b7, ++ Key_WakeUp = 0x010000b8, ++ Key_Eject = 0x010000b9, ++ Key_ScreenSaver = 0x010000ba, ++ Key_WWW = 0x010000bb, ++ Key_Memo = 0x010000bc, ++ Key_LightBulb = 0x010000bd, ++ Key_Shop = 0x010000be, ++ Key_History = 0x010000bf, ++ Key_AddFavorite = 0x010000c0, ++ Key_HotLinks = 0x010000c1, ++ Key_BrightnessAdjust = 0x010000c2, ++ Key_Finance = 0x010000c3, ++ Key_Community = 0x010000c4, ++ Key_AudioRewind = 0x010000c5, ++ Key_BackForward = 0x010000c6, ++ Key_ApplicationLeft = 0x010000c7, ++ Key_ApplicationRight = 0x010000c8, ++ Key_Book = 0x010000c9, ++ Key_CD = 0x010000ca, ++ Key_Calculator = 0x010000cb, ++ Key_ToDoList = 0x010000cc, ++ Key_ClearGrab = 0x010000cd, ++ Key_Close = 0x010000ce, ++ Key_Copy = 0x010000cf, ++ Key_Cut = 0x010000d0, ++ Key_Display = 0x010000d1, ++ Key_DOS = 0x010000d2, ++ Key_Documents = 0x010000d3, ++ Key_Excel = 0x010000d4, ++ Key_Explorer = 0x010000d5, ++ Key_Game = 0x010000d6, ++ Key_Go = 0x010000d7, ++ Key_iTouch = 0x010000d8, ++ Key_LogOff = 0x010000d9, ++ Key_Market = 0x010000da, ++ Key_Meeting = 0x010000db, ++ Key_MenuKB = 0x010000dc, ++ Key_MenuPB = 0x010000dd, ++ Key_MySites = 0x010000de, ++ Key_News = 0x010000df, ++ Key_OfficeHome = 0x010000e0, ++ Key_Option = 0x010000e1, ++ Key_Paste = 0x010000e2, ++ Key_Phone = 0x010000e3, ++ Key_Calendar = 0x010000e4, ++ Key_Reply = 0x010000e5, ++ Key_Reload = 0x010000e6, ++ Key_RotateWindows = 0x010000e7, ++ Key_RotationPB = 0x010000e8, ++ Key_RotationKB = 0x010000e9, ++ Key_Save = 0x010000ea, ++ Key_Send = 0x010000eb, ++ Key_Spell = 0x010000ec, ++ Key_SplitScreen = 0x010000ed, ++ Key_Support = 0x010000ee, ++ Key_TaskPane = 0x010000ef, ++ Key_Terminal = 0x010000f0, ++ Key_Tools = 0x010000f1, ++ Key_Travel = 0x010000f2, ++ Key_Video = 0x010000f3, ++ Key_Word = 0x010000f4, ++ Key_Xfer = 0x010000f5, ++ Key_ZoomIn = 0x010000f6, ++ Key_ZoomOut = 0x010000f7, ++ Key_Away = 0x010000f8, ++ Key_Messenger = 0x010000f9, ++ Key_WebCam = 0x010000fa, ++ Key_MailForward = 0x010000fb, ++ Key_Pictures = 0x010000fc, ++ Key_Music = 0x010000fd, ++ Key_Battery = 0x010000fe, ++ Key_Bluetooth = 0x010000ff, ++ Key_WLAN = 0x01000100, ++ Key_UWB = 0x01000101, ++ Key_AudioForward = 0x01000102, ++ Key_AudioRepeat = 0x01000103, ++ Key_AudioRandomPlay = 0x01000104, ++ Key_Subtitle = 0x01000105, ++ Key_AudioCycleTrack = 0x01000106, ++ Key_Time = 0x01000107, ++ Key_Hibernate = 0x01000108, ++ Key_View = 0x01000109, ++ Key_TopMenu = 0x0100010a, ++ Key_PowerDown = 0x0100010b, ++ Key_Suspend = 0x0100010c, ++ Key_ContrastAdjust = 0x0100010d, + + Key_MediaLast = 0x0100ffff, + +diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp +index 98ed61c..f55b491 100644 +--- a/src/gui/kernel/qkeymapper_x11.cpp ++++ b/src/gui/kernel/qkeymapper_x11.cpp +@@ -714,47 +714,144 @@ extern bool qt_sm_blockUserInput; + #define XK_KP_Delete 0xFF9F + #endif + +-// the next lines are taken from XFree > 4.0 (X11/XF86keysyms.h), defining some special ++// the next lines are taken on 10/2009 from X.org (X11/XF86keysym.h), defining some special + // multimedia keys. They are included here as not every system has them. +-#define XF86XK_Standby 0x1008FF10 +-#define XF86XK_AudioLowerVolume 0x1008FF11 +-#define XF86XK_AudioMute 0x1008FF12 +-#define XF86XK_AudioRaiseVolume 0x1008FF13 +-#define XF86XK_AudioPlay 0x1008FF14 +-#define XF86XK_AudioStop 0x1008FF15 +-#define XF86XK_AudioPrev 0x1008FF16 +-#define XF86XK_AudioNext 0x1008FF17 +-#define XF86XK_HomePage 0x1008FF18 +-#define XF86XK_Calculator 0x1008FF1D +-#define XF86XK_Mail 0x1008FF19 +-#define XF86XK_Start 0x1008FF1A +-#define XF86XK_Search 0x1008FF1B +-#define XF86XK_AudioRecord 0x1008FF1C +-#define XF86XK_Back 0x1008FF26 +-#define XF86XK_Forward 0x1008FF27 +-#define XF86XK_Stop 0x1008FF28 +-#define XF86XK_Refresh 0x1008FF29 +-#define XF86XK_Favorites 0x1008FF30 +-#define XF86XK_AudioPause 0x1008FF31 +-#define XF86XK_AudioMedia 0x1008FF32 +-#define XF86XK_MyComputer 0x1008FF33 +-#define XF86XK_OpenURL 0x1008FF38 +-#define XF86XK_Launch0 0x1008FF40 +-#define XF86XK_Launch1 0x1008FF41 +-#define XF86XK_Launch2 0x1008FF42 +-#define XF86XK_Launch3 0x1008FF43 +-#define XF86XK_Launch4 0x1008FF44 +-#define XF86XK_Launch5 0x1008FF45 +-#define XF86XK_Launch6 0x1008FF46 +-#define XF86XK_Launch7 0x1008FF47 +-#define XF86XK_Launch8 0x1008FF48 +-#define XF86XK_Launch9 0x1008FF49 +-#define XF86XK_LaunchA 0x1008FF4A +-#define XF86XK_LaunchB 0x1008FF4B +-#define XF86XK_LaunchC 0x1008FF4C +-#define XF86XK_LaunchD 0x1008FF4D +-#define XF86XK_LaunchE 0x1008FF4E +-#define XF86XK_LaunchF 0x1008FF4F ++#define XF86XK_MonBrightnessUp 0x1008FF02 ++#define XF86XK_MonBrightnessDown 0x1008FF03 ++#define XF86XK_KbdLightOnOff 0x1008FF04 ++#define XF86XK_KbdBrightnessUp 0x1008FF05 ++#define XF86XK_KbdBrightnessDown 0x1008FF06 ++#define XF86XK_Standby 0x1008FF10 ++#define XF86XK_AudioLowerVolume 0x1008FF11 ++#define XF86XK_AudioMute 0x1008FF12 ++#define XF86XK_AudioRaiseVolume 0x1008FF13 ++#define XF86XK_AudioPlay 0x1008FF14 ++#define XF86XK_AudioStop 0x1008FF15 ++#define XF86XK_AudioPrev 0x1008FF16 ++#define XF86XK_AudioNext 0x1008FF17 ++#define XF86XK_HomePage 0x1008FF18 ++#define XF86XK_Mail 0x1008FF19 ++#define XF86XK_Start 0x1008FF1A ++#define XF86XK_Search 0x1008FF1B ++#define XF86XK_AudioRecord 0x1008FF1C ++#define XF86XK_Calculator 0x1008FF1D ++#define XF86XK_Memo 0x1008FF1E ++#define XF86XK_ToDoList 0x1008FF1F ++#define XF86XK_Calendar 0x1008FF20 ++#define XF86XK_PowerDown 0x1008FF21 ++#define XF86XK_ContrastAdjust 0x1008FF22 ++#define XF86XK_Back 0x1008FF26 ++#define XF86XK_Forward 0x1008FF27 ++#define XF86XK_Stop 0x1008FF28 ++#define XF86XK_Refresh 0x1008FF29 ++#define XF86XK_PowerOff 0x1008FF2A ++#define XF86XK_WakeUp 0x1008FF2B ++#define XF86XK_Eject 0x1008FF2C ++#define XF86XK_ScreenSaver 0x1008FF2D ++#define XF86XK_WWW 0x1008FF2E ++#define XF86XK_Sleep 0x1008FF2F ++#define XF86XK_Favorites 0x1008FF30 ++#define XF86XK_AudioPause 0x1008FF31 ++#define XF86XK_AudioMedia 0x1008FF32 ++#define XF86XK_MyComputer 0x1008FF33 ++#define XF86XK_LightBulb 0x1008FF35 ++#define XF86XK_Shop 0x1008FF36 ++#define XF86XK_History 0x1008FF37 ++#define XF86XK_OpenURL 0x1008FF38 ++#define XF86XK_AddFavorite 0x1008FF39 ++#define XF86XK_HotLinks 0x1008FF3A ++#define XF86XK_BrightnessAdjust 0x1008FF3B ++#define XF86XK_Finance 0x1008FF3C ++#define XF86XK_Community 0x1008FF3D ++#define XF86XK_AudioRewind 0x1008FF3E ++#define XF86XK_BackForward 0x1008FF3F ++#define XF86XK_Launch0 0x1008FF40 ++#define XF86XK_Launch1 0x1008FF41 ++#define XF86XK_Launch2 0x1008FF42 ++#define XF86XK_Launch3 0x1008FF43 ++#define XF86XK_Launch4 0x1008FF44 ++#define XF86XK_Launch5 0x1008FF45 ++#define XF86XK_Launch6 0x1008FF46 ++#define XF86XK_Launch7 0x1008FF47 ++#define XF86XK_Launch8 0x1008FF48 ++#define XF86XK_Launch9 0x1008FF49 ++#define XF86XK_LaunchA 0x1008FF4A ++#define XF86XK_LaunchB 0x1008FF4B ++#define XF86XK_LaunchC 0x1008FF4C ++#define XF86XK_LaunchD 0x1008FF4D ++#define XF86XK_LaunchE 0x1008FF4E ++#define XF86XK_LaunchF 0x1008FF4F ++#define XF86XK_ApplicationLeft 0x1008FF50 ++#define XF86XK_ApplicationRight 0x1008FF51 ++#define XF86XK_Book 0x1008FF52 ++#define XF86XK_CD 0x1008FF53 ++#define XF86XK_Calculater 0x1008FF54 ++#define XF86XK_Clear 0x1008FF55 ++#define XF86XK_ClearGrab 0x1008FE21 ++#define XF86XK_Close 0x1008FF56 ++#define XF86XK_Copy 0x1008FF57 ++#define XF86XK_Cut 0x1008FF58 ++#define XF86XK_Display 0x1008FF59 ++#define XF86XK_DOS 0x1008FF5A ++#define XF86XK_Documents 0x1008FF5B ++#define XF86XK_Excel 0x1008FF5C ++#define XF86XK_Explorer 0x1008FF5D ++#define XF86XK_Game 0x1008FF5E ++#define XF86XK_Go 0x1008FF5F ++#define XF86XK_iTouch 0x1008FF60 ++#define XF86XK_LogOff 0x1008FF61 ++#define XF86XK_Market 0x1008FF62 ++#define XF86XK_Meeting 0x1008FF63 ++#define XF86XK_MenuKB 0x1008FF65 ++#define XF86XK_MenuPB 0x1008FF66 ++#define XF86XK_MySites 0x1008FF67 ++#define XF86XK_News 0x1008FF69 ++#define XF86XK_OfficeHome 0x1008FF6A ++#define XF86XK_Option 0x1008FF6C ++#define XF86XK_Paste 0x1008FF6D ++#define XF86XK_Phone 0x1008FF6E ++#define XF86XK_Reply 0x1008FF72 ++#define XF86XK_Reload 0x1008FF73 ++#define XF86XK_RotateWindows 0x1008FF74 ++#define XF86XK_RotationPB 0x1008FF75 ++#define XF86XK_RotationKB 0x1008FF76 ++#define XF86XK_Save 0x1008FF77 ++#define XF86XK_Send 0x1008FF7B ++#define XF86XK_Spell 0x1008FF7C ++#define XF86XK_SplitScreen 0x1008FF7D ++#define XF86XK_Support 0x1008FF7E ++#define XF86XK_TaskPane 0x1008FF7F ++#define XF86XK_Terminal 0x1008FF80 ++#define XF86XK_Tools 0x1008FF81 ++#define XF86XK_Travel 0x1008FF82 ++#define XF86XK_Video 0x1008FF87 ++#define XF86XK_Word 0x1008FF89 ++#define XF86XK_Xfer 0x1008FF8A ++#define XF86XK_ZoomIn 0x1008FF8B ++#define XF86XK_ZoomOut 0x1008FF8C ++#define XF86XK_Away 0x1008FF8D ++#define XF86XK_Messenger 0x1008FF8E ++#define XF86XK_WebCam 0x1008FF8F ++#define XF86XK_MailForward 0x1008FF90 ++#define XF86XK_Pictures 0x1008FF91 ++#define XF86XK_Music 0x1008FF92 ++#define XF86XK_Battery 0x1008FF93 ++#define XF86XK_Bluetooth 0x1008FF94 ++#define XF86XK_WLAN 0x1008FF95 ++#define XF86XK_UWB 0x1008FF96 ++#define XF86XK_AudioForward 0x1008FF97 ++#define XF86XK_AudioRepeat 0x1008FF98 ++#define XF86XK_AudioRandomPlay 0x1008FF99 ++#define XF86XK_Subtitle 0x1008FF9A ++#define XF86XK_AudioCycleTrack 0x1008FF9B ++#define XF86XK_Time 0x1008FF9F ++#define XF86XK_Select 0x1008FFA0 ++#define XF86XK_View 0x1008FFA1 ++#define XF86XK_TopMenu 0x1008FFA2 ++#define XF86XK_Suspend 0x1008FFA7 ++#define XF86XK_Hibernate 0x1008FFA8 ++ ++ + // end of XF86keysyms.h + + // Special keys used by Qtopia, mapped into the X11 private keypad range. +@@ -942,10 +1039,8 @@ static const unsigned int KeyTbl[] = { + XK_dead_hook, Qt::Key_Dead_Hook, + XK_dead_horn, Qt::Key_Dead_Horn, + +- // Special multimedia keys +- // currently only tested with MS internet keyboard +- +- // browsing keys ++ // Special keys from X.org - This include multimedia keys, ++ // wireless/bluetooth/uwb keys, special launcher keys, etc. + XF86XK_Back, Qt::Key_Back, + XF86XK_Forward, Qt::Key_Forward, + XF86XK_Stop, Qt::Key_Stop, +@@ -955,8 +1050,6 @@ static const unsigned int KeyTbl[] = { + XF86XK_OpenURL, Qt::Key_OpenUrl, + XF86XK_HomePage, Qt::Key_HomePage, + XF86XK_Search, Qt::Key_Search, +- +- // media keys + XF86XK_AudioLowerVolume, Qt::Key_VolumeDown, + XF86XK_AudioMute, Qt::Key_VolumeMute, + XF86XK_AudioRaiseVolume, Qt::Key_VolumeUp, +@@ -965,13 +1058,106 @@ static const unsigned int KeyTbl[] = { + XF86XK_AudioPrev, Qt::Key_MediaPrevious, + XF86XK_AudioNext, Qt::Key_MediaNext, + XF86XK_AudioRecord, Qt::Key_MediaRecord, +- +- // launch keys + XF86XK_Mail, Qt::Key_LaunchMail, + XF86XK_MyComputer, Qt::Key_Launch0, +- XF86XK_Calculator, Qt::Key_Launch1, ++ XF86XK_Calculator, Qt::Key_Calculator, ++ XF86XK_Memo, Qt::Key_Memo, ++ XF86XK_ToDoList, Qt::Key_ToDoList, ++ XF86XK_Calendar, Qt::Key_Calendar, ++ XF86XK_PowerDown, Qt::Key_PowerDown, ++ XF86XK_ContrastAdjust, Qt::Key_ContrastAdjust, + XF86XK_Standby, Qt::Key_Standby, +- ++ XF86XK_MonBrightnessUp, Qt::Key_MonBrightnessUp, ++ XF86XK_MonBrightnessDown, Qt::Key_MonBrightnessDown, ++ XF86XK_KbdLightOnOff, Qt::Key_KeyboardLightOnOff, ++ XF86XK_KbdBrightnessUp, Qt::Key_KeyboardBrightnessUp, ++ XF86XK_KbdBrightnessDown, Qt::Key_KeyboardBrightnessDown, ++ XF86XK_PowerOff, Qt::Key_PowerOff, ++ XF86XK_WakeUp, Qt::Key_WakeUp, ++ XF86XK_Eject, Qt::Key_Eject, ++ XF86XK_ScreenSaver, Qt::Key_ScreenSaver, ++ XF86XK_WWW, Qt::Key_WWW, ++ XF86XK_Sleep, Qt::Key_Sleep, ++ XF86XK_LightBulb, Qt::Key_LightBulb, ++ XF86XK_Shop, Qt::Key_Shop, ++ XF86XK_History, Qt::Key_History, ++ XF86XK_AddFavorite, Qt::Key_AddFavorite, ++ XF86XK_HotLinks, Qt::Key_HotLinks, ++ XF86XK_BrightnessAdjust, Qt::Key_BrightnessAdjust, ++ XF86XK_Finance, Qt::Key_Finance, ++ XF86XK_Community, Qt::Key_Community, ++ XF86XK_AudioRewind, Qt::Key_AudioRewind, ++ XF86XK_BackForward, Qt::Key_BackForward, ++ XF86XK_ApplicationLeft, Qt::Key_ApplicationLeft, ++ XF86XK_ApplicationRight, Qt::Key_ApplicationRight, ++ XF86XK_Book, Qt::Key_Book, ++ XF86XK_CD, Qt::Key_CD, ++ XF86XK_Calculater, Qt::Key_Calculator, ++ XF86XK_Clear, Qt::Key_Clear, ++ XF86XK_ClearGrab, Qt::Key_ClearGrab, ++ XF86XK_Close, Qt::Key_Close, ++ XF86XK_Copy, Qt::Key_Copy, ++ XF86XK_Cut, Qt::Key_Cut, ++ XF86XK_Display, Qt::Key_Display, ++ XF86XK_DOS, Qt::Key_DOS, ++ XF86XK_Documents, Qt::Key_Documents, ++ XF86XK_Excel, Qt::Key_Excel, ++ XF86XK_Explorer, Qt::Key_Explorer, ++ XF86XK_Game, Qt::Key_Game, ++ XF86XK_Go, Qt::Key_Go, ++ XF86XK_iTouch, Qt::Key_iTouch, ++ XF86XK_LogOff, Qt::Key_LogOff, ++ XF86XK_Market, Qt::Key_Market, ++ XF86XK_Meeting, Qt::Key_Meeting, ++ XF86XK_MenuKB, Qt::Key_MenuKB, ++ XF86XK_MenuPB, Qt::Key_MenuPB, ++ XF86XK_MySites, Qt::Key_MySites, ++ XF86XK_News, Qt::Key_News, ++ XF86XK_OfficeHome, Qt::Key_OfficeHome, ++ XF86XK_Option, Qt::Key_Option, ++ XF86XK_Paste, Qt::Key_Paste, ++ XF86XK_Phone, Qt::Key_Phone, ++ XF86XK_Reply, Qt::Key_Reply, ++ XF86XK_Reload, Qt::Key_Reload, ++ XF86XK_RotateWindows, Qt::Key_RotateWindows, ++ XF86XK_RotationPB, Qt::Key_RotationPB, ++ XF86XK_RotationKB, Qt::Key_RotationKB, ++ XF86XK_Save, Qt::Key_Save, ++ XF86XK_Send, Qt::Key_Send, ++ XF86XK_Spell, Qt::Key_Spell, ++ XF86XK_SplitScreen, Qt::Key_SplitScreen, ++ XF86XK_Support, Qt::Key_Support, ++ XF86XK_TaskPane, Qt::Key_TaskPane, ++ XF86XK_Terminal, Qt::Key_Terminal, ++ XF86XK_Tools, Qt::Key_Tools, ++ XF86XK_Travel, Qt::Key_Travel, ++ XF86XK_Video, Qt::Key_Video, ++ XF86XK_Word, Qt::Key_Word, ++ XF86XK_Xfer, Qt::Key_Xfer, ++ XF86XK_ZoomIn, Qt::Key_ZoomIn, ++ XF86XK_ZoomOut, Qt::Key_ZoomOut, ++ XF86XK_Away, Qt::Key_Away, ++ XF86XK_Messenger, Qt::Key_Messenger, ++ XF86XK_WebCam, Qt::Key_WebCam, ++ XF86XK_MailForward, Qt::Key_MailForward, ++ XF86XK_Pictures, Qt::Key_Pictures, ++ XF86XK_Music, Qt::Key_Music, ++ XF86XK_Battery, Qt::Key_Battery, ++ XF86XK_Bluetooth, Qt::Key_Bluetooth, ++ XF86XK_WLAN, Qt::Key_WLAN, ++ XF86XK_UWB, Qt::Key_UWB, ++ XF86XK_AudioForward, Qt::Key_AudioForward, ++ XF86XK_AudioRepeat, Qt::Key_AudioRepeat, ++ XF86XK_AudioRandomPlay, Qt::Key_AudioRandomPlay, ++ XF86XK_Subtitle, Qt::Key_Subtitle, ++ XF86XK_AudioCycleTrack, Qt::Key_AudioCycleTrack, ++ XF86XK_Time, Qt::Key_Time, ++ XF86XK_Select, Qt::Key_Select, ++ XF86XK_View, Qt::Key_View, ++ XF86XK_TopMenu, Qt::Key_TopMenu, ++ XF86XK_Bluetooth, Qt::Key_Bluetooth, ++ XF86XK_Suspend, Qt::Key_Suspend, ++ XF86XK_Hibernate, Qt::Key_Hibernate, + XF86XK_Launch0, Qt::Key_Launch2, + XF86XK_Launch1, Qt::Key_Launch3, + XF86XK_Launch2, Qt::Key_Launch4, +diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp +index 894f663..665c058 100644 +--- a/src/gui/kernel/qkeysequence.cpp ++++ b/src/gui/kernel/qkeysequence.cpp +@@ -396,47 +396,139 @@ static const struct { + { Qt::Key_Menu, QT_TRANSLATE_NOOP("QShortcut", "Menu") }, + { Qt::Key_Help, QT_TRANSLATE_NOOP("QShortcut", "Help") }, + +- // Multimedia keys +- { Qt::Key_Back, QT_TRANSLATE_NOOP("QShortcut", "Back") }, +- { Qt::Key_Forward, QT_TRANSLATE_NOOP("QShortcut", "Forward") }, +- { Qt::Key_Stop, QT_TRANSLATE_NOOP("QShortcut", "Stop") }, +- { Qt::Key_Refresh, QT_TRANSLATE_NOOP("QShortcut", "Refresh") }, +- { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP("QShortcut", "Volume Down") }, +- { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP("QShortcut", "Volume Mute") }, +- { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP("QShortcut", "Volume Up") }, +- { Qt::Key_BassBoost, QT_TRANSLATE_NOOP("QShortcut", "Bass Boost") }, +- { Qt::Key_BassUp, QT_TRANSLATE_NOOP("QShortcut", "Bass Up") }, +- { Qt::Key_BassDown, QT_TRANSLATE_NOOP("QShortcut", "Bass Down") }, +- { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP("QShortcut", "Treble Up") }, +- { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP("QShortcut", "Treble Down") }, +- { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP("QShortcut", "Media Play") }, +- { Qt::Key_MediaStop, QT_TRANSLATE_NOOP("QShortcut", "Media Stop") }, +- { Qt::Key_MediaPrevious,QT_TRANSLATE_NOOP("QShortcut", "Media Previous") }, +- { Qt::Key_MediaNext, QT_TRANSLATE_NOOP("QShortcut", "Media Next") }, +- { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP("QShortcut", "Media Record") }, +- { Qt::Key_HomePage, QT_TRANSLATE_NOOP("QShortcut", "Home Page") }, +- { Qt::Key_Favorites, QT_TRANSLATE_NOOP("QShortcut", "Favorites") }, +- { Qt::Key_Search, QT_TRANSLATE_NOOP("QShortcut", "Search") }, +- { Qt::Key_Standby, QT_TRANSLATE_NOOP("QShortcut", "Standby") }, +- { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP("QShortcut", "Open URL") }, +- { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP("QShortcut", "Launch Mail") }, +- { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP("QShortcut", "Launch Media") }, +- { Qt::Key_Launch0, QT_TRANSLATE_NOOP("QShortcut", "Launch (0)") }, +- { Qt::Key_Launch1, QT_TRANSLATE_NOOP("QShortcut", "Launch (1)") }, +- { Qt::Key_Launch2, QT_TRANSLATE_NOOP("QShortcut", "Launch (2)") }, +- { Qt::Key_Launch3, QT_TRANSLATE_NOOP("QShortcut", "Launch (3)") }, +- { Qt::Key_Launch4, QT_TRANSLATE_NOOP("QShortcut", "Launch (4)") }, +- { Qt::Key_Launch5, QT_TRANSLATE_NOOP("QShortcut", "Launch (5)") }, +- { Qt::Key_Launch6, QT_TRANSLATE_NOOP("QShortcut", "Launch (6)") }, +- { Qt::Key_Launch7, QT_TRANSLATE_NOOP("QShortcut", "Launch (7)") }, +- { Qt::Key_Launch8, QT_TRANSLATE_NOOP("QShortcut", "Launch (8)") }, +- { Qt::Key_Launch9, QT_TRANSLATE_NOOP("QShortcut", "Launch (9)") }, +- { Qt::Key_LaunchA, QT_TRANSLATE_NOOP("QShortcut", "Launch (A)") }, +- { Qt::Key_LaunchB, QT_TRANSLATE_NOOP("QShortcut", "Launch (B)") }, +- { Qt::Key_LaunchC, QT_TRANSLATE_NOOP("QShortcut", "Launch (C)") }, +- { Qt::Key_LaunchD, QT_TRANSLATE_NOOP("QShortcut", "Launch (D)") }, +- { Qt::Key_LaunchE, QT_TRANSLATE_NOOP("QShortcut", "Launch (E)") }, +- { Qt::Key_LaunchF, QT_TRANSLATE_NOOP("QShortcut", "Launch (F)") }, ++ // Special keys ++ // Includes multimedia, launcher, lan keys ( bluetooth, wireless ) ++ // window navigation ++ { Qt::Key_Back, QT_TRANSLATE_NOOP("QShortcut", "Back") }, ++ { Qt::Key_Forward, QT_TRANSLATE_NOOP("QShortcut", "Forward") }, ++ { Qt::Key_Stop, QT_TRANSLATE_NOOP("QShortcut", "Stop") }, ++ { Qt::Key_Refresh, QT_TRANSLATE_NOOP("QShortcut", "Refresh") }, ++ { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP("QShortcut", "Volume Down") }, ++ { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP("QShortcut", "Volume Mute") }, ++ { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP("QShortcut", "Volume Up") }, ++ { Qt::Key_BassBoost, QT_TRANSLATE_NOOP("QShortcut", "Bass Boost") }, ++ { Qt::Key_BassUp, QT_TRANSLATE_NOOP("QShortcut", "Bass Up") }, ++ { Qt::Key_BassDown, QT_TRANSLATE_NOOP("QShortcut", "Bass Down") }, ++ { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP("QShortcut", "Treble Up") }, ++ { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP("QShortcut", "Treble Down") }, ++ { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP("QShortcut", "Media Play") }, ++ { Qt::Key_MediaStop, QT_TRANSLATE_NOOP("QShortcut", "Media Stop") }, ++ { Qt::Key_MediaPrevious, QT_TRANSLATE_NOOP("QShortcut", "Media Previous") }, ++ { Qt::Key_MediaNext, QT_TRANSLATE_NOOP("QShortcut", "Media Next") }, ++ { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP("QShortcut", "Media Record") }, ++ { Qt::Key_HomePage, QT_TRANSLATE_NOOP("QShortcut", "Home Page") }, ++ { Qt::Key_Favorites, QT_TRANSLATE_NOOP("QShortcut", "Favorites") }, ++ { Qt::Key_Search, QT_TRANSLATE_NOOP("QShortcut", "Search") }, ++ { Qt::Key_Standby, QT_TRANSLATE_NOOP("QShortcut", "Standby") }, ++ { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP("QShortcut", "Open URL") }, ++ { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP("QShortcut", "Launch Mail") }, ++ { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP("QShortcut", "Launch Media") }, ++ { Qt::Key_Launch0, QT_TRANSLATE_NOOP("QShortcut", "Launch (0)") }, ++ { Qt::Key_Launch1, QT_TRANSLATE_NOOP("QShortcut", "Launch (1)") }, ++ { Qt::Key_Launch2, QT_TRANSLATE_NOOP("QShortcut", "Launch (2)") }, ++ { Qt::Key_Launch3, QT_TRANSLATE_NOOP("QShortcut", "Launch (3)") }, ++ { Qt::Key_Launch4, QT_TRANSLATE_NOOP("QShortcut", "Launch (4)") }, ++ { Qt::Key_Launch5, QT_TRANSLATE_NOOP("QShortcut", "Launch (5)") }, ++ { Qt::Key_Launch6, QT_TRANSLATE_NOOP("QShortcut", "Launch (6)") }, ++ { Qt::Key_Launch7, QT_TRANSLATE_NOOP("QShortcut", "Launch (7)") }, ++ { Qt::Key_Launch8, QT_TRANSLATE_NOOP("QShortcut", "Launch (8)") }, ++ { Qt::Key_Launch9, QT_TRANSLATE_NOOP("QShortcut", "Launch (9)") }, ++ { Qt::Key_LaunchA, QT_TRANSLATE_NOOP("QShortcut", "Launch (A)") }, ++ { Qt::Key_LaunchB, QT_TRANSLATE_NOOP("QShortcut", "Launch (B)") }, ++ { Qt::Key_LaunchC, QT_TRANSLATE_NOOP("QShortcut", "Launch (C)") }, ++ { Qt::Key_LaunchD, QT_TRANSLATE_NOOP("QShortcut", "Launch (D)") }, ++ { Qt::Key_LaunchE, QT_TRANSLATE_NOOP("QShortcut", "Launch (E)") }, ++ { Qt::Key_LaunchF, QT_TRANSLATE_NOOP("QShortcut", "Launch (F)") }, ++ { Qt::Key_MonBrightnessUp, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Up") }, ++ { Qt::Key_MonBrightnessDown, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Down") }, ++ { Qt::Key_KeyboardLightOnOff, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Light On/Off") }, ++ { Qt::Key_KeyboardBrightnessUp, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Brightness Up") }, ++ { Qt::Key_KeyboardBrightnessDown, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Brightness Down") }, ++ { Qt::Key_PowerOff, QT_TRANSLATE_NOOP("QShortcut", "Power Off") }, ++ { Qt::Key_WakeUp, QT_TRANSLATE_NOOP("QShortcut", "Wake Up") }, ++ { Qt::Key_Eject, QT_TRANSLATE_NOOP("QShortcut", "Eject") }, ++ { Qt::Key_ScreenSaver, QT_TRANSLATE_NOOP("QShortcut", "Screensaver") }, ++ { Qt::Key_WWW, QT_TRANSLATE_NOOP("QShortcut", "WWW") }, ++ { Qt::Key_Sleep, QT_TRANSLATE_NOOP("QShortcut", "Sleep") }, ++ { Qt::Key_LightBulb, QT_TRANSLATE_NOOP("QShortcut", "LightBulb") }, ++ { Qt::Key_Shop, QT_TRANSLATE_NOOP("QShortcut", "Shop") }, ++ { Qt::Key_History, QT_TRANSLATE_NOOP("QShortcut", "History") }, ++ { Qt::Key_AddFavorite, QT_TRANSLATE_NOOP("QShortcut", "Add Favorite") }, ++ { Qt::Key_HotLinks, QT_TRANSLATE_NOOP("QShortcut", "Hot Links") }, ++ { Qt::Key_BrightnessAdjust, QT_TRANSLATE_NOOP("QShortcut", "Adjust Brightness") }, ++ { Qt::Key_Finance, QT_TRANSLATE_NOOP("QShortcut", "Finance") }, ++ { Qt::Key_Community, QT_TRANSLATE_NOOP("QShortcut", "Community") }, ++ { Qt::Key_AudioRewind, QT_TRANSLATE_NOOP("QShortcut", "Audio Rewind") }, ++ { Qt::Key_BackForward, QT_TRANSLATE_NOOP("QShortcut", "Back Forward") }, ++ { Qt::Key_ApplicationLeft, QT_TRANSLATE_NOOP("QShortcut", "Application Left") }, ++ { Qt::Key_ApplicationRight, QT_TRANSLATE_NOOP("QShortcut", "Application Right") }, ++ { Qt::Key_Book, QT_TRANSLATE_NOOP("QShortcut", "Book") }, ++ { Qt::Key_CD, QT_TRANSLATE_NOOP("QShortcut", "CD") }, ++ { Qt::Key_Calculator, QT_TRANSLATE_NOOP("QShortcut", "Calculator") }, ++ { Qt::Key_Clear, QT_TRANSLATE_NOOP("QShortcut", "Clear") }, ++ { Qt::Key_ClearGrab, QT_TRANSLATE_NOOP("QShortcut", "Clear Grab") }, ++ { Qt::Key_Close, QT_TRANSLATE_NOOP("QShortcut", "Close") }, ++ { Qt::Key_Copy, QT_TRANSLATE_NOOP("QShortcut", "Copy") }, ++ { Qt::Key_Cut, QT_TRANSLATE_NOOP("QShortcut", "Cut") }, ++ { Qt::Key_Display, QT_TRANSLATE_NOOP("QShortcut", "Display") }, ++ { Qt::Key_DOS, QT_TRANSLATE_NOOP("QShortcut", "DOS") }, ++ { Qt::Key_Documents, QT_TRANSLATE_NOOP("QShortcut", "Documents") }, ++ { Qt::Key_Excel, QT_TRANSLATE_NOOP("QShortcut", "Spreadsheet") }, ++ { Qt::Key_Explorer, QT_TRANSLATE_NOOP("QShortcut", "Browser") }, ++ { Qt::Key_Game, QT_TRANSLATE_NOOP("QShortcut", "Game") }, ++ { Qt::Key_Go, QT_TRANSLATE_NOOP("QShortcut", "Go") }, ++ { Qt::Key_iTouch, QT_TRANSLATE_NOOP("QShortcut", "iTouch") }, ++ { Qt::Key_LogOff, QT_TRANSLATE_NOOP("QShortcut", "Logoff") }, ++ { Qt::Key_Market, QT_TRANSLATE_NOOP("QShortcut", "Market") }, ++ { Qt::Key_Meeting, QT_TRANSLATE_NOOP("QShortcut", "Meeting") }, ++ { Qt::Key_MenuKB, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Menu") }, ++ { Qt::Key_MenuPB, QT_TRANSLATE_NOOP("QShortcut", "Menu PB") }, ++ { Qt::Key_MySites, QT_TRANSLATE_NOOP("QShortcut", "My Sites") }, ++ { Qt::Key_News, QT_TRANSLATE_NOOP("QShortcut", "News") }, ++ { Qt::Key_OfficeHome, QT_TRANSLATE_NOOP("QShortcut", "Home Office") }, ++ { Qt::Key_Option, QT_TRANSLATE_NOOP("QShortcut", "Option") }, ++ { Qt::Key_Paste, QT_TRANSLATE_NOOP("QShortcut", "Paste") }, ++ { Qt::Key_Phone, QT_TRANSLATE_NOOP("QShortcut", "Phone") }, ++ { Qt::Key_Reply, QT_TRANSLATE_NOOP("QShortcut", "Reply") }, ++ { Qt::Key_Reload, QT_TRANSLATE_NOOP("QShortcut", "Reload") }, ++ { Qt::Key_RotateWindows, QT_TRANSLATE_NOOP("QShortcut", "Rotate Windows") }, ++ { Qt::Key_RotationPB, QT_TRANSLATE_NOOP("QShortcut", "Rotation PB") }, ++ { Qt::Key_RotationKB, QT_TRANSLATE_NOOP("QShortcut", "Rotation KB") }, ++ { Qt::Key_Save, QT_TRANSLATE_NOOP("QShortcut", "Save") }, ++ { Qt::Key_Send, QT_TRANSLATE_NOOP("QShortcut", "Send") }, ++ { Qt::Key_Spell, QT_TRANSLATE_NOOP("QShortcut", "Spellchecker") }, ++ { Qt::Key_SplitScreen, QT_TRANSLATE_NOOP("QShortcut", "Split Screen") }, ++ { Qt::Key_Support, QT_TRANSLATE_NOOP("QShortcut", "Support") }, ++ { Qt::Key_TaskPane, QT_TRANSLATE_NOOP("QShortcut", "Task Panel") }, ++ { Qt::Key_Terminal, QT_TRANSLATE_NOOP("QShortcut", "Terminal") }, ++ { Qt::Key_Tools, QT_TRANSLATE_NOOP("QShortcut", "Tools") }, ++ { Qt::Key_Travel, QT_TRANSLATE_NOOP("QShortcut", "Travel") }, ++ { Qt::Key_Video, QT_TRANSLATE_NOOP("QShortcut", "Video") }, ++ { Qt::Key_Word, QT_TRANSLATE_NOOP("QShortcut", "Word Processor") }, ++ { Qt::Key_Xfer, QT_TRANSLATE_NOOP("QShortcut", "XFer") }, ++ { Qt::Key_ZoomIn, QT_TRANSLATE_NOOP("QShortcut", "Zoom In") }, ++ { Qt::Key_ZoomOut, QT_TRANSLATE_NOOP("QShortcut", "Zoom Out") }, ++ { Qt::Key_Away, QT_TRANSLATE_NOOP("QShortcut", "Away") }, ++ { Qt::Key_Messenger, QT_TRANSLATE_NOOP("QShortcut", "Messenger") }, ++ { Qt::Key_WebCam, QT_TRANSLATE_NOOP("QShortcut", "WebCam") }, ++ { Qt::Key_MailForward, QT_TRANSLATE_NOOP("QShortcut", "Mail Forward") }, ++ { Qt::Key_Pictures, QT_TRANSLATE_NOOP("QShortcut", "Pictures") }, ++ { Qt::Key_Music, QT_TRANSLATE_NOOP("QShortcut", "Music") }, ++ { Qt::Key_Battery, QT_TRANSLATE_NOOP("QShortcut", "Battery") }, ++ { Qt::Key_Bluetooth, QT_TRANSLATE_NOOP("QShortcut", "Bluetooth") }, ++ { Qt::Key_WLAN, QT_TRANSLATE_NOOP("QShortcut", "Wireless") }, ++ { Qt::Key_UWB, QT_TRANSLATE_NOOP("QShortcut", "Ultra Wide Band") }, ++ { Qt::Key_AudioForward, QT_TRANSLATE_NOOP("QShortcut", "Audio Forward") }, ++ { Qt::Key_AudioRepeat, QT_TRANSLATE_NOOP("QShortcut", "Audio Repeat") }, ++ { Qt::Key_AudioRandomPlay, QT_TRANSLATE_NOOP("QShortcut", "Audio Random Play") }, ++ { Qt::Key_Subtitle, QT_TRANSLATE_NOOP("QShortcut", "Subtitle") }, ++ { Qt::Key_AudioCycleTrack, QT_TRANSLATE_NOOP("QShortcut", "Audio Cycle Track") }, ++ { Qt::Key_Time, QT_TRANSLATE_NOOP("QShortcut", "Time") }, ++ { Qt::Key_Select, QT_TRANSLATE_NOOP("QShortcut", "Select") }, ++ { Qt::Key_View, QT_TRANSLATE_NOOP("QShortcut", "View") }, ++ { Qt::Key_TopMenu, QT_TRANSLATE_NOOP("QShortcut", "Top Menu") }, ++ { Qt::Key_Suspend, QT_TRANSLATE_NOOP("QShortcut", "Suspend") }, ++ { Qt::Key_Hibernate, QT_TRANSLATE_NOOP("QShortcut", "Hibernate") }, + + // -------------------------------------------------------------- + // More consistent namings +-- +1.6.2.5 + diff --git a/0017-Add-context-to-tr-calls-in-QShortcut.patch b/0017-Add-context-to-tr-calls-in-QShortcut.patch new file mode 100644 index 0000000..82f68e4 --- /dev/null +++ b/0017-Add-context-to-tr-calls-in-QShortcut.patch @@ -0,0 +1,70 @@ +From 9eb3560cfd5cd0bc9c7bf79f2c27657ee07b8f95 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Sat, 8 Aug 2009 14:40:25 +0200 +Subject: [PATCH 17/18] Add context to tr calls in QShortcut + +Some languages have special rules for using "+" to concatenate strings and +for example it needs to be Ctrl + Shift instead of Ctrl+Shift, adding +context to these strings helps creating a more correct translation +--- + src/gui/kernel/qkeysequence.cpp | 20 ++++++++++---------- + 1 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp +index 894f663..c17f253 100644 +--- a/src/gui/kernel/qkeysequence.cpp ++++ b/src/gui/kernel/qkeysequence.cpp +@@ -991,10 +991,10 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence + + QList modifs; + if (nativeText) { +- modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl").toLower().append(QLatin1Char('+'))) +- << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift").toLower().append(QLatin1Char('+'))) +- << QModifKeyName(Qt::ALT, QShortcut::tr("Alt").toLower().append(QLatin1Char('+'))) +- << QModifKeyName(Qt::META, QShortcut::tr("Meta").toLower().append(QLatin1Char('+'))); ++ modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts").toLower().append(QLatin1Char('+'))) ++ << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift", "Shift key, used for shortcuts").toLower().append(QLatin1Char('+'))) ++ << QModifKeyName(Qt::ALT, QShortcut::tr("Alt", "Alt key, used for shortcuts").toLower().append(QLatin1Char('+'))) ++ << QModifKeyName(Qt::META, QShortcut::tr("Meta", "Meta key, used for shortcuts").toLower().append(QLatin1Char('+'))); + } + modifs += *gmodifs; // Test non-translated ones last + +@@ -1086,7 +1086,7 @@ QString QKeySequence::encodeString(int key) + static inline void addKey(QString &str, const QString &theKey, QKeySequence::SequenceFormat format) + { + if (!str.isEmpty()) +- str += (format == QKeySequence::NativeText) ? QShortcut::tr("+") ++ str += (format == QKeySequence::NativeText) ? QShortcut::tr("+", "Symbol used to concatenate keys in shortcuts") + : QString::fromLatin1("+"); + str += theKey; + } +@@ -1111,13 +1111,13 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat + { + // On other systems the order is Meta, Control, Alt, Shift + if ((key & Qt::META) == Qt::META) +- s = nativeText ? QShortcut::tr("Meta") : QString::fromLatin1("Meta"); ++ s = nativeText ? QShortcut::tr("Meta", "Meta key, used for shortcuts") : QString::fromLatin1("Meta"); + if ((key & Qt::CTRL) == Qt::CTRL) +- addKey(s, nativeText ? QShortcut::tr("Ctrl") : QString::fromLatin1("Ctrl"), format); ++ addKey(s, nativeText ? QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts") : QString::fromLatin1("Ctrl"), format); + if ((key & Qt::ALT) == Qt::ALT) +- addKey(s, nativeText ? QShortcut::tr("Alt") : QString::fromLatin1("Alt"), format); ++ addKey(s, nativeText ? QShortcut::tr("Alt", "Alt key, used for shortcuts") : QString::fromLatin1("Alt"), format); + if ((key & Qt::SHIFT) == Qt::SHIFT) +- addKey(s, nativeText ? QShortcut::tr("Shift") : QString::fromLatin1("Shift"), format); ++ addKey(s, nativeText ? QShortcut::tr("Shift", "Shift key, used for shortcuts") : QString::fromLatin1("Shift"), format); + } + + +@@ -1132,7 +1132,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat + p += QChar((key-0x10000)%400+0xdc00); + } + } else if (key >= Qt::Key_F1 && key <= Qt::Key_F35) { +- p = nativeText ? QShortcut::tr("F%1").arg(key - Qt::Key_F1 + 1) ++ p = nativeText ? QShortcut::tr("F%1", "Fx key, used for shortcuts").arg(key - Qt::Key_F1 + 1) + : QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1); + } else if (key) { + int i=0; +-- +1.6.2.5 + diff --git a/0274-shm-native-image-fix.patch b/0274-shm-native-image-fix.patch new file mode 100644 index 0000000..03247a4 --- /dev/null +++ b/0274-shm-native-image-fix.patch @@ -0,0 +1,88 @@ +diff -up qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp.me qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp +--- qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp.me 2009-10-02 18:26:02.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp 2009-10-02 18:27:13.000000000 +0200 +@@ -144,7 +144,7 @@ QImage::Format QNativeImage::systemForma + #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM) + + QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* isTextBuffer */, QWidget *widget) +- : xshmimg(0), xshmpm(0) ++ : xshmimg(0) + { + if (!X11->use_mitshm) { + image = QImage(width, height, format); +@@ -195,11 +195,6 @@ QNativeImage::QNativeImage(int width, in + shmctl(xshminfo.shmid, IPC_RMID, 0); + return; + } +- xshmpm = XShmCreatePixmap(X11->display, DefaultRootWindow(X11->display), xshmimg->data, +- &xshminfo, width, height, dd); +- if (!xshmpm) { +- qWarning() << "QNativeImage: Unable to create shared Pixmap."; +- } + } + + +@@ -208,10 +203,6 @@ QNativeImage::~QNativeImage() + if (!xshmimg) + return; + +- if (xshmpm) { +- XFreePixmap(X11->display, xshmpm); +- xshmpm = 0; +- } + XShmDetach(X11->display, &xshminfo); + xshmimg->data = 0; + XDestroyImage(xshmimg); +diff -up qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h.me qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h +--- qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h.me 2009-10-02 18:33:38.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h 2009-10-02 18:34:01.000000000 +0200 +@@ -90,7 +90,6 @@ public: + + #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM) + XImage *xshmimg; +- Pixmap xshmpm; + XShmSegmentInfo xshminfo; + + #elif defined(Q_WS_MAC) +diff -up qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp.me qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp +--- qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp.me 2009-10-02 18:27:55.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp 2009-10-02 18:33:30.000000000 +0200 +@@ -1959,12 +1959,9 @@ void qt_init(QApplicationPrivate *priv, + bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0; + if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) { + Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display)); +- X11->use_mitshm = mitshm_pixmaps && ((defaultVisual->red_mask == 0xff0000 +- || defaultVisual->red_mask == 0xf800) +- && (defaultVisual->green_mask == 0xff00 +- || defaultVisual->green_mask == 0x7e0) +- && (defaultVisual->blue_mask == 0xff +- || defaultVisual->blue_mask == 0x1f)); ++ X11->use_mitshm = (defaultVisual->red_mask == 0xff0000 || defaultVisual->red_mask == 0xf800) ++ && (defaultVisual->green_mask == 0xff00 || defaultVisual->green_mask == 0x7e0) ++ && (defaultVisual->blue_mask == 0xff || defaultVisual->blue_mask == 0x1f); + } + } + #endif // QT_NO_MITSHM +diff -up qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp.me qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp +--- qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp.me 2009-10-02 18:34:18.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp 2009-10-02 18:35:54.000000000 +0200 +@@ -220,9 +220,16 @@ void QRasterWindowSurface::flush(QWidget + + QRect br = rgn.boundingRect().translated(offset); + #ifndef QT_NO_MITSHM +- if (d_ptr->image->xshmpm) { +- XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc, +- br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y()); ++ if (d_ptr->image->xshmimg && (br.width() * br.height() > 65536)) { ++ const QImage &src = d->image->image; ++ br = br.intersected(src.rect()); ++ // Hack to make sure we satisify the PutImage() constraints in the X server, ++ // since the doShmPutImage() route currently forces a migration to system ram. ++ wbr.setX(wbr.x() - br.x()); ++ br.setX(0); ++ br.setWidth(src.width()); ++ XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg, ++ br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False); + XSync(X11->display, False); + } else + #endif diff --git a/kde-qt-patches-20090820git.patch b/kde-qt-patches-20090820git.patch deleted file mode 100644 index f77ce18..0000000 --- a/kde-qt-patches-20090820git.patch +++ /dev/null @@ -1,2042 +0,0 @@ -commit b48e2091871516496cf0b133249fbf5326a55831 -Author: Lubos Lunak -Date: Sat Feb 23 16:44:52 2008 +0100 - - This patch uses object name as a fallback for window role if no window - role is set explicitly using setWindowRole(). Since Qt3 always used - the object name as the window role and most Qt3/KDE3 code is ported to - call setObjectName(), - - this makes the window role set in many cases (which KWin uses for window identifying). - - NOTE: It is suggested to apply patch #0209 as well when this patch is used. - - qt-bugs@ issue : 167704 - Trolltech task ID : 168283 (status: "fixed" for Qt 4.4.0, but effectively refused) - -diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp -index 6487194..ef0369e 100644 ---- a/src/corelib/kernel/qobject.cpp -+++ b/src/corelib/kernel/qobject.cpp -@@ -993,8 +993,16 @@ void QObject::setObjectName(const QString &name) - { - Q_D(QObject); - d->objectName = name; -+#if defined(Q_WS_X11) -+ d->checkWindowRole(); -+#endif - } - -+#if defined(Q_WS_X11) -+void QObjectPrivate::checkWindowRole() -+{ -+} -+#endif - - #ifdef QT3_SUPPORT - /*! \internal -diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h -index 0bcccba..6ab9e10 100644 ---- a/src/corelib/kernel/qobject_p.h -+++ b/src/corelib/kernel/qobject_p.h -@@ -144,6 +144,9 @@ public: - mutable quint32 connectedSignals; - - QString objectName; -+#if defined(Q_WS_X11) -+ virtual void checkWindowRole(); -+#endif - - // Note: you must hold the signalSlotLock() before accessing the lists below or calling the functions - struct Connection -diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h -index 774e390..176d6fa 100644 ---- a/src/gui/kernel/qwidget_p.h -+++ b/src/gui/kernel/qwidget_p.h -@@ -358,6 +358,7 @@ public: - - #if defined(Q_WS_X11) - void setWindowRole(); -+ virtual void checkWindowRole(); - void sendStartupMessage(const char *message) const; - void setNetWmWindowTypes(); - void x11UpdateIsOpaque(); -diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp -index 79ee8c9..b56849c 100644 ---- a/src/gui/kernel/qwidget_x11.cpp -+++ b/src/gui/kernel/qwidget_x11.cpp -@@ -778,13 +778,17 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO - data.fstrut_dirty = 1; - - // declare the widget's window role -+ QByteArray windowRole; - if (QTLWExtra *topData = maybeTopData()) { -- if (!topData->role.isEmpty()) { -- QByteArray windowRole = topData->role.toUtf8(); -- XChangeProperty(dpy, id, -- ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, -- (unsigned char *)windowRole.constData(), windowRole.length()); -- } -+ if (!topData->role.isEmpty()) -+ windowRole = topData->role.toUtf8(); -+ } -+ if (windowRole.isEmpty()) // use object name as a fallback -+ windowRole = objectName.toUtf8(); -+ if (!windowRole.isEmpty()) { -+ XChangeProperty(dpy, id, -+ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, -+ (unsigned char *)windowRole.constData(), windowRole.length()); - } - - // set client leader property -@@ -2768,6 +2772,17 @@ void QWidgetPrivate::setWindowRole() - (unsigned char *)windowRole.constData(), windowRole.length()); - } - -+void QWidgetPrivate::checkWindowRole() -+{ -+ Q_Q(QWidget); -+ if( !q->windowRole().isEmpty() || !q->internalWinId()) -+ return; -+ QByteArray windowRole = objectName.toUtf8(); // use as a fallback -+ XChangeProperty(X11->display, q->internalWinId(), -+ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, -+ (unsigned char *)windowRole.constData(), windowRole.length()); -+} -+ - Q_GLOBAL_STATIC(QX11PaintEngine, qt_widget_paintengine) - QPaintEngine *QWidget::paintEngine() const - { - -commit 339e220e29ff39b86705438b4be6f90e5618d27b -Author: Lubos Lunak -Date: Tue Oct 2 16:08:32 2007 +0200 - - This patch makes override-redirect windows (popup menu, dropdown menu, - tooltip, combobox, etc.) also have more window properties like WM_CLASS, - so they can be used when compositing. - - qt-bugs@ issue : none - bugs.kde.org number : none - -diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp -index 79ee8c9..a74a849 100644 ---- a/src/gui/kernel/qwidget_x11.cpp -+++ b/src/gui/kernel/qwidget_x11.cpp -@@ -719,6 +719,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO - Q_ASSERT(id); - XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder, - &wsa); -+ XClassHint class_hint; -+ QByteArray appName = qAppName().toLatin1(); -+ class_hint.res_name = appName.data(); // application name -+ class_hint.res_class = const_cast(QX11Info::appClass()); // application class -+ XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint); - } else if (topLevel && !desktop) { // top-level widget - if (!X11->wm_client_leader) - create_wm_client_leader(); -@@ -769,13 +774,21 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO - // set EWMH window types - setNetWmWindowTypes(); - -+ // when we create a toplevel widget, the frame strut should be dirty -+ data.fstrut_dirty = 1; -+ -+ } else { -+ // non-toplevel widgets don't have a frame, so no need to -+ // update the strut -+ data.fstrut_dirty = 0; -+ } -+ -+ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows - // set _NET_WM_PID - long curr_pid = getpid(); - XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace, - (unsigned char *) &curr_pid, 1); - -- // when we create a toplevel widget, the frame strut should be dirty -- data.fstrut_dirty = 1; - - // declare the widget's window role - if (QTLWExtra *topData = maybeTopData()) { -@@ -791,10 +804,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO - XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER), - XA_WINDOW, 32, PropModeReplace, - (unsigned char *)&X11->wm_client_leader, 1); -- } else { -- // non-toplevel widgets don't have a frame, so no need to -- // update the strut -- data.fstrut_dirty = 0; - } - - if (initializeWindow && q->internalWinId()) { - -commit 68eaa07de69e873b89d4aba341c6ed1ca81f6819 -Author: Lubos Lunak -Date: Wed Jan 30 14:24:01 2008 +0100 - - This patch changes QObjectPrivateVersion, thus preventing mixing - parts of upstream Qt and qt-copy. In general it is a bad idea to mix - e.g. libQtCore from one build and libQtGui from another one, and other - qt-copy patches could make changes in Qt internal structures that could - cause problems when mixed with upstream Qt. - - This patch does not make qt-copy binary incompatible with upstream Qt. - It only further enforces using the same sources for the whole Qt build. - - qt-bugs@ issue : none - Trolltech task ID : none - bugs.kde.org number : none - -diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h -index 0bcccba..88192fd 100644 ---- a/src/corelib/kernel/qobject_p.h -+++ b/src/corelib/kernel/qobject_p.h -@@ -83,7 +83,9 @@ extern QSignalSpyCallbackSet Q_CORE_EXPORT qt_signal_spy_callback_set; - - inline QObjectData::~QObjectData() {} - --enum { QObjectPrivateVersion = QT_VERSION }; -+// add 0x1000000 to mark it as qt-copy version, with possible modifications -+// in some Q*Private class -+enum { QObjectPrivateVersion = QT_VERSION + 0x1000000 }; - - class Q_CORE_EXPORT QObjectPrivate : public QObjectData - { - -commit 86fc0d43cdcf3232ae0e4e6f4f28cf8f1a45ede5 -Author: Benjamin Reed -Date: Tue Feb 19 17:37:37 2008 +0100 - - This patch adds support for using -isystem to allow putting an include - directory at the end of the compiler's header search path. - - I don't have the exact output anymore (I've since patched Qt's configure) but - essentially, since I have pcre.h in /opt/kde4-deps/include, it was - conflicting with Qt's (modified) pcre.h in the WebKit bits, since - -I /opt/kde4-deps/include ends up in CXXFLAGS in the generated makefiles, it - comes *before* the specific locations in INCPATH on the compile line, and you - end up with a conflict with the system-installed pcre.h. - - Presumably, if your pcre.h is in /usr/include as on most Linux systems, you - wouldn't notice this issue since /usr/include's already in your include path - and people likely don't pass -I /usr/include to configure. I suspect that on - any platform with a regular, system-installed pcre.h (or clucene headers), - adding -I /usr/include would exhibit this bug, just as a custom-installed - pcre/clucene in another root would. - - qt-bugs@ issue : 199610 - Trolltech task ID : - bugs.kde.org number : - -diff --git a/configure b/configure -index 2c108ad..610a201 100755 ---- a/configure -+++ b/configure -@@ -927,6 +927,11 @@ while [ "$#" -gt 0 ]; do - VAL=`echo $1 | sed 's,-D,,'` - fi - ;; -+ -isystem) -+ VAR="add_isystempath" -+ shift -+ VAL="$1" -+ ;; - -I?*|-I) - VAR="add_ipath" - if [ "$1" = "-I" ]; then -@@ -1890,6 +1895,9 @@ while [ "$#" -gt 0 ]; do - add_ipath) - I_FLAGS="$I_FLAGS -I\"${VAL}\"" - ;; -+ add_isystempath) -+ I_FLAGS="$I_FLAGS -isystem \"${VAL}\"" -+ ;; - add_lpath) - L_FLAGS="$L_FLAGS -L\"${VAL}\"" - ;; - -commit 733d1afd03908d695aa8a6518f453b9ff0e5b8a2 -Author: Robert Knight -Date: Sun Apr 20 16:28:31 2008 +0200 - - When tabs are inserted or removed in a QTabBar, - QTabBarPrivate::refresh() is called to update the layout. If the - tabbar widget is hidden, this just sets a boolean variable - (layoutDirty) and returns, so the parent widget's layout is not - notified about the possible geometry change. - - Prior to Qt 4.4 this was not a problem because the geometry was - recalculated in QTabBar::sizeHint() if the layoutDirty variable was - set. In Qt 4.4 however the layout caches size hint information in - QWidgetItemV2. Since the cache information is not invalidated, the - layout may end up using out-of-date size hint information to compute - the widget size. - - If the QTabBar is empty when QTabBar::sizeHint() is called, it will - return a size with a height of 0, which will be kept in the cache and - so the tab bar will never be shown. - - This patch fixes the problem by calling updateGeometry() whenever the - tab bar's layout is refreshed. - - qt-bugs@ issue : 208185 - Trolltech task ID : 208349 - bugs.kde.org number : 159014 - -diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp -index 419d456..41107a0 100644 ---- a/src/gui/widgets/qtabbar.cpp -+++ b/src/gui/widgets/qtabbar.cpp -@@ -678,8 +678,8 @@ void QTabBarPrivate::refresh() - layoutTabs(); - makeVisible(currentIndex); - q->update(); -- q->updateGeometry(); - } -+ q->updateGeometry(); - } - - /*! - -commit 8e28e0603a900e1b18ebfd14c4f87b16dabf4cf6 -Author: Christian Ehrlicher -Date: Fri Sep 19 17:41:26 2008 +0200 - - Fix configure.exe to do an out-of-source build on windows - - qt-bugs@ issue : N227213 - Trolltech task ID : none yet - -diff --git a/bin/syncqt b/bin/syncqt -index 7a9f1d3..b5a8e1c 100755 ---- a/bin/syncqt -+++ b/bin/syncqt -@@ -365,9 +365,13 @@ sub fixPaths { - $match_dir = $tmp; - $i = $slash; - } -+ my $cnt_ofs = 0; -+ if($match_dir =~ /^[a-zA-Z]:$/) { -+ $cnt_ofs = 1; -+ } - if($match_dir) { - my $after = substr($dir, length($match_dir)); -- my $count = ($after =~ tr,/,,); -+ my $count = ($after =~ tr,/,,) - $cnt_ofs; - my $dots = ""; - for(my $i = 0; $i < $count; $i++) { - $dots .= "../"; -diff --git a/projects.pro b/projects.pro -index 2596c0a..3ba0688 100644 ---- a/projects.pro -+++ b/projects.pro -@@ -127,6 +127,9 @@ unix { - DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g - mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default - } -+win32 { -+ mkspecs.files += $$QT_BUILD_TREE/mkspecs/default -+} - INSTALLS += mkspecs - - false:macx { #mac install location -diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp -index d519b09..7979836 100644 ---- a/src/tools/moc/main.cpp -+++ b/src/tools/moc/main.cpp -@@ -94,7 +94,13 @@ static QByteArray combinePath(const char *infile, const char *outfile) - inSplitted.prepend(QLatin1String("..")); - } - inSplitted.append(inFileInfo.fileName()); -+#ifdef Q_WS_WIN -+ const QString rel = inSplitted.join(QLatin1String("/")); -+ const QString abs = inFileInfo.absoluteFilePath(); -+ return QFile::encodeName(rel.length() < abs.length() ? rel : abs); -+#else - return QFile::encodeName(inSplitted.join(QLatin1String("/"))); -+#endif - } - - - -commit 0afcf33127c6ccbe5dfaae4f4c5e02f28dc10ae1 -Author: Christian Ehrlicher -Date: Thu May 8 21:25:49 2008 +0200 - - When using qmake outside qt src tree, it sometimes generates wrong - paths (wrong path separator) - - qt-bugs@ issue : none - Trolltech task ID : 214661 - -diff --git a/qmake/property.cpp b/qmake/property.cpp -index 8ba89f9..dd78349 100644 ---- a/qmake/property.cpp -+++ b/qmake/property.cpp -@@ -81,29 +81,32 @@ QMakeProperty::keyBase(bool version) const - QString - QMakeProperty::value(QString v, bool just_check) - { -+ QString ret; - if(v == "QT_INSTALL_PREFIX") -- return QLibraryInfo::location(QLibraryInfo::PrefixPath); -+ ret = QLibraryInfo::location(QLibraryInfo::PrefixPath); - else if(v == "QT_INSTALL_DATA") -- return QLibraryInfo::location(QLibraryInfo::DataPath); -+ ret = QLibraryInfo::location(QLibraryInfo::DataPath); - else if(v == "QT_INSTALL_DOCS") -- return QLibraryInfo::location(QLibraryInfo::DocumentationPath); -+ ret = QLibraryInfo::location(QLibraryInfo::DocumentationPath); - else if(v == "QT_INSTALL_HEADERS") -- return QLibraryInfo::location(QLibraryInfo::HeadersPath); -+ ret = QLibraryInfo::location(QLibraryInfo::HeadersPath); - else if(v == "QT_INSTALL_LIBS") -- return QLibraryInfo::location(QLibraryInfo::LibrariesPath); -+ ret = QLibraryInfo::location(QLibraryInfo::LibrariesPath); - else if(v == "QT_INSTALL_BINS") -- return QLibraryInfo::location(QLibraryInfo::BinariesPath); -+ ret = QLibraryInfo::location(QLibraryInfo::BinariesPath); - else if(v == "QT_INSTALL_PLUGINS") -- return QLibraryInfo::location(QLibraryInfo::PluginsPath); -+ ret = QLibraryInfo::location(QLibraryInfo::PluginsPath); - else if(v == "QT_INSTALL_TRANSLATIONS") -- return QLibraryInfo::location(QLibraryInfo::TranslationsPath); -+ ret = QLibraryInfo::location(QLibraryInfo::TranslationsPath); - else if(v == "QT_INSTALL_CONFIGURATION") -- return QLibraryInfo::location(QLibraryInfo::SettingsPath); -+ ret = QLibraryInfo::location(QLibraryInfo::SettingsPath); - else if(v == "QT_INSTALL_EXAMPLES") -- return QLibraryInfo::location(QLibraryInfo::ExamplesPath); -+ ret = QLibraryInfo::location(QLibraryInfo::ExamplesPath); - else if(v == "QT_INSTALL_DEMOS") -- return QLibraryInfo::location(QLibraryInfo::DemosPath); -- else if(v == "QMAKE_MKSPECS") -+ ret = QLibraryInfo::location(QLibraryInfo::DemosPath); -+ if(!ret.isEmpty()) -+ return QDir::toNativeSeparators(ret); -+ if(v == "QMAKE_MKSPECS") - return qmake_mkspec_paths().join(Option::target_mode == Option::TARG_WIN_MODE ? ";" : ":"); - else if(v == "QMAKE_VERSION") - return qmake_version(); -@@ -116,7 +119,7 @@ QMakeProperty::value(QString v, bool just_check) - int slash = v.lastIndexOf('/'); - QVariant var = settings->value(keyBase(slash == -1) + v); - bool ok = var.isValid(); -- QString ret = var.toString(); -+ ret = var.toString(); - if(!ok) { - QString version = qmake_version(); - if(slash != -1) { - -commit 1ec9dd029abaa0f00798535fdb1722154b1c63f6 -Author: Rafael Fernández López -Date: Sun Oct 26 10:40:51 2008 +0100 - - In a treeview with columns like this: - - Column 1 | Column 2 | ... | Column k | ... | Column n - - When selecting with rubberband (by clicking on the blank part of the viewport) while Column k is - hidden, you get double items on the selection model, when asking for selection(). This is becase - ranges are incorrectly calculated when there are hidden columns. A way to reproduce: - - Column 1 | Column 2 | Column 4 (Column 3 is hidden) - item - item - item - x <- press button here and move it up to select items (on this same column) - - If you do like this: - - Column 1 | Column 2 | Column 4 (Column 3 is hidden) - item - item - item - x <- press button here and move it up - - you won't be able to reproduce, since you need the hidden column to be between the one you click and - the last one. The reason is that columnRanges returns two ranges when there is supposed to return 1 - range (even when there are hidden columns). - - qt-bugs@ issue : N232819 - Trolltech task ID : 232831 - bugs.kde.org number : 171436 - -diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp -index ed6ad03..dc147f2 100644 ---- a/src/gui/itemviews/qtreeview.cpp -+++ b/src/gui/itemviews/qtreeview.cpp -@@ -3575,7 +3575,7 @@ QList > QTreeViewPrivate::columnRanges(const QModelIndex &topInd - current.first = -2; // -1 is not enough because -1+1 = 0 - current.second = -2; - foreach (int logicalColumn, logicalIndexes) { -- if (current.second + 1 != logicalColumn) { -+ if (current.second + 1 != logicalColumn && !header->isSectionHidden(current.second + 1)) { - if (current.first != -2) { - //let's save the current one - ret += current; - -commit b274bbaf4768dcfdfcf95ceda08b6402ffedb80d -Author: George Goldberg -Date: Tue Apr 28 17:08:07 2009 +0200 - - This patch fixes deserialization of values with custom types when setting - properties on dbus adaptors. It is needed, in particular by telepathy/Qt - programs and libraries. The bug was reported to Nokia on 2009-01-07 along - with the patch supplied here. The summary of the issue from the Qt - Software task tracker follows: - - When calling the setter for a DBus property, if that property has a custom type - (e.g. a struct with dbus type (uss)), QtDBus fails to demarshall the - QDBusArgument before attempting to set the property on the adaptor. The result - is that it attempts to call adaptor->setProperty() with a QDBusArgument of type - "uss" instead of with the type of the custom struct. - - qt-bugs@ issue : N240326 - Qt Software task ID : 240608 - bugs.kde.org number : none - -diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp -index c71f2f4..d261d01 100644 ---- a/src/dbus/qdbusinternalfilters.cpp -+++ b/src/dbus/qdbusinternalfilters.cpp -@@ -274,9 +274,23 @@ QDBusMessage qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNode &node - QDBusAdaptorConnector::AdaptorMap::ConstIterator it; - it = qLowerBound(connector->adaptors.constBegin(), connector->adaptors.constEnd(), - interface_name); -- if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) -+ if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) { -+ if (value.userType() == qMetaTypeId()) { -+ QDBusArgument valueArg = qvariant_cast(value); -+ if (valueArg.currentType() != -1) { -+ int mid = it->adaptor->metaObject()->property(it->adaptor->metaObject()->indexOfProperty(property_name)).userType(); -+ void *null = 0; -+ QVariant valueStore(mid, null); -+ QDBusMetaType::demarshall(valueArg, mid, valueStore.data()); -+ -+ if (it->adaptor->setProperty(property_name, valueStore)) -+ return msg.createReply(); -+ } -+ } -+ - if (it->adaptor->setProperty(property_name, value)) - return msg.createReply(); -+ } - } - } - - -commit 9a3fe8fc4912bf82b791c4131f553c18140ca838 -Author: Thiago Macieira -Date: Sun Jun 21 13:17:13 2009 -0300 - - Import README.qt-copy from the original qt-copy - -diff --git a/README.kde-qt b/README.kde-qt -new file mode 100644 -index 0000000..f605a0b ---- /dev/null -+++ b/README.kde-qt -@@ -0,0 +1,188 @@ -+This is a copy of Qt version 4.5.1. It may include -+modifications which are necessary for KDE; these are listed in the -+patches directory. -+ -+1. Qt-copy patches -+================== -+ -+You may also consider running the apply_patches script before configuring qt-copy, -+which will apply all not yet applied patches from the patches/ directory that -+are considered safe (they mostly include optimizations and features that don't -+add new API). Note that most of those patches haven't been accepted -+by Qt Software yet. and therefore they'll make your qt-copy differ from official -+Qt version. -+ -+2. Configuring Qt -+================= -+ -+The recommended compile line is: -+ -+--default-config-begin-- -+./configure -qt-gif -debug -fast -no-exceptions -no-separate-debug-info \ -+ -system-libpng -system-libjpeg -system-zlib \ -+ -dbus -webkit -no-phonon -plugin-sql-mysql \ -+ -nomake examples -nomake demos -prefix -+--default-config-end-- -+ -+It contains "-debug", which greatly improves the use for backtraces (but -+also needs a lot more disk space and makes things slower). To build in -+release mode, replace it with "-release". -+ -+It also contains "-no-separate-debug-info", which disables separate .debug -+files. Instead, the debug information will be built into the libraries. -+This option is needed when you install Qt. -+If you don't install Qt, it can be useful to disable this option, -+thus having separate debug symbol files. With separate debug files, you can -+just move those debug files to another directory to remove Qt debug symbols. -+Moving the files back will enable Qt debug symbols again. -+This is useful if you rarely need to step into Qt functions during debugging, -+because GDB loads much faster and uses less memory without Qt debug symbols. -+In the rare case you need to step into Qt code, you can temporarily enable -+debug symbols again by moving the debug files back. You can even load the Qt -+debug symbols from within GDB on demand, using the "symbol-file" command. -+ -+It also contains the "-no-exceptions" argument, which disables C++ -+exception support. Disabling exception support may improve memory -+consumption if GCC is being used. However, that also disables the -+QtXmlPatterns module since that requires exception support. If you -+plan on using that module, remove the option. -+ -+If you are planning to compile Qt using an Icecream cluster you have to -+pass the option -no-pch (no precompiled headers) to configure to make -+distributed compilation work. -+ -+3. Compiling Qt -+=============== -+ -+To compile Qt on a Unix platform, run: -+ -+ export MAKEFLAGS=-j2 -+ make -+ make install -+ -+If your computer has more than one core or processor, you may consider -+increasing the "2" above. If you've got a compile farm available, you -+should adjust the -j argument to match the number of slots in that -+farm. -+ -+4. Modifying & rebuilding Qt -+============================ -+ -+If you make modifications to the Qt source code, you don't need to -+build everything again. Simply go to the directory containing the -+Makefile closest to the files you changed and run "make" again. -+ -+For example, if you modified src/corelib/io/qiodevice.cpp, do: -+ -+ cd src/corelib -+ make -+ -+Do not commit your modifications to qt-copy as such. If you have a fix -+that benefit others, see the "Creating Qt-copy patches" section below. -+ -+5. Building Qt examples and demos -+================================= -+ -+The "-nomake examples -nomake demos" arguments to the configure script -+mean that those two sections will not be configured for -+building. Which is unneeded for usage of the library. If you want to -+compile the examples or demos later; just enter either directory and -+type: -+ -+ qmake -+ make -+ -+6. Building Qt documentation (only applies to Snapshot versions of Qt) -+============================ -+ -+To build and install the documentation, run: -+ -+ make docs -+ ./config.status -+ make install -+ -+It is necessary to do this once only, even if you rebuild Qt later. -+ -+7. Using Qt uninstalled -+======================= -+ -+To use without having to install it, configure it as follows: -+ -+ ./configure -prefix $PWD -+ make sub-src -+ make sub-tools -+ -+Attention: DO NOT run -+ -+ make install -+ -+If you do, Qt will overwrite your include/ directory with its -+installation. -+ -+8. Creating Qt-copy patches -+=========================== -+ -+If you have fixed a bug in Qt or modified it in any way that may -+benefit others, please share your change in the form of a patch. Do -+not commit your changes directly to the qt-copy module because they -+may be lost in a future update if they have not been added to the -+official Qt release. -+ -+The exception to the above rule is that if the fix has been accepted -+by Qt Software (and so will appear in the next release of Qt), then -+it can be applied directly to qt-copy. In this case, the patch -+should still be placed in patches/ as usual, but it should have a -+header line -+ Applied: yes -+ -+Before creating a patch, it is recommended to contact Qt Software -+support via qt-bugs@trolltech.com and explain the situation. There may -+be a solution for the problem already or a new direction that should -+be accounted for. -+ -+To create a patch, do the following: -+ a) make sure your Qt sources are clean of other changes. Run: -+ svn revert -R . -+ b) make your changes to the Qt source code and verify that it -+ compiles, links and works. -+ c) open the patches/README file and get the next patch number -+ (you must read and understand the README file; if you don't, ask for -+ help from other KDE developers) -+ d) create the patch with: -+ svn diff > patches/NNNN-short-description-of-your-patch.diff -+ where NNNN is the next available number. -+ e) open the file you've just created and add the header to it. The -+ header should be the template in patches/README followed by a longer -+ description of your patch. -+ -+Don't forget to submit your patch to qt-bugs@trolltech.com along with -+the long description of the issue found, if you haven't already. -+Qt Software does not monitor the patches/ directory, so qt-copy -+patches do not get automatically applied to Qt official releases. -+ -+When you receive the issue number and task tracker numbers, update the -+patch file. -+ -+9. Known issues with current Qt code -+==================================== -+ -+In case you have strange issues with non-resizing windows and similar, use -+ export QT_USE_NATIVE_WINDOWS=1 -+before starting KDE. -+ -+10. Troubleshooting: Re-configuring and re-compiling -+=================================================== -+ -+For those updating the source in a directory where Qt has already -+been compiled, you may need to run the following commands from the -+top directory of your Qt sources: -+ -+ find . -name '*.moc' | xargs rm -+ -+Sometimes ./configure will refuse to run. You may need to: -+ rm .qmake.cache -+ -+If you think you may have run "make install" on an install-less Qt -+(srcdir == $QTDIR), run: -+ -+ svn revert -R include - -commit 39b24a10e4dee27357b9760b735c2ab98b132963 -Author: Thiago Macieira -Date: Sun Jun 21 13:46:54 2009 -0300 - - Update this file to reflect the workflow with Git, as well as use Git commands - -diff --git a/README.kde-qt b/README.kde-qt -index f605a0b..db3feb6 100644 ---- a/README.kde-qt -+++ b/README.kde-qt -@@ -1,27 +1,20 @@ --This is a copy of Qt version 4.5.1. It may include --modifications which are necessary for KDE; these are listed in the --patches directory. -+This is a patched version of Qt. It may include changes made by KDE -+and Qt developers that have either not been accepted for inclusion -+into Qt, or have been accepted for a later version of Qt than this -+one. - --1. Qt-copy patches --================== -- --You may also consider running the apply_patches script before configuring qt-copy, --which will apply all not yet applied patches from the patches/ directory that --are considered safe (they mostly include optimizations and features that don't --add new API). Note that most of those patches haven't been accepted --by Qt Software yet. and therefore they'll make your qt-copy differ from official --Qt version. -- --2. Configuring Qt -+1. Configuring Qt - ================= - - The recommended compile line is: - - --default-config-begin-- --./configure -qt-gif -debug -fast -no-exceptions -no-separate-debug-info \ -- -system-libpng -system-libjpeg -system-zlib \ -- -dbus -webkit -no-phonon -plugin-sql-mysql \ -- -nomake examples -nomake demos -prefix -+ -+ ./configure -qt-gif -debug -fast -no-separate-debug-info \ -+ -system-libpng -system-libjpeg -system-zlib \ -+ -dbus -webkit -plugin-sql-mysql \ -+ -nomake examples -nomake demos -prefix -+ - --default-config-end-- - - It contains "-debug", which greatly improves the use for backtraces (but -@@ -31,6 +24,7 @@ release mode, replace it with "-release". - It also contains "-no-separate-debug-info", which disables separate .debug - files. Instead, the debug information will be built into the libraries. - This option is needed when you install Qt. -+ - If you don't install Qt, it can be useful to disable this option, - thus having separate debug symbol files. With separate debug files, you can - just move those debug files to another directory to remove Qt debug symbols. -@@ -41,17 +35,11 @@ In the rare case you need to step into Qt code, you can temporarily enable - debug symbols again by moving the debug files back. You can even load the Qt - debug symbols from within GDB on demand, using the "symbol-file" command. - --It also contains the "-no-exceptions" argument, which disables C++ --exception support. Disabling exception support may improve memory --consumption if GCC is being used. However, that also disables the --QtXmlPatterns module since that requires exception support. If you --plan on using that module, remove the option. -- - If you are planning to compile Qt using an Icecream cluster you have to - pass the option -no-pch (no precompiled headers) to configure to make - distributed compilation work. - --3. Compiling Qt -+2. Compiling Qt - =============== - - To compile Qt on a Unix platform, run: -@@ -65,34 +53,49 @@ increasing the "2" above. If you've got a compile farm available, you - should adjust the -j argument to match the number of slots in that - farm. - --4. Modifying & rebuilding Qt -+3. Modifying & rebuilding Qt - ============================ - - If you make modifications to the Qt source code, you don't need to - build everything again. Simply go to the directory containing the - Makefile closest to the files you changed and run "make" again. - --For example, if you modified src/corelib/io/qiodevice.cpp, do: -+For example, if you've modified src/corelib/io/qiodevice.cpp, do: - - cd src/corelib - make - --Do not commit your modifications to qt-copy as such. If you have a fix --that benefit others, see the "Creating Qt-copy patches" section below. -+If you make a change that is not temporary, you should create a Git -+commit out of it. However, you shouldn't push those changes to -+kde-qt.git. If you have a fix that benefit others, see the "Creating -+kde-qt.git modifications" section below. - --5. Building Qt examples and demos -+4. Building Qt examples and demos - ================================= - - The "-nomake examples -nomake demos" arguments to the configure script --mean that those two sections will not be configured for --building. Which is unneeded for usage of the library. If you want to --compile the examples or demos later; just enter either directory and --type: -+mean that those two sections will not be configured for building, -+which is unneeded for usage of the library. If you want to compile -+the examples or demos later, just enter either directory and type: - - qmake - make - --6. Building Qt documentation (only applies to Snapshot versions of Qt) -+5. Build Qt tests -+================= -+ -+(Official information: http://qt.gitorious.org/qt/pages/QtAutotestsEnvironment) -+ -+In order to run Qt tests, you must have a "developer build" of Qt. For -+that, you need to reconfigure Qt and add the "-developer-build" -+option. That option is technically equivalent to the options: -+ -+ -debug -prefix $PWD -DQT_BUILD_INTERNAL -+ -+To run a test, go to its source dir in tests/auto/testname. Type -+"make" to build it, then run it (either ./tst_testname, or "make install"). -+ -+6. Building Qt documentation - ============================ - - To build and install the documentation, run: -@@ -119,21 +122,25 @@ Attention: DO NOT run - If you do, Qt will overwrite your include/ directory with its - installation. - --8. Creating Qt-copy patches --=========================== -+8. Creating kde-qt.git modifications -+==================================== - - If you have fixed a bug in Qt or modified it in any way that may - benefit others, please share your change in the form of a patch. Do --not commit your changes directly to the qt-copy module because they -+not commit your changes directly to the main branch because they - may be lost in a future update if they have not been added to the - official Qt release. - - The exception to the above rule is that if the fix has been accepted --by Qt Software (and so will appear in the next release of Qt), then --it can be applied directly to qt-copy. In this case, the patch --should still be placed in patches/ as usual, but it should have a --header line -- Applied: yes -+by Qt Software (and so will appear in the very next release of Qt), -+then it should be simply cherry-picked from the Qt development -+branch. Note that you shouldn't do this for changes that have been -+accepted into a release which is not the very next. -+In this case, you should use the following command: -+ -+ git cherry-pick -x SHA1_OF_THE_FIX -+where SHA1_OF_THE_FIX is the SHA-1 of the commit that you want to -+introduce. Then push the change to the server. - - Before creating a patch, it is recommended to contact Qt Software - support via qt-bugs@trolltech.com and explain the situation. There may -@@ -141,37 +148,42 @@ be a solution for the problem already or a new direction that should - be accounted for. - - To create a patch, do the following: -- a) make sure your Qt sources are clean of other changes. Run: -- svn revert -R . -- b) make your changes to the Qt source code and verify that it -- compiles, links and works. -- c) open the patches/README file and get the next patch number -- (you must read and understand the README file; if you don't, ask for -- help from other KDE developers) -- d) create the patch with: -- svn diff > patches/NNNN-short-description-of-your-patch.diff -- where NNNN is the next available number. -- e) open the file you've just created and add the header to it. The -- header should be the template in patches/README followed by a longer -- description of your patch. -- --Don't forget to submit your patch to qt-bugs@trolltech.com along with --the long description of the issue found, if you haven't already. --Qt Software does not monitor the patches/ directory, so qt-copy --patches do not get automatically applied to Qt official releases. -- --When you receive the issue number and task tracker numbers, update the --patch file. -- --9. Known issues with current Qt code --==================================== -- --In case you have strange issues with non-resizing windows and similar, use -- export QT_USE_NATIVE_WINDOWS=1 --before starting KDE. -- --10. Troubleshooting: Re-configuring and re-compiling --=================================================== -+ a) look at the listing of branches in -+ http://qt.gitorious.org/+kde-developers/qt/kde-qt/commits/HEAD and -+ select the next number. -+ -+ b) create a new branch out of a clean, released version of Qt, (for -+ example, 4.5.1), using the number above and a brief description of -+ your fix. For example: -+ git checkout -b patches/0180-window-role v4.5.1 -+ You can see the available released versions of Qt with: -+ git tag -+ -+ c) make your changes to the Qt source code and verify that it -+ compiles, links and works (please run the respective unit tests). -+ -+ c) commit your changes to Git, using the "git commit" command. Please -+ see http://qt.gitorious.org/qt/pages/GitIntroductionWithQt and -+ http://qt.gitorious.org/qt/pages/QtCodingStyle for information on -+ how to create commits -+ Note that you can create multiple commits. -+ -+ e) merge the change to the main branch, for example, 4.5.1-patched: -+ git checkout 4.5.1-patched -+ git merge patches/0180-window-role -+ -+ f) push the changes you made to your branch and to the main server: -+ git push git@gitorious.org:qt/kde-qt.git 4.5.1-patched patches/0180-window-role -+ (Don't forget to list both branch names) -+ -+Don't forget to submit your patch to using the Qt Contribution Model, -+along with the long description of the issue found. See -+http://qt.gitorious.org/qt/pages/QtContributionGuidelines for -+information how. You can submit the branch you've just sent to the -+server. -+ -+9. Troubleshooting: Re-configuring and re-compiling -+================================================== - - For those updating the source in a directory where Qt has already - been compiled, you may need to run the following commands from the -@@ -185,4 +197,5 @@ Sometimes ./configure will refuse to run. You may need to: - If you think you may have run "make install" on an install-less Qt - (srcdir == $QTDIR), run: - -- svn revert -R include -+ rm -rf include -+ bin/syncqt - -commit 8731ab999b849dac4716e3d29f5f55ed8e56438e -Author: Thiago Macieira -Date: Thu Jun 25 13:50:29 2009 +0200 - - This patch makes the raster graphics system use shared images instead - of shared pixmaps. - - Shared memory pixmaps are deprecated since they are slower than shared - images with modern graphics hardware. They are also not supported by EXA - drivers and can be disabled in the latest version of the NVidia driver. - - qt-bugs@ issue : none - Qt Software task ID : none - bugs.kde.org number : none - -diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp -index 3745708..3c21fce 100644 ---- a/src/gui/image/qnativeimage.cpp -+++ b/src/gui/image/qnativeimage.cpp -@@ -147,7 +147,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* - { - if (!X11->use_mitshm) { - xshmimg = 0; -- xshmpm = 0; - image = QImage(width, height, format); - return; - } -@@ -191,11 +190,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* - shmctl(xshminfo.shmid, IPC_RMID, 0); - return; - } -- xshmpm = XShmCreatePixmap(X11->display, DefaultRootWindow(X11->display), xshmimg->data, -- &xshminfo, width, height, dd); -- if (!xshmpm) { -- qWarning() << "QNativeImage: Unable to create shared Pixmap."; -- } - } - - -@@ -204,10 +198,6 @@ QNativeImage::~QNativeImage() - if (!xshmimg) - return; - -- if (xshmpm) { -- XFreePixmap(X11->display, xshmpm); -- xshmpm = 0; -- } - XShmDetach(X11->display, &xshminfo); - xshmimg->data = 0; - XDestroyImage(xshmimg); -diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h -index 07d5dfe..ba01854 100644 ---- a/src/gui/image/qnativeimage_p.h -+++ b/src/gui/image/qnativeimage_p.h -@@ -90,7 +90,6 @@ public: - - #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM) - XImage *xshmimg; -- Pixmap xshmpm; - XShmSegmentInfo xshminfo; - - #elif defined(Q_WS_MAC) -diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp -index d6fb03b..09963d9 100644 ---- a/src/gui/painting/qwindowsurface_raster.cpp -+++ b/src/gui/painting/qwindowsurface_raster.cpp -@@ -220,9 +220,16 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi - - QRect br = rgn.boundingRect().translated(offset); - #ifndef QT_NO_MITSHM -- if (d_ptr->image->xshmpm) { -- XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc, -- br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y()); -+ if (d_ptr->image->xshmimg && (br.width() * br.height() > 65536)) { -+ const QImage &src = d->image->image; -+ br = br.intersected(src.rect()); -+ // Hack to make sure we satisify the PutImage() constraints in the X server, -+ // since the doShmPutImage() route currently forces a migration to system ram. -+ wbr.setX(wbr.x() - br.x()); -+ br.setX(0); -+ br.setWidth(src.width()); -+ XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg, -+ br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False); - XSync(X11->display, False); - } else - #endif - -commit bb8255da422470c5012b6b1c4c24eb2afb6804dc -Author: Thiago Macieira -Date: Fri Jun 26 11:41:45 2009 +0200 - - Restore a section of the file that got removed due to conflict resolution. - - Thanks to Kevin Kofler for pointing this out - -diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp -index 33aec9e..53f020b 100644 ---- a/src/gui/kernel/qapplication_x11.cpp -+++ b/src/gui/kernel/qapplication_x11.cpp -@@ -1955,9 +1955,9 @@ void qt_init(QApplicationPrivate *priv, int, - bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0; - if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) { - Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display)); -- X11->use_mitshm = mitshm_pixmaps && (defaultVisual->red_mask == 0xff0000 -- && defaultVisual->green_mask == 0xff00 -- && defaultVisual->blue_mask == 0xff); -+ X11->use_mitshm = defaultVisual->red_mask == 0xff0000 -+ && defaultVisual->green_mask == 0xff00 -+ && defaultVisual->blue_mask == 0xff; - } - } - #endif // QT_NO_MITSHM - -commit 3860708da46685c135ac4faf074a4d7dd9952de8 -Author: David Faure -Date: Fri Jun 26 13:38:02 2009 +0200 - - Add missing word in sentence - -diff --git a/README.kde-qt b/README.kde-qt -index db3feb6..1e5f8c7 100644 ---- a/README.kde-qt -+++ b/README.kde-qt -@@ -176,7 +176,7 @@ To create a patch, do the following: - git push git@gitorious.org:qt/kde-qt.git 4.5.1-patched patches/0180-window-role - (Don't forget to list both branch names) - --Don't forget to submit your patch to using the Qt Contribution Model, -+Don't forget to submit your patch to QtSoftware using the Qt Contribution Model, - along with the long description of the issue found. See - http://qt.gitorious.org/qt/pages/QtContributionGuidelines for - information how. You can submit the branch you've just sent to the - -commit 46a247a2c9a8c0c4456a02f6a0922d859d88fe76 -Author: David Faure -Date: Fri Jun 26 13:45:37 2009 +0200 - - "Building Qt documentation" said to run "make install", but obviously we - don't want that if using qt uninstalled -> swap both sections and add a - "if uninstalled" before the make install bit. - -diff --git a/README.kde-qt b/README.kde-qt -index 1e5f8c7..9e272c9 100644 ---- a/README.kde-qt -+++ b/README.kde-qt -@@ -95,18 +95,7 @@ option. That option is technically equivalent to the options: - To run a test, go to its source dir in tests/auto/testname. Type - "make" to build it, then run it (either ./tst_testname, or "make install"). - --6. Building Qt documentation --============================ -- --To build and install the documentation, run: -- -- make docs -- ./config.status -- make install -- --It is necessary to do this once only, even if you rebuild Qt later. -- --7. Using Qt uninstalled -+6. Using Qt uninstalled - ======================= - - To use without having to install it, configure it as follows: -@@ -122,6 +111,20 @@ Attention: DO NOT run - If you do, Qt will overwrite your include/ directory with its - installation. - -+7. Building Qt documentation -+============================ -+ -+To build and install the documentation, run: -+ -+ make docs -+ -+And if you don't use Qt uninstalled: -+ -+ ./config.status -+ make install -+ -+It is necessary to do all this once only, even if you rebuild Qt later. -+ - 8. Creating kde-qt.git modifications - ==================================== - - -commit 4b5ae1db24fa1b96f00ef62bd2e1063a8a313e5c -Author: Albert Astals Cid -Date: Sat Jun 27 14:19:23 2009 +0200 - - Fix #error line not to have a ' as it's not correct - -diff --git a/src/3rdparty/webkit/WebCore/DerivedSources.cpp b/src/3rdparty/webkit/WebCore/DerivedSources.cpp -index f698913..aaf8983 100644 ---- a/src/3rdparty/webkit/WebCore/DerivedSources.cpp -+++ b/src/3rdparty/webkit/WebCore/DerivedSources.cpp -@@ -334,5 +334,5 @@ - // want StaticConstructors.h to "pollute" all the source files we #include here - // accidentally, so we'll throw an error whenever any file includes it. - #ifdef StaticConstructors_h --#error Don't include any file in DerivedSources.cpp that includes StaticConstructors.h -+#error Do not include any file in DerivedSources.cpp that includes StaticConstructors.h - #endif - -commit 2d1727e396d5dca24ae0fb6a45d35ffc1abd0c12 -Author: Thiago Macieira -Date: Fri Jun 12 14:27:54 2009 +0200 - - Attempt to fix header installation for Phonon. - - This is the long-standing issue of whether Phonon headers should be - written with a capital P or a lowercase one. KDE releases of Phonon - had whereas Qt 4.4 had . - - I tried to solve this before by adding a Phonon subdir next to phonon - in include/, but that only compounded the error: the presence of two - dirs caused problems and the installation wasn't fixed. - - So instead try to place Phonon/ClassName inside include/phonon. And - fix the installation to do it properly: just copy the include/$lib dir - into the target, then overwrite the .h files with the sources from - src/$lib. - - Reviewed-by: Marius Storm-Olsen - (cherry picked from commit 4b43263b870c17fd813d1d34f97146f4c725083e) - -diff --git a/bin/syncqt b/bin/syncqt -index 137b25f..71d4bff 100755 ---- a/bin/syncqt -+++ b/bin/syncqt -@@ -308,8 +308,6 @@ sub syncHeader { - $header =~ s=\\=/=g; - return copyFile($iheader, $header) if($copy); - -- my $iheader_no_basedir = $iheader; -- $iheader_no_basedir =~ s,^$basedir/?,,; - unless(-e "$header") { - my $header_dir = dirname($header); - mkpath $header_dir, 0777; -@@ -802,10 +800,9 @@ foreach (@modules_to_sync) { - my $class = $_; - if ($class =~ m/::/) { - $class =~ s,::,/,g; -- $class = "../" . $class; - } - $class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n"; -- $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", $header, 0)); -+ $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0)); - } - } else { - @headers = ( "$out_basedir/include/$lib/private/$header" ); -@@ -827,7 +824,6 @@ foreach (@modules_to_sync) { - my $class = $_; - if ($class =~ m/::/) { - $class =~ s,::,/,g; -- $class = "../" . $class; - } - my $class_header = fixPaths("$out_basedir/include/$lib/$class", - $current_dir) . " "; -@@ -848,25 +844,27 @@ foreach (@modules_to_sync) { - $master_contents .= "#endif\n"; - - unless($showonly) { -- #generate the "master" include file -- my $master_include = "$out_basedir/include/$lib/$lib"; -- $pri_install_files .= fixPaths($master_include, "$modules{$lib}") . " "; #get the master file installed too -- if(-e "$master_include") { -- open MASTERINCLUDE, "<$master_include"; -- local $/; -- binmode MASTERINCLUDE; -- my $oldmaster = ; -- close MASTERINCLUDE; -- $oldmaster =~ s/\r//g; # remove \r's , so comparison is ok on all platforms -- $master_include = 0 if($oldmaster eq $master_contents); -- } -- if($master_include && $master_contents) { -- my $master_dir = dirname($master_include); -- mkpath $master_dir, 0777; -- print "header (master) created for $lib\n"; -- open MASTERINCLUDE, ">$master_include"; -- print MASTERINCLUDE "$master_contents"; -- close MASTERINCLUDE; -+ unless ($lib eq "phonon") { -+ #generate the "master" include file -+ my $master_include = "$out_basedir/include/$lib/$lib"; -+ $pri_install_files .= fixPaths($master_include, "$modules{$lib}") . " "; #get the master file installed too -+ if($master_include && -e "$master_include") { -+ open MASTERINCLUDE, "<$master_include"; -+ local $/; -+ binmode MASTERINCLUDE; -+ my $oldmaster = ; -+ close MASTERINCLUDE; -+ $oldmaster =~ s/\r//g; # remove \r's , so comparison is ok on all platforms -+ $master_include = 0 if($oldmaster eq $master_contents); -+ } -+ if($master_include && $master_contents) { -+ my $master_dir = dirname($master_include); -+ mkpath $master_dir, 0777; -+ print "header (master) created for $lib\n"; -+ open MASTERINCLUDE, ">$master_include"; -+ print MASTERINCLUDE "$master_contents"; -+ close MASTERINCLUDE; -+ } - } - - #handle the headers.pri for each module -diff --git a/src/qt_install.pri b/src/qt_install.pri -index 6dd2074..ebeac8d 100644 ---- a/src/qt_install.pri -+++ b/src/qt_install.pri -@@ -15,11 +15,19 @@ qt_install_headers { - $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH/arch - } - -- flat_headers.files = $$INSTALL_HEADERS -- flat_headers.path = $$[QT_INSTALL_HEADERS]/Qt -- INSTALLS += flat_headers -+ equals(TARGET, phonon) { -+ class_headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET/Phonon -+ } else { -+ flat_headers.files = $$INSTALL_HEADERS -+ flat_headers.path = $$[QT_INSTALL_HEADERS]/Qt -+ INSTALLS += flat_headers - -- targ_headers.files = $$INSTALL_HEADERS $$SYNCQT.HEADER_CLASSES -+ class_headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET -+ } -+ class_headers.files = $$SYNCQT.HEADER_CLASSES -+ INSTALLS += class_headers -+ -+ targ_headers.files = $$INSTALL_HEADERS - targ_headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET - INSTALLS += targ_headers - } - -commit f9802f2bbbd23137acb5f80d1f131fa6b1a85752 -Author: Thiago Macieira -Date: Fri Jun 12 15:06:29 2009 +0200 - - Fix compilation after the last change. - - The #include header no longer exists. And the or - headers have never existed (neither for us nor for the - Phonon sources). You have to select each and every header that you do - want now. - - Reviewed-By: Marius Storm-Olsen - (cherry picked from commit 71be46c61c582d2f4635a1e420e44d57ddb5857a) - -diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp -index b1a48fb..2e01100 100644 ---- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp -+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp -@@ -35,7 +35,10 @@ - #include - #include - #include --#include -+ -+#include -+#include -+#include - - using namespace Phonon; - -diff --git a/tools/designer/src/plugins/phononwidgets/videoplayertaskmenu.h b/tools/designer/src/plugins/phononwidgets/videoplayertaskmenu.h -index 2ca3b58..58255b2 100644 ---- a/tools/designer/src/plugins/phononwidgets/videoplayertaskmenu.h -+++ b/tools/designer/src/plugins/phononwidgets/videoplayertaskmenu.h -@@ -47,7 +47,8 @@ - #include - #include - --#include -+#include -+#include - - QT_BEGIN_NAMESPACE - - -commit 01f26d0756839fbe783c637ca7dec5b7987f7e14 -Author: Aaron Seigo -Date: Mon Jul 27 21:46:22 2009 -0600 - - Make QMenu respect the minimum width set - - If one sets a minimum width on a QMenu and that size is larger than the - smallest size needed by the large menu item, it ignores the minimum - width and just uses the largest menu item size. - - This results in ugly painting artifacts. This currently affects - (at least) the tasks widget in Plasma in KDE4. - -diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp -index 9fbbb04..5d62ea6 100644 ---- a/src/gui/widgets/qmenu.cpp -+++ b/src/gui/widgets/qmenu.cpp -@@ -280,7 +280,7 @@ void QMenuPrivate::calcActionRects(QMap &actionRects, QListminimumWidth(), qMax(max_column_width, sz.width())); - //wrapping - if (!scroll && - y+sz.height()+vmargin > dh - (q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, 0, q) * 2)) { - -commit 1a94cd7b132497f70a2b97ec2b58f6e2b1c5076a -Author: Helio Chissini de Castro -Date: Fri Jul 10 16:00:13 2009 -0300 - - Fill gap of X.org/XFree multimedia/special/launcher keys - Qt up to 4.5.x is missing whole setup of multimedia keys already defined by X - -diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h -index 3edbca7..ddf27a8 100644 ---- a/src/corelib/global/qnamespace.h -+++ b/src/corelib/global/qnamespace.h -@@ -895,12 +895,10 @@ public: - Key_Dead_Horn = 0x01001262, - - // multimedia/internet keys - ignored by default - see QKeyEvent c'tor -- - Key_Back = 0x01000061, - Key_Forward = 0x01000062, - Key_Stop = 0x01000063, - Key_Refresh = 0x01000064, -- - Key_VolumeDown = 0x01000070, - Key_VolumeMute = 0x01000071, - Key_VolumeUp = 0x01000072, -@@ -909,7 +907,6 @@ public: - Key_BassDown = 0x01000075, - Key_TrebleUp = 0x01000076, - Key_TrebleDown = 0x01000077, -- - Key_MediaPlay = 0x01000080, - Key_MediaStop = 0x01000081, - Key_MediaPrevious = 0x01000082, -@@ -918,13 +915,11 @@ public: - #endif - Key_MediaNext = 0x01000083, - Key_MediaRecord = 0x01000084, -- - Key_HomePage = 0x01000090, - Key_Favorites = 0x01000091, - Key_Search = 0x01000092, - Key_Standby = 0x01000093, - Key_OpenUrl = 0x01000094, -- - Key_LaunchMail = 0x010000a0, - Key_LaunchMedia = 0x010000a1, - Key_Launch0 = 0x010000a2, -@@ -943,6 +938,98 @@ public: - Key_LaunchD = 0x010000af, - Key_LaunchE = 0x010000b0, - Key_LaunchF = 0x010000b1, -+ Key_MonBrightnessUp = 0x010000b2, -+ Key_MonBrightnessDown = 0x010000b3, -+ Key_KeyboardLightOnOff = 0x010000b4, -+ Key_KeyboardBrightnessUp = 0x010000b5, -+ Key_KeyboardBrightnessDown = 0x010000b6, -+ Key_PowerOff = 0x010000b7, -+ Key_WakeUp = 0x010000b8, -+ Key_Eject = 0x010000b9, -+ Key_ScreenSaver = 0x010000ba, -+ Key_WWW = 0x010000bb, -+ Key_Memo = 0x010000bc, -+ Key_LightBulb = 0x010000bd, -+ Key_Shop = 0x010000be, -+ Key_History = 0x010000bf, -+ Key_AddFavorite = 0x010000c0, -+ Key_HotLinks = 0x010000c1, -+ Key_BrightnessAdjust = 0x010000c2, -+ Key_Finance = 0x010000c3, -+ Key_Community = 0x010000c4, -+ Key_AudioRewind = 0x010000c5, -+ Key_BackForward = 0x010000c6, -+ Key_ApplicationLeft = 0x010000c7, -+ Key_ApplicationRight = 0x010000c8, -+ Key_Book = 0x010000c9, -+ Key_CD = 0x010000ca, -+ Key_Calculator = 0x010000cb, -+ Key_ToDoList = 0x010000cc, -+ Key_ClearGrab = 0x010000cd, -+ Key_Close = 0x010000ce, -+ Key_Copy = 0x010000cf, -+ Key_Cut = 0x010000d0, -+ Key_Display = 0x010000d1, -+ Key_DOS = 0x010000d2, -+ Key_Documents = 0x010000d3, -+ Key_Excel = 0x010000d4, -+ Key_Explorer = 0x010000d5, -+ Key_Game = 0x010000d6, -+ Key_Go = 0x010000d7, -+ Key_iTouch = 0x010000d8, -+ Key_LogOff = 0x010000d9, -+ Key_Market = 0x010000da, -+ Key_Meeting = 0x010000db, -+ Key_MenuKB = 0x010000dc, -+ Key_MenuPB = 0x010000dd, -+ Key_MySites = 0x010000de, -+ Key_News = 0x010000df, -+ Key_OfficeHome = 0x010000e0, -+ Key_Option = 0x010000e1, -+ Key_Paste = 0x010000e2, -+ Key_Phone = 0x010000e3, -+ Key_Calendar = 0x010000e4, -+ Key_Reply = 0x010000e5, -+ Key_Reload = 0x010000e6, -+ Key_RotateWindows = 0x010000e7, -+ Key_RotationPB = 0x010000e8, -+ Key_RotationKB = 0x010000e9, -+ Key_Save = 0x010000ea, -+ Key_Send = 0x010000eb, -+ Key_Spell = 0x010000ec, -+ Key_SplitScreen = 0x010000ed, -+ Key_Support = 0x010000ee, -+ Key_TaskPane = 0x010000ef, -+ Key_Terminal = 0x010000f0, -+ Key_Tools = 0x010000f1, -+ Key_Travel = 0x010000f2, -+ Key_Video = 0x010000f3, -+ Key_Word = 0x010000f4, -+ Key_Xfer = 0x010000f5, -+ Key_ZoomIn = 0x010000f6, -+ Key_ZoomOut = 0x010000f7, -+ Key_Away = 0x010000f8, -+ Key_Messenger = 0x010000f9, -+ Key_WebCam = 0x010000fa, -+ Key_MailForward = 0x010000fb, -+ Key_Pictures = 0x010000fc, -+ Key_Music = 0x010000fd, -+ Key_Battery = 0x010000fe, -+ Key_Bluetooth = 0x010000ff, -+ Key_WLAN = 0x01000100, -+ Key_UWB = 0x01000101, -+ Key_AudioForward = 0x01000102, -+ Key_AudioRepeat = 0x01000103, -+ Key_AudioRandomPlay = 0x01000104, -+ Key_Subtitle = 0x01000105, -+ Key_AudioCycleTrack = 0x01000106, -+ Key_Time = 0x01000107, -+ Key_Hibernate = 0x01000108, -+ Key_View = 0x01000109, -+ Key_TopMenu = 0x0100010a, -+ Key_PowerDown = 0x0100010b, -+ Key_Suspend = 0x0100010c, -+ Key_ContrastAdjust = 0x0100010d, - - Key_MediaLast = 0x0100ffff, - -diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp -index 98ed61c..f55b491 100644 ---- a/src/gui/kernel/qkeymapper_x11.cpp -+++ b/src/gui/kernel/qkeymapper_x11.cpp -@@ -714,47 +714,144 @@ extern bool qt_sm_blockUserInput; - #define XK_KP_Delete 0xFF9F - #endif - --// the next lines are taken from XFree > 4.0 (X11/XF86keysyms.h), defining some special -+// the next lines are taken on 10/2009 from X.org (X11/XF86keysym.h), defining some special - // multimedia keys. They are included here as not every system has them. --#define XF86XK_Standby 0x1008FF10 --#define XF86XK_AudioLowerVolume 0x1008FF11 --#define XF86XK_AudioMute 0x1008FF12 --#define XF86XK_AudioRaiseVolume 0x1008FF13 --#define XF86XK_AudioPlay 0x1008FF14 --#define XF86XK_AudioStop 0x1008FF15 --#define XF86XK_AudioPrev 0x1008FF16 --#define XF86XK_AudioNext 0x1008FF17 --#define XF86XK_HomePage 0x1008FF18 --#define XF86XK_Calculator 0x1008FF1D --#define XF86XK_Mail 0x1008FF19 --#define XF86XK_Start 0x1008FF1A --#define XF86XK_Search 0x1008FF1B --#define XF86XK_AudioRecord 0x1008FF1C --#define XF86XK_Back 0x1008FF26 --#define XF86XK_Forward 0x1008FF27 --#define XF86XK_Stop 0x1008FF28 --#define XF86XK_Refresh 0x1008FF29 --#define XF86XK_Favorites 0x1008FF30 --#define XF86XK_AudioPause 0x1008FF31 --#define XF86XK_AudioMedia 0x1008FF32 --#define XF86XK_MyComputer 0x1008FF33 --#define XF86XK_OpenURL 0x1008FF38 --#define XF86XK_Launch0 0x1008FF40 --#define XF86XK_Launch1 0x1008FF41 --#define XF86XK_Launch2 0x1008FF42 --#define XF86XK_Launch3 0x1008FF43 --#define XF86XK_Launch4 0x1008FF44 --#define XF86XK_Launch5 0x1008FF45 --#define XF86XK_Launch6 0x1008FF46 --#define XF86XK_Launch7 0x1008FF47 --#define XF86XK_Launch8 0x1008FF48 --#define XF86XK_Launch9 0x1008FF49 --#define XF86XK_LaunchA 0x1008FF4A --#define XF86XK_LaunchB 0x1008FF4B --#define XF86XK_LaunchC 0x1008FF4C --#define XF86XK_LaunchD 0x1008FF4D --#define XF86XK_LaunchE 0x1008FF4E --#define XF86XK_LaunchF 0x1008FF4F -+#define XF86XK_MonBrightnessUp 0x1008FF02 -+#define XF86XK_MonBrightnessDown 0x1008FF03 -+#define XF86XK_KbdLightOnOff 0x1008FF04 -+#define XF86XK_KbdBrightnessUp 0x1008FF05 -+#define XF86XK_KbdBrightnessDown 0x1008FF06 -+#define XF86XK_Standby 0x1008FF10 -+#define XF86XK_AudioLowerVolume 0x1008FF11 -+#define XF86XK_AudioMute 0x1008FF12 -+#define XF86XK_AudioRaiseVolume 0x1008FF13 -+#define XF86XK_AudioPlay 0x1008FF14 -+#define XF86XK_AudioStop 0x1008FF15 -+#define XF86XK_AudioPrev 0x1008FF16 -+#define XF86XK_AudioNext 0x1008FF17 -+#define XF86XK_HomePage 0x1008FF18 -+#define XF86XK_Mail 0x1008FF19 -+#define XF86XK_Start 0x1008FF1A -+#define XF86XK_Search 0x1008FF1B -+#define XF86XK_AudioRecord 0x1008FF1C -+#define XF86XK_Calculator 0x1008FF1D -+#define XF86XK_Memo 0x1008FF1E -+#define XF86XK_ToDoList 0x1008FF1F -+#define XF86XK_Calendar 0x1008FF20 -+#define XF86XK_PowerDown 0x1008FF21 -+#define XF86XK_ContrastAdjust 0x1008FF22 -+#define XF86XK_Back 0x1008FF26 -+#define XF86XK_Forward 0x1008FF27 -+#define XF86XK_Stop 0x1008FF28 -+#define XF86XK_Refresh 0x1008FF29 -+#define XF86XK_PowerOff 0x1008FF2A -+#define XF86XK_WakeUp 0x1008FF2B -+#define XF86XK_Eject 0x1008FF2C -+#define XF86XK_ScreenSaver 0x1008FF2D -+#define XF86XK_WWW 0x1008FF2E -+#define XF86XK_Sleep 0x1008FF2F -+#define XF86XK_Favorites 0x1008FF30 -+#define XF86XK_AudioPause 0x1008FF31 -+#define XF86XK_AudioMedia 0x1008FF32 -+#define XF86XK_MyComputer 0x1008FF33 -+#define XF86XK_LightBulb 0x1008FF35 -+#define XF86XK_Shop 0x1008FF36 -+#define XF86XK_History 0x1008FF37 -+#define XF86XK_OpenURL 0x1008FF38 -+#define XF86XK_AddFavorite 0x1008FF39 -+#define XF86XK_HotLinks 0x1008FF3A -+#define XF86XK_BrightnessAdjust 0x1008FF3B -+#define XF86XK_Finance 0x1008FF3C -+#define XF86XK_Community 0x1008FF3D -+#define XF86XK_AudioRewind 0x1008FF3E -+#define XF86XK_BackForward 0x1008FF3F -+#define XF86XK_Launch0 0x1008FF40 -+#define XF86XK_Launch1 0x1008FF41 -+#define XF86XK_Launch2 0x1008FF42 -+#define XF86XK_Launch3 0x1008FF43 -+#define XF86XK_Launch4 0x1008FF44 -+#define XF86XK_Launch5 0x1008FF45 -+#define XF86XK_Launch6 0x1008FF46 -+#define XF86XK_Launch7 0x1008FF47 -+#define XF86XK_Launch8 0x1008FF48 -+#define XF86XK_Launch9 0x1008FF49 -+#define XF86XK_LaunchA 0x1008FF4A -+#define XF86XK_LaunchB 0x1008FF4B -+#define XF86XK_LaunchC 0x1008FF4C -+#define XF86XK_LaunchD 0x1008FF4D -+#define XF86XK_LaunchE 0x1008FF4E -+#define XF86XK_LaunchF 0x1008FF4F -+#define XF86XK_ApplicationLeft 0x1008FF50 -+#define XF86XK_ApplicationRight 0x1008FF51 -+#define XF86XK_Book 0x1008FF52 -+#define XF86XK_CD 0x1008FF53 -+#define XF86XK_Calculater 0x1008FF54 -+#define XF86XK_Clear 0x1008FF55 -+#define XF86XK_ClearGrab 0x1008FE21 -+#define XF86XK_Close 0x1008FF56 -+#define XF86XK_Copy 0x1008FF57 -+#define XF86XK_Cut 0x1008FF58 -+#define XF86XK_Display 0x1008FF59 -+#define XF86XK_DOS 0x1008FF5A -+#define XF86XK_Documents 0x1008FF5B -+#define XF86XK_Excel 0x1008FF5C -+#define XF86XK_Explorer 0x1008FF5D -+#define XF86XK_Game 0x1008FF5E -+#define XF86XK_Go 0x1008FF5F -+#define XF86XK_iTouch 0x1008FF60 -+#define XF86XK_LogOff 0x1008FF61 -+#define XF86XK_Market 0x1008FF62 -+#define XF86XK_Meeting 0x1008FF63 -+#define XF86XK_MenuKB 0x1008FF65 -+#define XF86XK_MenuPB 0x1008FF66 -+#define XF86XK_MySites 0x1008FF67 -+#define XF86XK_News 0x1008FF69 -+#define XF86XK_OfficeHome 0x1008FF6A -+#define XF86XK_Option 0x1008FF6C -+#define XF86XK_Paste 0x1008FF6D -+#define XF86XK_Phone 0x1008FF6E -+#define XF86XK_Reply 0x1008FF72 -+#define XF86XK_Reload 0x1008FF73 -+#define XF86XK_RotateWindows 0x1008FF74 -+#define XF86XK_RotationPB 0x1008FF75 -+#define XF86XK_RotationKB 0x1008FF76 -+#define XF86XK_Save 0x1008FF77 -+#define XF86XK_Send 0x1008FF7B -+#define XF86XK_Spell 0x1008FF7C -+#define XF86XK_SplitScreen 0x1008FF7D -+#define XF86XK_Support 0x1008FF7E -+#define XF86XK_TaskPane 0x1008FF7F -+#define XF86XK_Terminal 0x1008FF80 -+#define XF86XK_Tools 0x1008FF81 -+#define XF86XK_Travel 0x1008FF82 -+#define XF86XK_Video 0x1008FF87 -+#define XF86XK_Word 0x1008FF89 -+#define XF86XK_Xfer 0x1008FF8A -+#define XF86XK_ZoomIn 0x1008FF8B -+#define XF86XK_ZoomOut 0x1008FF8C -+#define XF86XK_Away 0x1008FF8D -+#define XF86XK_Messenger 0x1008FF8E -+#define XF86XK_WebCam 0x1008FF8F -+#define XF86XK_MailForward 0x1008FF90 -+#define XF86XK_Pictures 0x1008FF91 -+#define XF86XK_Music 0x1008FF92 -+#define XF86XK_Battery 0x1008FF93 -+#define XF86XK_Bluetooth 0x1008FF94 -+#define XF86XK_WLAN 0x1008FF95 -+#define XF86XK_UWB 0x1008FF96 -+#define XF86XK_AudioForward 0x1008FF97 -+#define XF86XK_AudioRepeat 0x1008FF98 -+#define XF86XK_AudioRandomPlay 0x1008FF99 -+#define XF86XK_Subtitle 0x1008FF9A -+#define XF86XK_AudioCycleTrack 0x1008FF9B -+#define XF86XK_Time 0x1008FF9F -+#define XF86XK_Select 0x1008FFA0 -+#define XF86XK_View 0x1008FFA1 -+#define XF86XK_TopMenu 0x1008FFA2 -+#define XF86XK_Suspend 0x1008FFA7 -+#define XF86XK_Hibernate 0x1008FFA8 -+ -+ - // end of XF86keysyms.h - - // Special keys used by Qtopia, mapped into the X11 private keypad range. -@@ -942,10 +1039,8 @@ static const unsigned int KeyTbl[] = { - XK_dead_hook, Qt::Key_Dead_Hook, - XK_dead_horn, Qt::Key_Dead_Horn, - -- // Special multimedia keys -- // currently only tested with MS internet keyboard -- -- // browsing keys -+ // Special keys from X.org - This include multimedia keys, -+ // wireless/bluetooth/uwb keys, special launcher keys, etc. - XF86XK_Back, Qt::Key_Back, - XF86XK_Forward, Qt::Key_Forward, - XF86XK_Stop, Qt::Key_Stop, -@@ -955,8 +1050,6 @@ static const unsigned int KeyTbl[] = { - XF86XK_OpenURL, Qt::Key_OpenUrl, - XF86XK_HomePage, Qt::Key_HomePage, - XF86XK_Search, Qt::Key_Search, -- -- // media keys - XF86XK_AudioLowerVolume, Qt::Key_VolumeDown, - XF86XK_AudioMute, Qt::Key_VolumeMute, - XF86XK_AudioRaiseVolume, Qt::Key_VolumeUp, -@@ -965,13 +1058,106 @@ static const unsigned int KeyTbl[] = { - XF86XK_AudioPrev, Qt::Key_MediaPrevious, - XF86XK_AudioNext, Qt::Key_MediaNext, - XF86XK_AudioRecord, Qt::Key_MediaRecord, -- -- // launch keys - XF86XK_Mail, Qt::Key_LaunchMail, - XF86XK_MyComputer, Qt::Key_Launch0, -- XF86XK_Calculator, Qt::Key_Launch1, -+ XF86XK_Calculator, Qt::Key_Calculator, -+ XF86XK_Memo, Qt::Key_Memo, -+ XF86XK_ToDoList, Qt::Key_ToDoList, -+ XF86XK_Calendar, Qt::Key_Calendar, -+ XF86XK_PowerDown, Qt::Key_PowerDown, -+ XF86XK_ContrastAdjust, Qt::Key_ContrastAdjust, - XF86XK_Standby, Qt::Key_Standby, -- -+ XF86XK_MonBrightnessUp, Qt::Key_MonBrightnessUp, -+ XF86XK_MonBrightnessDown, Qt::Key_MonBrightnessDown, -+ XF86XK_KbdLightOnOff, Qt::Key_KeyboardLightOnOff, -+ XF86XK_KbdBrightnessUp, Qt::Key_KeyboardBrightnessUp, -+ XF86XK_KbdBrightnessDown, Qt::Key_KeyboardBrightnessDown, -+ XF86XK_PowerOff, Qt::Key_PowerOff, -+ XF86XK_WakeUp, Qt::Key_WakeUp, -+ XF86XK_Eject, Qt::Key_Eject, -+ XF86XK_ScreenSaver, Qt::Key_ScreenSaver, -+ XF86XK_WWW, Qt::Key_WWW, -+ XF86XK_Sleep, Qt::Key_Sleep, -+ XF86XK_LightBulb, Qt::Key_LightBulb, -+ XF86XK_Shop, Qt::Key_Shop, -+ XF86XK_History, Qt::Key_History, -+ XF86XK_AddFavorite, Qt::Key_AddFavorite, -+ XF86XK_HotLinks, Qt::Key_HotLinks, -+ XF86XK_BrightnessAdjust, Qt::Key_BrightnessAdjust, -+ XF86XK_Finance, Qt::Key_Finance, -+ XF86XK_Community, Qt::Key_Community, -+ XF86XK_AudioRewind, Qt::Key_AudioRewind, -+ XF86XK_BackForward, Qt::Key_BackForward, -+ XF86XK_ApplicationLeft, Qt::Key_ApplicationLeft, -+ XF86XK_ApplicationRight, Qt::Key_ApplicationRight, -+ XF86XK_Book, Qt::Key_Book, -+ XF86XK_CD, Qt::Key_CD, -+ XF86XK_Calculater, Qt::Key_Calculator, -+ XF86XK_Clear, Qt::Key_Clear, -+ XF86XK_ClearGrab, Qt::Key_ClearGrab, -+ XF86XK_Close, Qt::Key_Close, -+ XF86XK_Copy, Qt::Key_Copy, -+ XF86XK_Cut, Qt::Key_Cut, -+ XF86XK_Display, Qt::Key_Display, -+ XF86XK_DOS, Qt::Key_DOS, -+ XF86XK_Documents, Qt::Key_Documents, -+ XF86XK_Excel, Qt::Key_Excel, -+ XF86XK_Explorer, Qt::Key_Explorer, -+ XF86XK_Game, Qt::Key_Game, -+ XF86XK_Go, Qt::Key_Go, -+ XF86XK_iTouch, Qt::Key_iTouch, -+ XF86XK_LogOff, Qt::Key_LogOff, -+ XF86XK_Market, Qt::Key_Market, -+ XF86XK_Meeting, Qt::Key_Meeting, -+ XF86XK_MenuKB, Qt::Key_MenuKB, -+ XF86XK_MenuPB, Qt::Key_MenuPB, -+ XF86XK_MySites, Qt::Key_MySites, -+ XF86XK_News, Qt::Key_News, -+ XF86XK_OfficeHome, Qt::Key_OfficeHome, -+ XF86XK_Option, Qt::Key_Option, -+ XF86XK_Paste, Qt::Key_Paste, -+ XF86XK_Phone, Qt::Key_Phone, -+ XF86XK_Reply, Qt::Key_Reply, -+ XF86XK_Reload, Qt::Key_Reload, -+ XF86XK_RotateWindows, Qt::Key_RotateWindows, -+ XF86XK_RotationPB, Qt::Key_RotationPB, -+ XF86XK_RotationKB, Qt::Key_RotationKB, -+ XF86XK_Save, Qt::Key_Save, -+ XF86XK_Send, Qt::Key_Send, -+ XF86XK_Spell, Qt::Key_Spell, -+ XF86XK_SplitScreen, Qt::Key_SplitScreen, -+ XF86XK_Support, Qt::Key_Support, -+ XF86XK_TaskPane, Qt::Key_TaskPane, -+ XF86XK_Terminal, Qt::Key_Terminal, -+ XF86XK_Tools, Qt::Key_Tools, -+ XF86XK_Travel, Qt::Key_Travel, -+ XF86XK_Video, Qt::Key_Video, -+ XF86XK_Word, Qt::Key_Word, -+ XF86XK_Xfer, Qt::Key_Xfer, -+ XF86XK_ZoomIn, Qt::Key_ZoomIn, -+ XF86XK_ZoomOut, Qt::Key_ZoomOut, -+ XF86XK_Away, Qt::Key_Away, -+ XF86XK_Messenger, Qt::Key_Messenger, -+ XF86XK_WebCam, Qt::Key_WebCam, -+ XF86XK_MailForward, Qt::Key_MailForward, -+ XF86XK_Pictures, Qt::Key_Pictures, -+ XF86XK_Music, Qt::Key_Music, -+ XF86XK_Battery, Qt::Key_Battery, -+ XF86XK_Bluetooth, Qt::Key_Bluetooth, -+ XF86XK_WLAN, Qt::Key_WLAN, -+ XF86XK_UWB, Qt::Key_UWB, -+ XF86XK_AudioForward, Qt::Key_AudioForward, -+ XF86XK_AudioRepeat, Qt::Key_AudioRepeat, -+ XF86XK_AudioRandomPlay, Qt::Key_AudioRandomPlay, -+ XF86XK_Subtitle, Qt::Key_Subtitle, -+ XF86XK_AudioCycleTrack, Qt::Key_AudioCycleTrack, -+ XF86XK_Time, Qt::Key_Time, -+ XF86XK_Select, Qt::Key_Select, -+ XF86XK_View, Qt::Key_View, -+ XF86XK_TopMenu, Qt::Key_TopMenu, -+ XF86XK_Bluetooth, Qt::Key_Bluetooth, -+ XF86XK_Suspend, Qt::Key_Suspend, -+ XF86XK_Hibernate, Qt::Key_Hibernate, - XF86XK_Launch0, Qt::Key_Launch2, - XF86XK_Launch1, Qt::Key_Launch3, - XF86XK_Launch2, Qt::Key_Launch4, -diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp -index 894f663..665c058 100644 ---- a/src/gui/kernel/qkeysequence.cpp -+++ b/src/gui/kernel/qkeysequence.cpp -@@ -396,47 +396,139 @@ static const struct { - { Qt::Key_Menu, QT_TRANSLATE_NOOP("QShortcut", "Menu") }, - { Qt::Key_Help, QT_TRANSLATE_NOOP("QShortcut", "Help") }, - -- // Multimedia keys -- { Qt::Key_Back, QT_TRANSLATE_NOOP("QShortcut", "Back") }, -- { Qt::Key_Forward, QT_TRANSLATE_NOOP("QShortcut", "Forward") }, -- { Qt::Key_Stop, QT_TRANSLATE_NOOP("QShortcut", "Stop") }, -- { Qt::Key_Refresh, QT_TRANSLATE_NOOP("QShortcut", "Refresh") }, -- { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP("QShortcut", "Volume Down") }, -- { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP("QShortcut", "Volume Mute") }, -- { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP("QShortcut", "Volume Up") }, -- { Qt::Key_BassBoost, QT_TRANSLATE_NOOP("QShortcut", "Bass Boost") }, -- { Qt::Key_BassUp, QT_TRANSLATE_NOOP("QShortcut", "Bass Up") }, -- { Qt::Key_BassDown, QT_TRANSLATE_NOOP("QShortcut", "Bass Down") }, -- { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP("QShortcut", "Treble Up") }, -- { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP("QShortcut", "Treble Down") }, -- { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP("QShortcut", "Media Play") }, -- { Qt::Key_MediaStop, QT_TRANSLATE_NOOP("QShortcut", "Media Stop") }, -- { Qt::Key_MediaPrevious,QT_TRANSLATE_NOOP("QShortcut", "Media Previous") }, -- { Qt::Key_MediaNext, QT_TRANSLATE_NOOP("QShortcut", "Media Next") }, -- { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP("QShortcut", "Media Record") }, -- { Qt::Key_HomePage, QT_TRANSLATE_NOOP("QShortcut", "Home Page") }, -- { Qt::Key_Favorites, QT_TRANSLATE_NOOP("QShortcut", "Favorites") }, -- { Qt::Key_Search, QT_TRANSLATE_NOOP("QShortcut", "Search") }, -- { Qt::Key_Standby, QT_TRANSLATE_NOOP("QShortcut", "Standby") }, -- { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP("QShortcut", "Open URL") }, -- { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP("QShortcut", "Launch Mail") }, -- { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP("QShortcut", "Launch Media") }, -- { Qt::Key_Launch0, QT_TRANSLATE_NOOP("QShortcut", "Launch (0)") }, -- { Qt::Key_Launch1, QT_TRANSLATE_NOOP("QShortcut", "Launch (1)") }, -- { Qt::Key_Launch2, QT_TRANSLATE_NOOP("QShortcut", "Launch (2)") }, -- { Qt::Key_Launch3, QT_TRANSLATE_NOOP("QShortcut", "Launch (3)") }, -- { Qt::Key_Launch4, QT_TRANSLATE_NOOP("QShortcut", "Launch (4)") }, -- { Qt::Key_Launch5, QT_TRANSLATE_NOOP("QShortcut", "Launch (5)") }, -- { Qt::Key_Launch6, QT_TRANSLATE_NOOP("QShortcut", "Launch (6)") }, -- { Qt::Key_Launch7, QT_TRANSLATE_NOOP("QShortcut", "Launch (7)") }, -- { Qt::Key_Launch8, QT_TRANSLATE_NOOP("QShortcut", "Launch (8)") }, -- { Qt::Key_Launch9, QT_TRANSLATE_NOOP("QShortcut", "Launch (9)") }, -- { Qt::Key_LaunchA, QT_TRANSLATE_NOOP("QShortcut", "Launch (A)") }, -- { Qt::Key_LaunchB, QT_TRANSLATE_NOOP("QShortcut", "Launch (B)") }, -- { Qt::Key_LaunchC, QT_TRANSLATE_NOOP("QShortcut", "Launch (C)") }, -- { Qt::Key_LaunchD, QT_TRANSLATE_NOOP("QShortcut", "Launch (D)") }, -- { Qt::Key_LaunchE, QT_TRANSLATE_NOOP("QShortcut", "Launch (E)") }, -- { Qt::Key_LaunchF, QT_TRANSLATE_NOOP("QShortcut", "Launch (F)") }, -+ // Special keys -+ // Includes multimedia, launcher, lan keys ( bluetooth, wireless ) -+ // window navigation -+ { Qt::Key_Back, QT_TRANSLATE_NOOP("QShortcut", "Back") }, -+ { Qt::Key_Forward, QT_TRANSLATE_NOOP("QShortcut", "Forward") }, -+ { Qt::Key_Stop, QT_TRANSLATE_NOOP("QShortcut", "Stop") }, -+ { Qt::Key_Refresh, QT_TRANSLATE_NOOP("QShortcut", "Refresh") }, -+ { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP("QShortcut", "Volume Down") }, -+ { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP("QShortcut", "Volume Mute") }, -+ { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP("QShortcut", "Volume Up") }, -+ { Qt::Key_BassBoost, QT_TRANSLATE_NOOP("QShortcut", "Bass Boost") }, -+ { Qt::Key_BassUp, QT_TRANSLATE_NOOP("QShortcut", "Bass Up") }, -+ { Qt::Key_BassDown, QT_TRANSLATE_NOOP("QShortcut", "Bass Down") }, -+ { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP("QShortcut", "Treble Up") }, -+ { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP("QShortcut", "Treble Down") }, -+ { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP("QShortcut", "Media Play") }, -+ { Qt::Key_MediaStop, QT_TRANSLATE_NOOP("QShortcut", "Media Stop") }, -+ { Qt::Key_MediaPrevious, QT_TRANSLATE_NOOP("QShortcut", "Media Previous") }, -+ { Qt::Key_MediaNext, QT_TRANSLATE_NOOP("QShortcut", "Media Next") }, -+ { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP("QShortcut", "Media Record") }, -+ { Qt::Key_HomePage, QT_TRANSLATE_NOOP("QShortcut", "Home Page") }, -+ { Qt::Key_Favorites, QT_TRANSLATE_NOOP("QShortcut", "Favorites") }, -+ { Qt::Key_Search, QT_TRANSLATE_NOOP("QShortcut", "Search") }, -+ { Qt::Key_Standby, QT_TRANSLATE_NOOP("QShortcut", "Standby") }, -+ { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP("QShortcut", "Open URL") }, -+ { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP("QShortcut", "Launch Mail") }, -+ { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP("QShortcut", "Launch Media") }, -+ { Qt::Key_Launch0, QT_TRANSLATE_NOOP("QShortcut", "Launch (0)") }, -+ { Qt::Key_Launch1, QT_TRANSLATE_NOOP("QShortcut", "Launch (1)") }, -+ { Qt::Key_Launch2, QT_TRANSLATE_NOOP("QShortcut", "Launch (2)") }, -+ { Qt::Key_Launch3, QT_TRANSLATE_NOOP("QShortcut", "Launch (3)") }, -+ { Qt::Key_Launch4, QT_TRANSLATE_NOOP("QShortcut", "Launch (4)") }, -+ { Qt::Key_Launch5, QT_TRANSLATE_NOOP("QShortcut", "Launch (5)") }, -+ { Qt::Key_Launch6, QT_TRANSLATE_NOOP("QShortcut", "Launch (6)") }, -+ { Qt::Key_Launch7, QT_TRANSLATE_NOOP("QShortcut", "Launch (7)") }, -+ { Qt::Key_Launch8, QT_TRANSLATE_NOOP("QShortcut", "Launch (8)") }, -+ { Qt::Key_Launch9, QT_TRANSLATE_NOOP("QShortcut", "Launch (9)") }, -+ { Qt::Key_LaunchA, QT_TRANSLATE_NOOP("QShortcut", "Launch (A)") }, -+ { Qt::Key_LaunchB, QT_TRANSLATE_NOOP("QShortcut", "Launch (B)") }, -+ { Qt::Key_LaunchC, QT_TRANSLATE_NOOP("QShortcut", "Launch (C)") }, -+ { Qt::Key_LaunchD, QT_TRANSLATE_NOOP("QShortcut", "Launch (D)") }, -+ { Qt::Key_LaunchE, QT_TRANSLATE_NOOP("QShortcut", "Launch (E)") }, -+ { Qt::Key_LaunchF, QT_TRANSLATE_NOOP("QShortcut", "Launch (F)") }, -+ { Qt::Key_MonBrightnessUp, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Up") }, -+ { Qt::Key_MonBrightnessDown, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Down") }, -+ { Qt::Key_KeyboardLightOnOff, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Light On/Off") }, -+ { Qt::Key_KeyboardBrightnessUp, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Brightness Up") }, -+ { Qt::Key_KeyboardBrightnessDown, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Brightness Down") }, -+ { Qt::Key_PowerOff, QT_TRANSLATE_NOOP("QShortcut", "Power Off") }, -+ { Qt::Key_WakeUp, QT_TRANSLATE_NOOP("QShortcut", "Wake Up") }, -+ { Qt::Key_Eject, QT_TRANSLATE_NOOP("QShortcut", "Eject") }, -+ { Qt::Key_ScreenSaver, QT_TRANSLATE_NOOP("QShortcut", "Screensaver") }, -+ { Qt::Key_WWW, QT_TRANSLATE_NOOP("QShortcut", "WWW") }, -+ { Qt::Key_Sleep, QT_TRANSLATE_NOOP("QShortcut", "Sleep") }, -+ { Qt::Key_LightBulb, QT_TRANSLATE_NOOP("QShortcut", "LightBulb") }, -+ { Qt::Key_Shop, QT_TRANSLATE_NOOP("QShortcut", "Shop") }, -+ { Qt::Key_History, QT_TRANSLATE_NOOP("QShortcut", "History") }, -+ { Qt::Key_AddFavorite, QT_TRANSLATE_NOOP("QShortcut", "Add Favorite") }, -+ { Qt::Key_HotLinks, QT_TRANSLATE_NOOP("QShortcut", "Hot Links") }, -+ { Qt::Key_BrightnessAdjust, QT_TRANSLATE_NOOP("QShortcut", "Adjust Brightness") }, -+ { Qt::Key_Finance, QT_TRANSLATE_NOOP("QShortcut", "Finance") }, -+ { Qt::Key_Community, QT_TRANSLATE_NOOP("QShortcut", "Community") }, -+ { Qt::Key_AudioRewind, QT_TRANSLATE_NOOP("QShortcut", "Audio Rewind") }, -+ { Qt::Key_BackForward, QT_TRANSLATE_NOOP("QShortcut", "Back Forward") }, -+ { Qt::Key_ApplicationLeft, QT_TRANSLATE_NOOP("QShortcut", "Application Left") }, -+ { Qt::Key_ApplicationRight, QT_TRANSLATE_NOOP("QShortcut", "Application Right") }, -+ { Qt::Key_Book, QT_TRANSLATE_NOOP("QShortcut", "Book") }, -+ { Qt::Key_CD, QT_TRANSLATE_NOOP("QShortcut", "CD") }, -+ { Qt::Key_Calculator, QT_TRANSLATE_NOOP("QShortcut", "Calculator") }, -+ { Qt::Key_Clear, QT_TRANSLATE_NOOP("QShortcut", "Clear") }, -+ { Qt::Key_ClearGrab, QT_TRANSLATE_NOOP("QShortcut", "Clear Grab") }, -+ { Qt::Key_Close, QT_TRANSLATE_NOOP("QShortcut", "Close") }, -+ { Qt::Key_Copy, QT_TRANSLATE_NOOP("QShortcut", "Copy") }, -+ { Qt::Key_Cut, QT_TRANSLATE_NOOP("QShortcut", "Cut") }, -+ { Qt::Key_Display, QT_TRANSLATE_NOOP("QShortcut", "Display") }, -+ { Qt::Key_DOS, QT_TRANSLATE_NOOP("QShortcut", "DOS") }, -+ { Qt::Key_Documents, QT_TRANSLATE_NOOP("QShortcut", "Documents") }, -+ { Qt::Key_Excel, QT_TRANSLATE_NOOP("QShortcut", "Spreadsheet") }, -+ { Qt::Key_Explorer, QT_TRANSLATE_NOOP("QShortcut", "Browser") }, -+ { Qt::Key_Game, QT_TRANSLATE_NOOP("QShortcut", "Game") }, -+ { Qt::Key_Go, QT_TRANSLATE_NOOP("QShortcut", "Go") }, -+ { Qt::Key_iTouch, QT_TRANSLATE_NOOP("QShortcut", "iTouch") }, -+ { Qt::Key_LogOff, QT_TRANSLATE_NOOP("QShortcut", "Logoff") }, -+ { Qt::Key_Market, QT_TRANSLATE_NOOP("QShortcut", "Market") }, -+ { Qt::Key_Meeting, QT_TRANSLATE_NOOP("QShortcut", "Meeting") }, -+ { Qt::Key_MenuKB, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Menu") }, -+ { Qt::Key_MenuPB, QT_TRANSLATE_NOOP("QShortcut", "Menu PB") }, -+ { Qt::Key_MySites, QT_TRANSLATE_NOOP("QShortcut", "My Sites") }, -+ { Qt::Key_News, QT_TRANSLATE_NOOP("QShortcut", "News") }, -+ { Qt::Key_OfficeHome, QT_TRANSLATE_NOOP("QShortcut", "Home Office") }, -+ { Qt::Key_Option, QT_TRANSLATE_NOOP("QShortcut", "Option") }, -+ { Qt::Key_Paste, QT_TRANSLATE_NOOP("QShortcut", "Paste") }, -+ { Qt::Key_Phone, QT_TRANSLATE_NOOP("QShortcut", "Phone") }, -+ { Qt::Key_Reply, QT_TRANSLATE_NOOP("QShortcut", "Reply") }, -+ { Qt::Key_Reload, QT_TRANSLATE_NOOP("QShortcut", "Reload") }, -+ { Qt::Key_RotateWindows, QT_TRANSLATE_NOOP("QShortcut", "Rotate Windows") }, -+ { Qt::Key_RotationPB, QT_TRANSLATE_NOOP("QShortcut", "Rotation PB") }, -+ { Qt::Key_RotationKB, QT_TRANSLATE_NOOP("QShortcut", "Rotation KB") }, -+ { Qt::Key_Save, QT_TRANSLATE_NOOP("QShortcut", "Save") }, -+ { Qt::Key_Send, QT_TRANSLATE_NOOP("QShortcut", "Send") }, -+ { Qt::Key_Spell, QT_TRANSLATE_NOOP("QShortcut", "Spellchecker") }, -+ { Qt::Key_SplitScreen, QT_TRANSLATE_NOOP("QShortcut", "Split Screen") }, -+ { Qt::Key_Support, QT_TRANSLATE_NOOP("QShortcut", "Support") }, -+ { Qt::Key_TaskPane, QT_TRANSLATE_NOOP("QShortcut", "Task Panel") }, -+ { Qt::Key_Terminal, QT_TRANSLATE_NOOP("QShortcut", "Terminal") }, -+ { Qt::Key_Tools, QT_TRANSLATE_NOOP("QShortcut", "Tools") }, -+ { Qt::Key_Travel, QT_TRANSLATE_NOOP("QShortcut", "Travel") }, -+ { Qt::Key_Video, QT_TRANSLATE_NOOP("QShortcut", "Video") }, -+ { Qt::Key_Word, QT_TRANSLATE_NOOP("QShortcut", "Word Processor") }, -+ { Qt::Key_Xfer, QT_TRANSLATE_NOOP("QShortcut", "XFer") }, -+ { Qt::Key_ZoomIn, QT_TRANSLATE_NOOP("QShortcut", "Zoom In") }, -+ { Qt::Key_ZoomOut, QT_TRANSLATE_NOOP("QShortcut", "Zoom Out") }, -+ { Qt::Key_Away, QT_TRANSLATE_NOOP("QShortcut", "Away") }, -+ { Qt::Key_Messenger, QT_TRANSLATE_NOOP("QShortcut", "Messenger") }, -+ { Qt::Key_WebCam, QT_TRANSLATE_NOOP("QShortcut", "WebCam") }, -+ { Qt::Key_MailForward, QT_TRANSLATE_NOOP("QShortcut", "Mail Forward") }, -+ { Qt::Key_Pictures, QT_TRANSLATE_NOOP("QShortcut", "Pictures") }, -+ { Qt::Key_Music, QT_TRANSLATE_NOOP("QShortcut", "Music") }, -+ { Qt::Key_Battery, QT_TRANSLATE_NOOP("QShortcut", "Battery") }, -+ { Qt::Key_Bluetooth, QT_TRANSLATE_NOOP("QShortcut", "Bluetooth") }, -+ { Qt::Key_WLAN, QT_TRANSLATE_NOOP("QShortcut", "Wireless") }, -+ { Qt::Key_UWB, QT_TRANSLATE_NOOP("QShortcut", "Ultra Wide Band") }, -+ { Qt::Key_AudioForward, QT_TRANSLATE_NOOP("QShortcut", "Audio Forward") }, -+ { Qt::Key_AudioRepeat, QT_TRANSLATE_NOOP("QShortcut", "Audio Repeat") }, -+ { Qt::Key_AudioRandomPlay, QT_TRANSLATE_NOOP("QShortcut", "Audio Random Play") }, -+ { Qt::Key_Subtitle, QT_TRANSLATE_NOOP("QShortcut", "Subtitle") }, -+ { Qt::Key_AudioCycleTrack, QT_TRANSLATE_NOOP("QShortcut", "Audio Cycle Track") }, -+ { Qt::Key_Time, QT_TRANSLATE_NOOP("QShortcut", "Time") }, -+ { Qt::Key_Select, QT_TRANSLATE_NOOP("QShortcut", "Select") }, -+ { Qt::Key_View, QT_TRANSLATE_NOOP("QShortcut", "View") }, -+ { Qt::Key_TopMenu, QT_TRANSLATE_NOOP("QShortcut", "Top Menu") }, -+ { Qt::Key_Suspend, QT_TRANSLATE_NOOP("QShortcut", "Suspend") }, -+ { Qt::Key_Hibernate, QT_TRANSLATE_NOOP("QShortcut", "Hibernate") }, - - // -------------------------------------------------------------- - // More consistent namings diff --git a/kde-qt-patches.sh b/kde-qt-patches.sh new file mode 100644 index 0000000..47cee3e --- /dev/null +++ b/kde-qt-patches.sh @@ -0,0 +1,4 @@ +# quick-n-dirty method to fetch patches from -patched git branch +# unfortunately, requires an already checked-out copy of the git repo + +git format-patch --output-directory kde-qt-patches v4.5.3..4.5.3-patched diff --git a/qt-copy-patches-svn_checkout.sh b/qt-copy-patches-svn_checkout.sh deleted file mode 100755 index 281fbc7..0000000 --- a/qt-copy-patches-svn_checkout.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -DATE=$(date +%Y%m%d) -EXPORT_DIR=qt-copy - -set -x -rm -rf $EXPORT_DIR - -# trunk tracking qt-4.5 now -SVN_ROOT=svn://anonsvn.kde.org/home/kde/trunk/qt-copy - -svn export --non-recursive $SVN_ROOT $EXPORT_DIR/ -svn export $SVN_ROOT/patches $EXPORT_DIR/patches - -pushd $EXPORT_DIR -rm -f ../qt-copy-patches-${DATE}svn.tar.bz2 -tar cjf ../qt-copy-patches-${DATE}svn.tar.bz2 \ - .applied_patches apply_patches README.qt-copy patches/ -popd - -# cleanup -rm -rf $EXPORT_DIR - diff --git a/qt-x11-opensource-src-4.5.2-CVE-2009-1725.patch b/qt-x11-opensource-src-4.5.2-CVE-2009-1725.patch deleted file mode 100644 index 0ad9224..0000000 --- a/qt-x11-opensource-src-4.5.2-CVE-2009-1725.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp.orig qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp ---- qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp.orig 2009-08-18 12:28:26.000000000 +0200 -+++ qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp 2009-08-18 12:33:43.000000000 +0200 -@@ -867,7 +867,9 @@ HTMLTokenizer::State HTMLTokenizer::pars - } - } else { - // FIXME: We should eventually colorize entities by sending them as a special token. -- checkBuffer(11); -+ // 12 bytes required: up to 10 bytes in m_cBuffer plus the -+ // leading '&' and trailing ';' -+ checkBuffer(12); - *dest++ = '&'; - for (unsigned i = 0; i < cBufferPos; i++) - dest[i] = m_cBuffer[i]; -@@ -878,7 +880,9 @@ HTMLTokenizer::State HTMLTokenizer::pars - } - } - } else { -- checkBuffer(10); -+ // 11 bytes required: up to 10 bytes in m_cBuffer plus the -+ // leading '&' -+ checkBuffer(11); - // ignore the sequence, add it to the buffer as plaintext - *dest++ = '&'; - for (unsigned i = 0; i < cBufferPos; i++) diff --git a/qt-x11-opensource-src-4.5.2-CVE-2009-2700.patch b/qt-x11-opensource-src-4.5.2-CVE-2009-2700.patch deleted file mode 100644 index 1e45226..0000000 --- a/qt-x11-opensource-src-4.5.2-CVE-2009-2700.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.2/src/network/ssl/qsslcertificate.cpp.orig qt-x11-opensource-src-4.5.2/src/network/ssl/qsslcertificate.cpp ---- qt-x11-opensource-src-4.5.2/src/network/ssl/qsslcertificate.cpp.orig 2009-08-31 16:46:48.000000000 +0200 -+++ qt-x11-opensource-src-4.5.2/src/network/ssl/qsslcertificate.cpp 2009-08-31 16:49:47.000000000 +0200 -@@ -377,7 +377,7 @@ QMultiMap(q_ASN1_STRING_data(genName->d.ia5)); -- const QString altName = QLatin1String(QByteArray(altNameStr, len)); -+ const QString altName = QString::fromLatin1(altNameStr, len); - if (genName->type == GEN_DNS) - result.insert(QSsl::DnsEntry, altName); - else if (genName->type == GEN_EMAIL) diff --git a/qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch b/qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch deleted file mode 100644 index 6a16e97..0000000 --- a/qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp -index 4caf336..b21a3fe 100644 ---- qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp -+++ qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp -@@ -44,6 +44,7 @@ - #include "XMLTokenizer.h" - #include "markup.h" - #include -+#include - - namespace WebCore { - -diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/page/DragController.cpp qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/page/DragController.cpp -index 10a11f2..c756da8 100644 ---- qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/page/DragController.cpp -+++ qt-x11-opensource-src-4.5.2/src/3rdparty/webkit/WebCore/page/DragController.cpp -@@ -157,7 +157,7 @@ void DragController::dragExited(DragData* dragData) - Frame* mainFrame = m_page->mainFrame(); - - if (RefPtr v = mainFrame->view()) { -- ClipboardAccessPolicy policy = m_document->securityOrigin()->isLocal() ? ClipboardReadable : ClipboardTypesReadable; -+ ClipboardAccessPolicy policy = (!m_document || m_document->securityOrigin()->isLocal()) ? ClipboardReadable : ClipboardTypesReadable; - RefPtr clipboard = dragData->createClipboard(policy); - clipboard->setSourceOperation(dragData->draggingSourceOperationMask()); - mainFrame->eventHandler()->cancelDragAndDrop(createMouseEvent(dragData), clipboard.get()); --- -1.6.2.5 - diff --git a/qt-x11-opensource-src-4.5.2-ossl10.patch b/qt-x11-opensource-src-4.5.2-ossl10.patch deleted file mode 100644 index f57b1df..0000000 --- a/qt-x11-opensource-src-4.5.2-ossl10.patch +++ /dev/null @@ -1,157 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.2/src/network/ssl/qsslcertificate.cpp.openssl qt-x11-opensource-src-4.5.2/src/network/ssl/qsslcertificate.cpp ---- qt-x11-opensource-src-4.5.2/src/network/ssl/qsslcertificate.cpp.openssl 2009-06-20 06:57:57.000000000 +0200 -+++ qt-x11-opensource-src-4.5.2/src/network/ssl/qsslcertificate.cpp 2009-08-26 12:14:32.000000000 +0200 -@@ -362,7 +362,7 @@ QMultiMapx509) - return result; - -- STACK *altNames = (STACK *)q_X509_get_ext_d2i(d->x509, NID_subject_alt_name, 0, 0); -+ STACK_OF(GENERAL_NAME) *altNames = (STACK_OF(GENERAL_NAME) *)q_X509_get_ext_d2i(d->x509, NID_subject_alt_name, 0, 0); - - if (altNames) { - for (int i = 0; i < q_sk_GENERAL_NAME_num(altNames); ++i) { -@@ -383,7 +383,7 @@ QMultiMaptype == GEN_EMAIL) - result.insert(QSsl::EmailEntry, altName); - } -- q_sk_free(altNames); -+ q_sk_free((STACK *)altNames); - } - - return result; -diff -up qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl.cpp.openssl qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl.cpp ---- qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl.cpp.openssl 2009-06-20 06:57:57.000000000 +0200 -+++ qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl.cpp 2009-08-26 10:40:09.000000000 +0200 -@@ -911,7 +911,7 @@ QSslCipher QSslSocketBackendPrivate::ses - { - if (!ssl || !ctx) - return QSslCipher(); -- SSL_CIPHER *sessionCipher = q_SSL_get_current_cipher(ssl); -+ SSL_CIPHER *sessionCipher = (SSL_CIPHER *)q_SSL_get_current_cipher(ssl); - return sessionCipher ? QSslCipher_from_SSL_CIPHER(sessionCipher) : QSslCipher(); - } - -diff -up qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl_symbols.cpp.openssl qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl_symbols.cpp ---- qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl_symbols.cpp.openssl 2009-08-26 10:36:25.000000000 +0200 -+++ qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl_symbols.cpp 2009-08-26 12:40:30.000000000 +0200 -@@ -144,10 +144,10 @@ DEFINEFUNC(int, RAND_status, void, DUMMY - DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG) - DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG) - DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return) --DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return) -+DEFINEFUNC2(OSSL_SKVALUE_RTYPE *, sk_value, STACK *a, a, int b, b, return 0, return) - DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return) - DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return) --DEFINEFUNC3(char *, SSL_CIPHER_description, SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return) -+DEFINEFUNC3(char *, SSL_CIPHER_description, OSSL_MORECONST SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return) - DEFINEFUNC(int, SSL_connect, SSL *a, a, return -1, return) - #if OPENSSL_VERSION_NUMBER >= 0x00908000L - // 0.9.8 broke SC and BC by changing this function's signature. -@@ -157,7 +157,7 @@ DEFINEFUNC(int, SSL_CTX_check_private_ke - #endif - DEFINEFUNC4(long, SSL_CTX_ctrl, SSL_CTX *a, a, int b, b, long c, c, void *d, d, return -1, return) - DEFINEFUNC(void, SSL_CTX_free, SSL_CTX *a, a, return, DUMMYARG) --DEFINEFUNC(SSL_CTX *, SSL_CTX_new, SSL_METHOD *a, a, return 0, return) -+DEFINEFUNC(SSL_CTX *, SSL_CTX_new, OSSL_MORECONST SSL_METHOD *a, a, return 0, return) - DEFINEFUNC2(int, SSL_CTX_set_cipher_list, SSL_CTX *a, a, const char *b, b, return -1, return) - DEFINEFUNC(int, SSL_CTX_set_default_verify_paths, SSL_CTX *a, a, return -1, return) - DEFINEFUNC3(void, SSL_CTX_set_verify, SSL_CTX *a, a, int b, b, int (*c)(int, X509_STORE_CTX *), c, return, DUMMYARG) -@@ -174,7 +174,7 @@ DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_g - #else - DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, SSL *a, a, return 0, return) - #endif --DEFINEFUNC(SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return 0, return) -+DEFINEFUNC(OSSL_MORECONST SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return 0, return) - DEFINEFUNC2(int, SSL_get_error, SSL *a, a, int b, b, return -1, return) - DEFINEFUNC(STACK_OF(X509) *, SSL_get_peer_cert_chain, SSL *a, a, return 0, return) - DEFINEFUNC(X509 *, SSL_get_peer_certificate, SSL *a, a, return 0, return) -@@ -192,14 +192,14 @@ DEFINEFUNC3(void, SSL_set_bio, SSL *a, a - DEFINEFUNC(void, SSL_set_accept_state, SSL *a, a, return, DUMMYARG) - DEFINEFUNC(void, SSL_set_connect_state, SSL *a, a, return, DUMMYARG) - DEFINEFUNC(int, SSL_shutdown, SSL *a, a, return -1, return) --DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return) --DEFINEFUNC(SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return) --DEFINEFUNC(SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return) --DEFINEFUNC(SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return) --DEFINEFUNC(SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return) --DEFINEFUNC(SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return) --DEFINEFUNC(SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return) --DEFINEFUNC(SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return) -+DEFINEFUNC(OSSL_MORECONST SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return) -+DEFINEFUNC(OSSL_MORECONST SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return) -+DEFINEFUNC(OSSL_MORECONST SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return) -+DEFINEFUNC(OSSL_MORECONST SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return) -+DEFINEFUNC(OSSL_MORECONST SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return) -+DEFINEFUNC(OSSL_MORECONST SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return) -+DEFINEFUNC(OSSL_MORECONST SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return) -+DEFINEFUNC(OSSL_MORECONST SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return) - DEFINEFUNC3(int, SSL_write, SSL *a, a, const void *b, b, int c, c, return -1, return) - DEFINEFUNC2(int, X509_cmp, X509 *a, a, X509 *b, b, return -1, return) - #ifndef SSLEAY_MACROS -diff -up qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl_symbols_p.h.openssl qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl_symbols_p.h ---- qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl_symbols_p.h.openssl 2009-06-20 06:57:57.000000000 +0200 -+++ qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl_symbols_p.h 2009-08-26 10:35:25.000000000 +0200 -@@ -254,12 +254,20 @@ int q_PEM_write_bio_RSA_PUBKEY(BIO *a, R - void q_RAND_seed(const void *a, int b); - int q_RAND_status(); - void q_RSA_free(RSA *a); -+#if OPENSSL_VERSION_NUMBER >= 0x10000000L -+#define STACK _STACK -+#define OSSL_SKVALUE_RTYPE void -+#define OSSL_MORECONST const -+#else -+#define OSSL_SKVALUE_RTYPE char -+#define OSSL_MORECONST -+#endif - void q_sk_free(STACK *a); - int q_sk_num(STACK *a); --char * q_sk_value(STACK *a, int b); -+OSSL_SKVALUE_RTYPE * q_sk_value(STACK *a, int b); - int q_SSL_accept(SSL *a); - int q_SSL_clear(SSL *a); --char *q_SSL_CIPHER_description(SSL_CIPHER *a, char *b, int c); -+char *q_SSL_CIPHER_description(OSSL_MORECONST SSL_CIPHER *a, char *b, int c); - int q_SSL_connect(SSL *a); - #if OPENSSL_VERSION_NUMBER >= 0x00908000L - // 0.9.8 broke SC and BC by changing this function's signature. -@@ -269,7 +277,7 @@ int q_SSL_CTX_check_private_key(SSL_CTX - #endif - long q_SSL_CTX_ctrl(SSL_CTX *a, int b, long c, void *d); - void q_SSL_CTX_free(SSL_CTX *a); --SSL_CTX *q_SSL_CTX_new(SSL_METHOD *a); -+SSL_CTX *q_SSL_CTX_new(OSSL_MORECONST SSL_METHOD *a); - int q_SSL_CTX_set_cipher_list(SSL_CTX *a, const char *b); - int q_SSL_CTX_set_default_verify_paths(SSL_CTX *a); - void q_SSL_CTX_set_verify(SSL_CTX *a, int b, int (*c)(int, X509_STORE_CTX *)); -@@ -286,7 +294,7 @@ STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers( - #else - STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(SSL *a); - #endif --SSL_CIPHER *q_SSL_get_current_cipher(SSL *a); -+OSSL_MORECONST SSL_CIPHER *q_SSL_get_current_cipher(SSL *a); - int q_SSL_get_error(SSL *a, int b); - STACK_OF(X509) *q_SSL_get_peer_cert_chain(SSL *a); - X509 *q_SSL_get_peer_certificate(SSL *a); -@@ -304,14 +312,14 @@ void q_SSL_set_bio(SSL *a, BIO *b, BIO * - void q_SSL_set_accept_state(SSL *a); - void q_SSL_set_connect_state(SSL *a); - int q_SSL_shutdown(SSL *a); --SSL_METHOD *q_SSLv2_client_method(); --SSL_METHOD *q_SSLv3_client_method(); --SSL_METHOD *q_SSLv23_client_method(); --SSL_METHOD *q_TLSv1_client_method(); --SSL_METHOD *q_SSLv2_server_method(); --SSL_METHOD *q_SSLv3_server_method(); --SSL_METHOD *q_SSLv23_server_method(); --SSL_METHOD *q_TLSv1_server_method(); -+OSSL_MORECONST SSL_METHOD *q_SSLv2_client_method(); -+OSSL_MORECONST SSL_METHOD *q_SSLv3_client_method(); -+OSSL_MORECONST SSL_METHOD *q_SSLv23_client_method(); -+OSSL_MORECONST SSL_METHOD *q_TLSv1_client_method(); -+OSSL_MORECONST SSL_METHOD *q_SSLv2_server_method(); -+OSSL_MORECONST SSL_METHOD *q_SSLv3_server_method(); -+OSSL_MORECONST SSL_METHOD *q_SSLv23_server_method(); -+OSSL_MORECONST SSL_METHOD *q_TLSv1_server_method(); - int q_SSL_write(SSL *a, const void *b, int c); - int q_X509_cmp(X509 *a, X509 *b); - #ifdef SSLEAY_MACROS diff --git a/qt-x11-opensource-src-4.5.2-system_ca_certificates.patch b/qt-x11-opensource-src-4.5.2-system_ca_certificates.patch deleted file mode 100644 index 7284020..0000000 --- a/qt-x11-opensource-src-4.5.2-system_ca_certificates.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl.cpp.me qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl.cpp ---- qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl.cpp.me 2009-09-09 14:28:38.000000000 +0200 -+++ qt-x11-opensource-src-4.5.2/src/network/ssl/qsslsocket_openssl.cpp 2009-09-09 15:00:07.000000000 +0200 -@@ -482,31 +482,20 @@ void QSslSocketPrivate::resetDefaultCiph - - QList QSslSocketPrivate::systemCaCertificates() - { --#ifdef QQ_OS_UNIX -+ QFile caBundle; -+ -+#ifdef Q_OS_UNIX - // Check known locations for the system's default bundle. ### On Windows, - // we should use CAPI to find the bundle, and not rely on default unix - // locations. -- const char *standardLocations[] = {"/etc/ssl/certs/", --#if 0 -- // KDE uses KConfig for its SSL store, -- // but it also stores the bundle at -- // this location -- "$HOME/.kde/share/apps/kssl/ca-bundle.crt", --#endif -- 0}; -- const char **it = standardLocations; -- QStringList nameFilter; -- nameFilter << QLatin1String("*.pem") << QLatin1String("*.crt"); -- while (*it) { -- if (QDirIterator(QLatin1String(*it), nameFilter).hasNext()) -- return certificatesFromPath(QLatin1String(*it)); -- ++it; -- } -+ caBundle.setFileName(QLatin1String("/etc/pki/tls/certs/ca-bundle.crt")); -+ if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text)) -+ return QSslCertificate::fromDevice(&caBundle); - #endif - - // Qt provides a default bundle when we cannot detect the system's default - // bundle. -- QFile caBundle(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt")); -+ caBundle.setFileName(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt")); - if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text)) - return QSslCertificate::fromDevice(&caBundle); - diff --git a/qt-x11-opensource-src-4.5.2-timestamp.patch b/qt-x11-opensource-src-4.5.2-timestamp.patch deleted file mode 100644 index 696e8a8..0000000 --- a/qt-x11-opensource-src-4.5.2-timestamp.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 9e5fa633913ef952ca4ef5312fe396bcfc885321 Mon Sep 17 00:00:00 2001 -From: Denis Dzyubenko -Date: Wed, 22 Jul 2009 17:12:17 +0200 -Subject: [PATCH] Revert "Added a check that X11 timestamp goes forward only." - -In some cases we might get an invalid timestamp that is far away in -the future, so remembering it will break all consequent X calls that -require a timestamp because it just contains junk (for example -clipboard will stop working). This happens with XIM+SCIM pair - -whenever we start input method and type something to the widget, we -get a XKeyPress event with a commited string, however the 'serial' and -'time' members of the XEvent structure are not initialized (according -to valgrind) and contain junk. - -This reverts commit 2ed015b8a0ffad63f0f59b0e2255057f416895fb. - -Reviewed-By: Brad ---- - src/gui/kernel/qapplication_x11.cpp | 35 +++++++++++++++-------------------- - 1 files changed, 15 insertions(+), 20 deletions(-) - -diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp -index 163ceb6..abedfd6 100644 ---- a/src/gui/kernel/qapplication_x11.cpp -+++ b/src/gui/kernel/qapplication_x11.cpp -@@ -3142,48 +3142,43 @@ int QApplication::x11ProcessEvent(XEvent* event) - #ifdef ALIEN_DEBUG - //qDebug() << "QApplication::x11ProcessEvent:" << event->type; - #endif -- Time time = 0, userTime = 0; - switch (event->type) { - case ButtonPress: - pressed_window = event->xbutton.window; -- userTime = event->xbutton.time; -+ X11->userTime = event->xbutton.time; - // fallthrough intended - case ButtonRelease: -- time = event->xbutton.time; -+ X11->time = event->xbutton.time; - break; - case MotionNotify: -- time = event->xmotion.time; -+ X11->time = event->xmotion.time; - break; - case XKeyPress: -- userTime = event->xkey.time; -+ X11->userTime = event->xkey.time; - // fallthrough intended - case XKeyRelease: -- time = event->xkey.time; -+ X11->time = event->xkey.time; - break; - case PropertyNotify: -- time = event->xproperty.time; -+ X11->time = event->xproperty.time; - break; - case EnterNotify: - case LeaveNotify: -- time = event->xcrossing.time; -+ X11->time = event->xcrossing.time; - break; - case SelectionClear: -- time = event->xselectionclear.time; -+ X11->time = event->xselectionclear.time; - break; - default: --#ifndef QT_NO_XFIXES -- if (X11->use_xfixes && event->type == (X11->xfixes_eventbase + XFixesSelectionNotify)) { -- XFixesSelectionNotifyEvent *req = -- reinterpret_cast(event); -- time = req->selection_timestamp; -- } --#endif - break; - } -- if (time > X11->time) -- X11->time = time; -- if (userTime > X11->userTime) -- X11->userTime = userTime; -+#ifndef QT_NO_XFIXES -+ if (X11->use_xfixes && event->type == (X11->xfixes_eventbase + XFixesSelectionNotify)) { -+ XFixesSelectionNotifyEvent *req = -+ reinterpret_cast(event); -+ X11->time = req->selection_timestamp; -+ } -+#endif - - QETWidget *widget = (QETWidget*)QWidget::find((WId)event->xany.window); - --- -1.6.1 - diff --git a/qt-x11-opensource-src-4.5.3-system_ca_certificates.patch b/qt-x11-opensource-src-4.5.3-system_ca_certificates.patch new file mode 100644 index 0000000..2dfa554 --- /dev/null +++ b/qt-x11-opensource-src-4.5.3-system_ca_certificates.patch @@ -0,0 +1,25 @@ +diff -up qt-x11-opensource-src-4.5.3/src/network/ssl/qsslsocket_openssl.cpp.system_ca_certificates qt-x11-opensource-src-4.5.3/src/network/ssl/qsslsocket_openssl.cpp +--- qt-x11-opensource-src-4.5.3/src/network/ssl/qsslsocket_openssl.cpp.system_ca_certificates 2009-09-29 06:01:38.000000000 -0500 ++++ qt-x11-opensource-src-4.5.3/src/network/ssl/qsslsocket_openssl.cpp 2009-10-02 11:20:10.674662746 -0500 +@@ -482,8 +482,20 @@ void QSslSocketPrivate::resetDefaultCiph + + QList QSslSocketPrivate::systemCaCertificates() + { ++ ++ QFile caBundle; ++ ++#ifdef Q_OS_UNIX ++ // Check known locations for the system's default bundle. ### On Windows, ++ // we should use CAPI to find the bundle, and not rely on default unix ++ // locations. ++ caBundle.setFileName(QLatin1String("/etc/pki/tls/certs/ca-bundle.crt")); ++ if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text)) ++ return QSslCertificate::fromDevice(&caBundle); ++#endif ++ + // Qt provides a default bundle of certificates +- QFile caBundle(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt")); ++ caBundle.setFileName(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt")); + if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text)) + return QSslCertificate::fromDevice(&caBundle); + diff --git a/qt.spec b/qt.spec index 2915089..7354b17 100644 --- a/qt.spec +++ b/qt.spec @@ -9,14 +9,14 @@ Summary: Qt toolkit Name: qt Epoch: 1 -Version: 4.5.2 -Release: 25%{?dist} +Version: 4.5.3 +Release: 4%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions Group: System Environment/Libraries Url: http://www.qtsoftware.com/ -Source0: ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-%{version}.tar.bz2 +Source0: ftp://ftp.qt.nokia.com/qt/source/qt-x11-opensource-src-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: qt4 < %{version}-%{release} Provides: qt4 = %{version}-%{release} @@ -42,7 +42,7 @@ Patch17: qt-x11-opensource-src-4.5.2-pulseaudio.patch Patch19: qt-x11-opensource-src-4.5.1-phonon.patch Patch21: qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch # use system ca-bundle certs, http://bugzilla.redhat.com/521911 -Patch22: qt-x11-opensource-src-4.5.2-system_ca_certificates.patch +Patch22: qt-x11-opensource-src-4.5.3-system_ca_certificates.patch Requires: ca-certificates # disable JavaScriptCore JIT as it crashes with SE Linux # http://bugzilla.redhat.com/527079 @@ -57,21 +57,30 @@ 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 -Patch55: qt-x11-opensource-src-4.5.2-timestamp.patch -# compile with openssl-1.0 -Patch56: qt-x11-opensource-src-4.5.2-ossl10.patch -## upstream/security patches -Patch100: qt-x11-opensource-src-4.5.2-CVE-2009-1725.patch -Patch101: qt-x11-opensource-src-4.5.2-CVE-2009-2700.patch -Patch102: qt-x11-opensource-src-4.5.2-fix-webkit-drag-crash.patch +# security patches + +# kde-qt git patches +Patch201: 0001-This-patch-uses-object-name-as-a-fallback-for-window.patch +Patch202: 0002-This-patch-makes-override-redirect-windows-popup-me.patch +Patch203: 0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch +Patch204: 0004-This-patch-adds-support-for-using-isystem-to-allow.patch +Patch205: 0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch +Patch206: 0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch +Patch207: 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch +Patch208: 0008-In-a-treeview-with-columns-like-this.patch +Patch209: 0009-This-patch-fixes-deserialization-of-values-with-cust.patch +Patch210: 0010-Import-README.qt-copy-from-the-original-qt-copy.patch +Patch211: 0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch +Patch212: 0274-shm-native-image-fix.patch +Patch213: 0015-Make-QMenu-respect-the-minimum-width-set.patch +Patch214: 0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch +Patch215: 0017-Add-context-to-tr-calls-in-QShortcut.patch -# switch to kde-qt branches, qt-copy doesn't exist anymore -Patch200: kde-qt-patches-20090820git.patch # these patches are not merged yet in kde-qt branches -Patch201: 0118-qtcopy-define.diff -Patch202: 0283-do-not-deduce-scrollbar-extent-twice.diff -Patch203: 0285-qgv-dontshowchildren.diff +Patch301: 0118-qtcopy-define.diff +Patch302: 0283-do-not-deduce-scrollbar-extent-twice.diff +Patch303: 0285-qgv-dontshowchildren.diff Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg Source11: hi16-phonon-gstreamer.png @@ -370,19 +379,30 @@ Qt libraries used for drawing widgets and OpenGL items. %patch52 -p1 -b .sparc64 %patch53 -p1 -b .qatomic-inline-asm %patch54 -p1 -b .mysql_config -%patch55 -p1 -b .timestamp -%patch56 -p1 -b .ossl10 -# upstream/security fixes -%patch100 -p1 -b .CVE-2009-1725 -%patch101 -p1 -b .CVE-2009-2700 -%patch102 -p1 -b .webkit_drag_crash +# security fixes # kde-qt branch -%patch200 -p1 -b .kde-qt-patches-20090820git -%patch201 -p0 -b .0118-qtcopy-define -%patch202 -p0 -b .0283-do-not-deduce-scrollbar-extent-twice -%patch203 -p0 -b .0285-qgv-dontshowchildren +%patch201 -p1 -b .kde-qt-0001 +%patch202 -p1 -b .kde-qt-0002 +%patch203 -p1 -b .kde-qt-0003 +%patch204 -p1 -b .kde-qt-0004 +%patch205 -p1 -b .kde-qt-0005 +%patch206 -p1 -b .kde-qt-0006 +%patch207 -p1 -b .kde-qt-0007 +%patch208 -p1 -b .kde-qt-0008 +%patch209 -p1 -b .kde-qt-0009 +%patch210 -p1 -b .kde-qt-0010 +%patch211 -p1 -b .kde-qt-0011 +%patch212 -p1 -b .0274-shm-native-image-fix +%patch213 -p1 -b .kde-qt-0015 +%patch214 -p1 -b .kde-qt-0016 +%patch215 -p1 -b .kde-qt-0017 + +# not yet merged ones +%patch301 -p0 -b .0118-qtcopy-define +%patch302 -p0 -b .0283-do-not-deduce-scrollbar-extent-twice +%patch303 -p0 -b .0285-qgv-dontshowchildren # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -419,8 +439,11 @@ if [ "%{_lib}" == "lib64" ] ; then sed -i -e "s,/lib /usr/lib,/%{_lib} /usr/%{_lib},g" config.tests/{unix,x11}/*.test fi -# let syncqt to create new header -rm -rf include +# let makefile create missing .qm files, the .qm files should be included in qt upstream +for f in translations/*.ts ; do + touch ${f%.ts}.qm +done + %build @@ -485,6 +508,9 @@ rm -rf include make %{?_smp_mflags} +# recreate .qm files +LD_LIBRARY_PATH=`pwd`/lib bin/lrelease translations/*.ts + %install rm -rf %{buildroot} @@ -528,6 +554,7 @@ sed -i -e "s|^QMAKE_PRL_LIBS|#QMAKE_PRL_LIBS|" %{buildroot}%{_qt4_libdir}/*.prl # .la files, die, die, die. rm -f %{buildroot}%{_qt4_libdir}/lib*.la + %if 0 #if "%{_qt4_docdir}" != "%{_qt4_prefix}/doc" # -doc make symbolic link to _qt4_docdir @@ -943,19 +970,21 @@ fi %changelog -* Fri Oct 09 2009 Rex Dieter - 4.5.2-25 -- qt webkit crash on drag (#528094) - -* Tue Oct 06 2009 Jaroslav Reznik - 4.5.2-24 -- disable JavaScriptCore JIT, SE Linux crashes (#527079) - -* Sun Oct 04 2009 Than Ngo - 4.5.2-23 +* Sat Oct 10 2009 Than Ngo - 4.5.3-4 +- fix translation build issue - rhel cleanup -* Sat Oct 03 2009 Rex Dieter - 4.5.2-22 +* Tue Oct 06 2009 Jaroslav Reznik - 4.5.3-3 +- disable JavaScriptCore JIT, SE Linux crashes (#527079) + +* Fri Oct 02 2009 Than Ngo - 4.5.3-2 +- cleanup patches - if ! phonon_internal, exclude more/all phonon headers - qt-devel must Requires: phonon-devel (#520323) +* Thu Oct 01 2009 Rex Dieter - 4.5.3-1 +- qt-4.5.3 + * Tue Sep 29 2009 Rex Dieter - 4.5.2-21 - switch to external/kde phonon diff --git a/sources b/sources index 1d95bf9..d8e2350 100644 --- a/sources +++ b/sources @@ -1,10 +1,10 @@ d9f511e4b51983b4e10eb58b320416d5 hi128-app-qt4-logo.png 6dcc0672ff9e60a6b83f95c5f42bec5b hi48-app-qt4-logo.png 8e3924f417fea67f72b2105faed2119c gstreamer-logo.svg -28a7e8ac9805a6f614d2a27ee1a6ac9d qt-x11-opensource-src-4.5.2.tar.bz2 60de9d7e1cddd019f09fd036f0e5413a hi128-phonon-gstreamer.png 7ca265e0cf75b3b4c81e1490d3dba3be hi16-phonon-gstreamer.png 0a9f69d901aded140d4fed969c22e14f hi22-phonon-gstreamer.png 12db12c009b722a6dc141f78feb7e330 hi32-phonon-gstreamer.png 86c34a1b81d44980b1381f94ed6b7a23 hi48-phonon-gstreamer.png 153505c71ec021b0a3bd4b74f2492e93 hi64-phonon-gstreamer.png +3988cf9af68be2df8a8000ede231de9b qt-x11-opensource-src-4.5.3.tar.gz From 68e79c4091072c9631b0d0f0dbff09cf24d80ada Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 14 Oct 2009 18:18:36 +0000 Subject: [PATCH 08/41] - drop needless Prereq: /etc/ld.so.conf.d --- qt.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qt.spec b/qt.spec index 7354b17..2d16c84 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.3 -Release: 4%{?dist} +Release: 5%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -141,7 +141,9 @@ Source31: hi48-app-qt4-logo.png %define _qt4_sysconfdir %{_sysconfdir} %define _qt4_translationdir %{_datadir}/qt4/translations +%if "%{_qt4_libdir}" != "%{_libdir}" Prereq: /etc/ld.so.conf.d +%endif BuildRequires: dbus-devel >= 0.62 BuildRequires: cups-devel @@ -970,6 +972,9 @@ fi %changelog +* Wed Oct 14 2009 Rex Dieter 4.5.3-5 +- drop needless Prereq: /etc/ld.so.conf.d + * Sat Oct 10 2009 Than Ngo - 4.5.3-4 - fix translation build issue - rhel cleanup From 696b9b5698761b2900540553f12f781f641fd54d Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Fri, 16 Oct 2009 08:26:03 +0000 Subject: [PATCH 09/41] - subpackage sqlite plugin, add Require on qt-sqlite in qt-x11 for assistant --- qt.spec | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/qt.spec b/qt.spec index 2d16c84..fb47827 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.3 -Release: 5%{?dist} +Release: 6%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -203,10 +203,6 @@ Obsoletes: qgtkstyle < 0.1 Provides: qgtkstyle = 0.1-1 Obsoletes: qt4-config < 4.5.0 Provides: qt4-config = %{version}-%{release} -Obsoletes: qt4-sqlite < 4.5.0 -Provides: qt4-sqlite = %{version}-%{release} -Obsoletes: qt-sqlite < %{?epoch:%{epoch}:}4.5.0 -Provides: qt-sqlite = %{?epoch:%{epoch}:}%{version}-%{release} %description Qt is a software toolkit for developing applications. @@ -330,6 +326,17 @@ Provides: qt4-postgresql = %{version}-%{release} %description postgresql %{summary}. +%package sqlite +Summary: SQLite driver for Qt's SQL classes +Group: System Environment/Libraries +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: qt4-SQLite < %{version}-%{release} +Provides: qt4-SQLite = %{version}-%{release} +Obsoletes: qt4-sqlite < %{version}-%{release} +Provides: qt4-sqlite = %{version}-%{release} + +%description sqlite +%{summary}. %package x11 Summary: Qt GUI-related libraries @@ -347,6 +354,9 @@ Provides: qt4-phonon = %{version}-%{release} Obsoletes: WebKit-qt < 1.0.0-1 Provides: WebKit-qt = 1.0.0-1 %endif +%if 0%{?sqlite:1} +Requires: %{name}-sqlite = %{?epoch:%{epoch}:}%{version}-%{release} +%endif Provides: qt4-assistant = %{version}-%{release} Provides: %{name}-assistant = %{version}-%{release} Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} @@ -810,7 +820,6 @@ fi %{_qt4_libdir}/libQtXmlPatterns.so.* %dir %{_qt4_plugindir} %dir %{_qt4_plugindir}/sqldrivers/ -%{_qt4_plugindir}/sqldrivers/libqsqlite* %{_qt4_translationdir}/ %if 0%{?demos} @@ -934,6 +943,12 @@ fi %{_qt4_plugindir}/sqldrivers/libqsqlpsql* %endif +%if "%{?sqlite}" == "-plugin-sql-sqlite" +%files sqlite +%defattr(-,root,root,-) +%{_qt4_plugindir}/sqldrivers/libqsqlite* +%endif + %files x11 %defattr(-,root,root,-) %{_sysconfdir}/rpm/macros.* @@ -972,6 +987,10 @@ fi %changelog +* Fri Oct 16 2009 Than Ngo - 4.5.3-6 +- subpackage sqlite plugin, add Require on qt-sqlite in qt-x11 + for assistant + * Wed Oct 14 2009 Rex Dieter 4.5.3-5 - drop needless Prereq: /etc/ld.so.conf.d From 8369052adaf32dc543068336be8b250ee5a38048 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 19 Oct 2009 15:47:59 +0000 Subject: [PATCH 10/41] comment about Phonon symlink needed by qtscriptgenerator --- qt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt.spec b/qt.spec index fb47827..4a46882 100644 --- a/qt.spec +++ b/qt.spec @@ -691,7 +691,7 @@ mkdir %{buildroot}%{_qt4_plugindir}/styles %if 0%{?phonon_internal} mkdir -p %{buildroot}%{_qt4_plugindir}/phonon_backend -# This should no longer be required, but... -- Rex +# needed by qtscriptgenerator pushd %{buildroot}%{_qt4_headerdir} ln -s phonon Phonon popd From f47f9459f4b5dc35bf0f1b25be04591465b149a8 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Thu, 29 Oct 2009 15:40:22 +0000 Subject: [PATCH 11/41] - fix glib-even-loop issue, regression which causes password dialogs get stuck --- qt-x11-opensource-src-4.5.3-glib-event-loop.patch | 11 +++++++++++ qt.spec | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 qt-x11-opensource-src-4.5.3-glib-event-loop.patch diff --git a/qt-x11-opensource-src-4.5.3-glib-event-loop.patch b/qt-x11-opensource-src-4.5.3-glib-event-loop.patch new file mode 100644 index 0000000..580f027 --- /dev/null +++ b/qt-x11-opensource-src-4.5.3-glib-event-loop.patch @@ -0,0 +1,11 @@ +diff -up qt-x11-opensource-src-4.5.3/src/corelib/kernel/qeventdispatcher_glib.cpp.than qt-x11-opensource-src-4.5.3/src/corelib/kernel/qeventdispatcher_glib.cpp +--- qt-x11-opensource-src-4.5.3/src/corelib/kernel/qeventdispatcher_glib.cpp.than 2009-10-29 16:15:58.000000000 +0100 ++++ qt-x11-opensource-src-4.5.3/src/corelib/kernel/qeventdispatcher_glib.cpp 2009-10-29 16:16:22.000000000 +0100 +@@ -263,7 +263,6 @@ QEventDispatcherGlibPrivate::QEventDispa + (void) new (&timerSource->timerList) QTimerInfoList(); + timerSource->processEventsFlags = QEventLoop::AllEvents; + g_source_set_can_recurse(&timerSource->source, true); +- g_source_set_priority(&timerSource->source, G_PRIORITY_DEFAULT_IDLE); + g_source_attach(&timerSource->source, mainContext); + } + diff --git a/qt.spec b/qt.spec index 4a46882..a0070df 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.3 -Release: 6%{?dist} +Release: 7%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -57,6 +57,7 @@ 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 +Patch55: qt-x11-opensource-src-4.5.3-glib-event-loop.patch # security patches @@ -391,6 +392,7 @@ Qt libraries used for drawing widgets and OpenGL items. %patch52 -p1 -b .sparc64 %patch53 -p1 -b .qatomic-inline-asm %patch54 -p1 -b .mysql_config +%patch55 -p1 -b .glib-event-loop # security fixes @@ -987,6 +989,10 @@ fi %changelog +* Thu Oct 29 2009 Than Ngo - 4.5.3-7 +- fix glib-even-loop issue, regression which causes + Password dialogs get stuck + * Fri Oct 16 2009 Than Ngo - 4.5.3-6 - subpackage sqlite plugin, add Require on qt-sqlite in qt-x11 for assistant From c3defef04221cbad459c76b4d3660ea1ac4108c8 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 30 Oct 2009 12:01:23 +0000 Subject: [PATCH 12/41] - use upstream qeventdispatcher_glib_fix.diff (kde#210171) --- qeventdispatcher_glib_fix.diff | 282 +++++++++++++++++++++++++++++++++ qt.spec | 13 +- 2 files changed, 292 insertions(+), 3 deletions(-) create mode 100644 qeventdispatcher_glib_fix.diff diff --git a/qeventdispatcher_glib_fix.diff b/qeventdispatcher_glib_fix.diff new file mode 100644 index 0000000..482c0a3 --- /dev/null +++ b/qeventdispatcher_glib_fix.diff @@ -0,0 +1,282 @@ +commit 063bded33b417cdf92fd51366fc7fdb06dea00ba +Author: Bradley T. Hughes +Date: Wed Sep 23 13:51:17 2009 +0200 + + Fix regressions in qeventloop, qtimer, and qsocketnotifier autotests + + Commit ed375675d4a4f6fd63edeb242e23c87b3de4be6f triggers a behavior in + Glib's mainloop implementation where some event sources are not + "serviced" every iteration of the mainloop context. This breaks an + invariant that many tests relied on, so we need to solve the problem. + + The invariant is that a newly added timer that would normally fire on + the next pass of the event loop (liker a zero timer) SHOULD actually + fire. We do this by registering 2 timer event sources with Glib's + mainloop: one normal priority source and one idle priority source. The + idle priority source is the one that will send events most of the + time, with the normal priority one taking over only when + processEvents() is called manually. + + Task-number: QT-877 + Reviewed-by: jbache + Reviewed-by: thiago + Reviewed-by: denis + (cherry picked from commit d0d0fdb8e46351b4ab8492de31e5363ef6662b57) + (cherry picked from commit 0ed23e95fa756fd851f509a565f91ab43fc30449) + +diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp +index 87e9728..7f6dbb6 100644 +--- a/src/corelib/kernel/qeventdispatcher_glib.cpp ++++ b/src/corelib/kernel/qeventdispatcher_glib.cpp +@@ -127,16 +127,11 @@ struct GTimerSource + GSource source; + QTimerInfoList timerList; + QEventLoop::ProcessEventsFlags processEventsFlags; ++ bool runWithIdlePriority; + }; + +-static gboolean timerSourcePrepare(GSource *source, gint *timeout) ++static gboolean timerSourcePrepareHelper(GTimerSource *src, gint *timeout) + { +- gint dummy; +- if (!timeout) +- timeout = &dummy; +- +- GTimerSource *src = reinterpret_cast(source); +- + timeval tv = { 0l, 0l }; + if (!(src->processEventsFlags & QEventLoop::X11ExcludeTimers) && src->timerList.timerWait(tv)) + *timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000); +@@ -146,10 +141,8 @@ static gboolean timerSourcePrepare(GSource *source, gint *timeout) + return (*timeout == 0); + } + +-static gboolean timerSourceCheck(GSource *source) ++static gboolean timerSourceCheckHelper(GTimerSource *src) + { +- GTimerSource *src = reinterpret_cast(source); +- + if (src->timerList.isEmpty() + || (src->processEventsFlags & QEventLoop::X11ExcludeTimers)) + return false; +@@ -160,9 +153,35 @@ static gboolean timerSourceCheck(GSource *source) + return true; + } + ++static gboolean timerSourcePrepare(GSource *source, gint *timeout) ++{ ++ gint dummy; ++ if (!timeout) ++ timeout = &dummy; ++ ++ GTimerSource *src = reinterpret_cast(source); ++ if (src->runWithIdlePriority) { ++ if (timeout) ++ *timeout = -1; ++ return false; ++ } ++ ++ return timerSourcePrepareHelper(src, timeout); ++} ++ ++static gboolean timerSourceCheck(GSource *source) ++{ ++ GTimerSource *src = reinterpret_cast(source); ++ if (src->runWithIdlePriority) ++ return false; ++ return timerSourceCheckHelper(src); ++} ++ + static gboolean timerSourceDispatch(GSource *source, GSourceFunc, gpointer) + { +- (void) reinterpret_cast(source)->timerList.activateTimers(); ++ GTimerSource *timerSource = reinterpret_cast(source); ++ timerSource->runWithIdlePriority = true; ++ (void) timerSource->timerList.activateTimers(); + return true; // ??? don't remove, right again? + } + +@@ -175,6 +194,53 @@ static GSourceFuncs timerSourceFuncs = { + NULL + }; + ++struct GIdleTimerSource ++{ ++ GSource source; ++ GTimerSource *timerSource; ++}; ++ ++static gboolean idleTimerSourcePrepare(GSource *source, gint *timeout) ++{ ++ GIdleTimerSource *idleTimerSource = reinterpret_cast(source); ++ GTimerSource *timerSource = idleTimerSource->timerSource; ++ if (!timerSource->runWithIdlePriority) { ++ // Yield to the normal priority timer source ++ if (timeout) ++ *timeout = -1; ++ return false; ++ } ++ ++ return timerSourcePrepareHelper(timerSource, timeout); ++} ++ ++static gboolean idleTimerSourceCheck(GSource *source) ++{ ++ GIdleTimerSource *idleTimerSource = reinterpret_cast(source); ++ GTimerSource *timerSource = idleTimerSource->timerSource; ++ if (!timerSource->runWithIdlePriority) { ++ // Yield to the normal priority timer source ++ return false; ++ } ++ return timerSourceCheckHelper(timerSource); ++} ++ ++static gboolean idleTimerSourceDispatch(GSource *source, GSourceFunc, gpointer) ++{ ++ GTimerSource *timerSource = reinterpret_cast(source)->timerSource; ++ (void) timerSourceDispatch(&timerSource->source, 0, 0); ++ return true; ++} ++ ++static GSourceFuncs idleTimerSourceFuncs = { ++ idleTimerSourcePrepare, ++ idleTimerSourceCheck, ++ idleTimerSourceDispatch, ++ NULL, ++ NULL, ++ NULL ++}; ++ + struct GPostEventSource + { + GSource source; +@@ -235,14 +301,15 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) + g_main_context_ref(mainContext); + } else { + QCoreApplication *app = QCoreApplication::instance(); +- if (app && QThread::currentThread() == app->thread()) { +- mainContext = g_main_context_default(); +- g_main_context_ref(mainContext); +- } else { +- mainContext = g_main_context_new(); +- } ++ if (app && QThread::currentThread() == app->thread()) { ++ mainContext = g_main_context_default(); ++ g_main_context_ref(mainContext); ++ } else { ++ mainContext = g_main_context_new(); ++ } + } + ++ // setup post event source + postEventSource = reinterpret_cast(g_source_new(&postEventSourceFuncs, + sizeof(GPostEventSource))); + postEventSource->serialNumber = 1; +@@ -257,14 +324,21 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) + g_source_set_can_recurse(&socketNotifierSource->source, true); + g_source_attach(&socketNotifierSource->source, mainContext); + +- // setup timerSource ++ // setup normal and idle timer sources + timerSource = reinterpret_cast(g_source_new(&timerSourceFuncs, + sizeof(GTimerSource))); + (void) new (&timerSource->timerList) QTimerInfoList(); + timerSource->processEventsFlags = QEventLoop::AllEvents; ++ timerSource->runWithIdlePriority = false; + g_source_set_can_recurse(&timerSource->source, true); +- g_source_set_priority(&timerSource->source, G_PRIORITY_DEFAULT_IDLE); + g_source_attach(&timerSource->source, mainContext); ++ ++ idleTimerSource = reinterpret_cast(g_source_new(&idleTimerSourceFuncs, ++ sizeof(GIdleTimerSource))); ++ idleTimerSource->timerSource = timerSource; ++ g_source_set_can_recurse(&idleTimerSource->source, true); ++ g_source_set_priority(&idleTimerSource->source, G_PRIORITY_DEFAULT_IDLE); ++ g_source_attach(&idleTimerSource->source, mainContext); + } + + QEventDispatcherGlib::QEventDispatcherGlib(QObject *parent) +@@ -272,12 +346,9 @@ QEventDispatcherGlib::QEventDispatcherGlib(QObject *parent) + { + } + +-QEventDispatcherGlib::QEventDispatcherGlib(GMainContext *mainContext, +- QObject *parent) +- : QAbstractEventDispatcher(*(new QEventDispatcherGlibPrivate(mainContext)), +- parent) +-{ +-} ++QEventDispatcherGlib::QEventDispatcherGlib(GMainContext *mainContext, QObject *parent) ++ : QAbstractEventDispatcher(*(new QEventDispatcherGlibPrivate(mainContext)), parent) ++{ } + + QEventDispatcherGlib::~QEventDispatcherGlib() + { +@@ -289,6 +360,9 @@ QEventDispatcherGlib::~QEventDispatcherGlib() + g_source_destroy(&d->timerSource->source); + g_source_unref(&d->timerSource->source); + d->timerSource = 0; ++ g_source_destroy(&d->idleTimerSource->source); ++ g_source_unref(&d->idleTimerSource->source); ++ d->idleTimerSource = 0; + + // destroy socket notifier source + for (int i = 0; i < d->socketNotifierSource->pollfds.count(); ++i) { +@@ -324,11 +398,16 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags) + // tell postEventSourcePrepare() and timerSource about any new flags + QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; + d->timerSource->processEventsFlags = flags; +- ++ ++ if (!(flags & QEventLoop::EventLoopExec)) { ++ // force timers to be sent at normal priority ++ d->timerSource->runWithIdlePriority = false; ++ } ++ + bool result = g_main_context_iteration(d->mainContext, canWait); + while (!result && canWait) + result = g_main_context_iteration(d->mainContext, canWait); +- ++ + d->timerSource->processEventsFlags = savedFlags; + + if (canWait) +diff --git a/src/corelib/kernel/qeventdispatcher_glib_p.h b/src/corelib/kernel/qeventdispatcher_glib_p.h +index eb7fb75..4103aa3 100644 +--- a/src/corelib/kernel/qeventdispatcher_glib_p.h ++++ b/src/corelib/kernel/qeventdispatcher_glib_p.h +@@ -98,6 +98,7 @@ protected: + struct GPostEventSource; + struct GSocketNotifierSource; + struct GTimerSource; ++struct GIdleTimerSource; + + class Q_CORE_EXPORT QEventDispatcherGlibPrivate : public QAbstractEventDispatcherPrivate + { +@@ -108,6 +109,7 @@ public: + GPostEventSource *postEventSource; + GSocketNotifierSource *socketNotifierSource; + GTimerSource *timerSource; ++ GIdleTimerSource *idleTimerSource; + }; + + QT_END_NAMESPACE +diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp +index 897bb49..903b0eb 100644 +--- a/src/corelib/kernel/qeventdispatcher_unix.cpp ++++ b/src/corelib/kernel/qeventdispatcher_unix.cpp +@@ -423,10 +423,10 @@ bool QTimerInfoList::timerWait(timeval &tm) + // Find first waiting timer not already active + QTimerInfo *t = 0; + for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) { +- if (!(*it)->inTimerEvent) { +- t = *it; +- break; +- } ++ if (!(*it)->inTimerEvent) { ++ t = *it; ++ break; ++ } + } + + if (!t) diff --git a/qt.spec b/qt.spec index a0070df..d728f11 100644 --- a/qt.spec +++ b/qt.spec @@ -4,13 +4,13 @@ # -no-pch disables precompiled headers, make ccache-friendly %define no_pch -no-pch -%define _default_patch_fuzz 2 +%define _default_patch_fuzz 2 Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.3 -Release: 7%{?dist} +Release: 8%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -57,7 +57,10 @@ 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 +# glib-event-loop regression Patch55: qt-x11-opensource-src-4.5.3-glib-event-loop.patch +# or fix from http://bugs.kde.org/210171 +Patch155: http://www.davidfaure.fr/2009/qeventdispatcher_glib_fix.diff # security patches @@ -392,7 +395,8 @@ Qt libraries used for drawing widgets and OpenGL items. %patch52 -p1 -b .sparc64 %patch53 -p1 -b .qatomic-inline-asm %patch54 -p1 -b .mysql_config -%patch55 -p1 -b .glib-event-loop +#patch55 -p1 -b .glib-event-loop +%patch155 -p1 -b .qeventdispatcher_glib_fix # security fixes @@ -989,6 +993,9 @@ fi %changelog +* Fri Oct 30 2009 Rex Dieter - 4.5.3-8 +- use upstream qeventdispatcher_glib_fix.diff (kde#210171) + * Thu Oct 29 2009 Than Ngo - 4.5.3-7 - fix glib-even-loop issue, regression which causes Password dialogs get stuck From 991b877472e110ee7e66a6c4d336b2f989d32eb1 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 30 Oct 2009 13:02:09 +0000 Subject: [PATCH 13/41] revert qeventdispatcher_glib_fix , than reports it doesn't fix 3star echo --- qt.spec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qt.spec b/qt.spec index d728f11..fbea32a 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.3 -Release: 8%{?dist} +Release: 7%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -60,6 +60,7 @@ Patch54: qt-x11-opensource-src-4.5.1-mysql_config.patch # glib-event-loop regression Patch55: qt-x11-opensource-src-4.5.3-glib-event-loop.patch # or fix from http://bugs.kde.org/210171 +# than reports this doesn't fix our original 3star echo bug Patch155: http://www.davidfaure.fr/2009/qeventdispatcher_glib_fix.diff # security patches @@ -395,8 +396,8 @@ Qt libraries used for drawing widgets and OpenGL items. %patch52 -p1 -b .sparc64 %patch53 -p1 -b .qatomic-inline-asm %patch54 -p1 -b .mysql_config -#patch55 -p1 -b .glib-event-loop -%patch155 -p1 -b .qeventdispatcher_glib_fix +%patch55 -p1 -b .glib-event-loop +#patch155 -p1 -b .qeventdispatcher_glib_fix # security fixes @@ -993,9 +994,6 @@ fi %changelog -* Fri Oct 30 2009 Rex Dieter - 4.5.3-8 -- use upstream qeventdispatcher_glib_fix.diff (kde#210171) - * Thu Oct 29 2009 Than Ngo - 4.5.3-7 - fix glib-even-loop issue, regression which causes Password dialogs get stuck From a14a744ce473a223b8bdc775770e6fa6ef7c307b Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 8 Nov 2009 17:10:01 +0000 Subject: [PATCH 14/41] - -x11: Requires: %{name}-sqlite%{?_isa} --- qt.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt.spec b/qt.spec index fbea32a..5e0d39f 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.3 -Release: 7%{?dist} +Release: 8%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -360,7 +360,7 @@ Obsoletes: WebKit-qt < 1.0.0-1 Provides: WebKit-qt = 1.0.0-1 %endif %if 0%{?sqlite:1} -Requires: %{name}-sqlite = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-sqlite%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %endif Provides: qt4-assistant = %{version}-%{release} Provides: %{name}-assistant = %{version}-%{release} @@ -994,6 +994,9 @@ fi %changelog +* Sun Nov 08 2009 Rex Dieter - 4.5.3-8 +- -x11: Requires: %%{name}-sqlite%{?_isa} + * Thu Oct 29 2009 Than Ngo - 4.5.3-7 - fix glib-even-loop issue, regression which causes Password dialogs get stuck From d8427aecb22dd48d91d02eba4a52e9b0f45fa61d Mon Sep 17 00:00:00 2001 From: Jaroslav Reznik Date: Thu, 12 Nov 2009 14:26:08 +0000 Subject: [PATCH 15/41] - CVE-2009-3384 - WebKit, ftp listing handling (#525788) - CVE-2009-2816 - WebKit, MITM Cross-Origin Resource Sharing (#525789) --- ...nsource-src-4.5.3-cve-2009-2816-cors.patch | 11 + ...-4.5.3-cve-2009-3384-ftp-ls-handling.patch | 284 ++++++++++++++++++ qt.spec | 10 +- 3 files changed, 304 insertions(+), 1 deletion(-) create mode 100644 qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch create mode 100644 qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch diff --git a/qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch b/qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch new file mode 100644 index 0000000..fa80e1f --- /dev/null +++ b/qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch @@ -0,0 +1,11 @@ +diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp.cve-2009-2816-cors qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp +--- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp.cve-2009-2816-cors 2009-09-29 13:01:37.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp 2009-11-03 13:47:52.974837432 +0100 +@@ -735,7 +735,6 @@ void XMLHttpRequest::makeCrossSiteAccess + } + + preflightRequest.setHTTPHeaderField("Access-Control-Request-Headers", String::adopt(headerBuffer)); +- preflightRequest.addHTTPHeaderFields(m_requestHeaders); + } + + if (m_async) { diff --git a/qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch b/qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch new file mode 100644 index 0000000..14e0cc0 --- /dev/null +++ b/qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch @@ -0,0 +1,284 @@ +diff -U0 qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/ChangeLog.cve-2009-3384-ftp-ls-handling qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/ChangeLog +--- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/ChangeLog.cve-2009-3384-ftp-ls-handling 2009-09-29 13:01:35.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/ChangeLog 2009-11-03 14:53:34.008898552 +0100 +@@ -0,0 +1,14 @@ ++2009-09-24 Brady Eidson ++ ++ Reviewed by Sam Weinig. ++ ++ Merge changes from Mozilla's FTP directory parser. ++ and https://bugs.webkit.org/show_bug.cgi?id=29294 ++ ++ FTP layout tests not possible at this time. ++ https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible. ++ ++ * loader/FTPDirectoryParser.cpp: ++ (WebCore::ParsingFailed): ++ (WebCore::parseOneFTPLine): ++ +diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp.cve-2009-3384-ftp-ls-handling qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp +--- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp.cve-2009-3384-ftp-ls-handling 2009-09-29 13:01:36.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp 2009-11-03 14:53:34.044898565 +0100 +@@ -53,6 +53,13 @@ static struct tm *gmtimeQt(const time_t + #define gmtime_r(x, y) gmtime_s((y), (x)) + #endif + ++static inline FTPEntryType ParsingFailed(ListState& state) ++{ ++ if (state.parsedOne || state.listStyle) /* junk if we fail to parse */ ++ return FTPJunkEntry; /* this time but had previously parsed sucessfully */ ++ return FTPMiscEntry; /* its part of a comment or error message */ ++} ++ + FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& result) + { + result.clear(); +@@ -122,6 +129,9 @@ FTPEntryType parseOneFTPLine(const char* + } + } + ++ if (!numtoks) ++ return ParsingFailed(state); ++ + linelen_sans_wsp = &(tokens[numtoks-1][toklen[numtoks-1]]) - tokens[0]; + if (numtoks == (sizeof(tokens)/sizeof(tokens[0])) ) + { +@@ -352,11 +362,16 @@ FTPEntryType parseOneFTPLine(const char* + pos++; + p++; + } +- if (lstyle && pos < (toklen[0]-1) && *p == ']') ++ if (lstyle && pos < (toklen[0]-1)) + { ++ /* ']' was found and there is at least one character after it */ ++ ASSERT(*p == ']'); + pos++; + p++; + tokmarker = pos; /* length of leading "[DIR1.DIR2.etc]" */ ++ } else { ++ /* not a CMU style listing */ ++ lstyle = 0; + } + } + while (lstyle && pos < toklen[0] && *p != ';') +@@ -383,7 +398,7 @@ FTPEntryType parseOneFTPLine(const char* + pos -= tokmarker; /* => fnlength sans "[DIR1.DIR2.etc]" */ + p = &(tokens[0][tokmarker]); /* offset of basename */ + +- if (!lstyle || pos > 80) /* VMS filenames can't be longer than that */ ++ if (!lstyle || pos == 0 || pos > 80) /* VMS filenames can't be longer than that */ + { + lstyle = 0; + } +@@ -776,7 +791,7 @@ FTPEntryType parseOneFTPLine(const char* + state.parsedOne = true; + state.listStyle = lstyle; + +- p = &(line[linelen_sans_wsp]); /* line end sans wsp */ ++ p = &(line[linelen]); /* line end */ + result.caseSensitive = true; + result.filename = tokens[3]; + result.filenameLength = p - tokens[3]; +@@ -784,29 +799,46 @@ FTPEntryType parseOneFTPLine(const char* + + if (*tokens[2] != '<') /* not or */ + { ++ // try to handle correctly spaces at the beginning of the filename ++ // filesize (token[2]) must end at offset 38 ++ if (tokens[2] + toklen[2] - line == 38) { ++ result.filename = &(line[39]); ++ result.filenameLength = p - result.filename; ++ } + result.type = FTPFileEntry; + pos = toklen[2]; + result.fileSize = String(tokens[2], pos); + } +- else if ((tokens[2][1]) != 'D') /* not */ +- { +- result.type = FTPJunkEntry; /* unknown until junc for sure */ +- if (result.filenameLength > 4) ++ else { ++ // try to handle correctly spaces at the beginning of the filename ++ // token[2] must begin at offset 24, the length is 5 or 10 ++ // token[3] must begin at offset 39 or higher ++ if (tokens[2] - line == 24 && (toklen[2] == 5 || toklen[2] == 10) && ++ tokens[3] - line >= 39) { ++ result.filename = &(line[39]); ++ result.filenameLength = p - result.filename; ++ } ++ ++ if ((tokens[2][1]) != 'D') /* not */ + { +- p = result.filename; +- for (pos = result.filenameLength - 4; pos > 0; pos--) ++ result.type = FTPJunkEntry; /* unknown until junc for sure */ ++ if (result.filenameLength > 4) + { +- if (p[0] == ' ' && p[3] == ' ' && p[2] == '>' && +- (p[1] == '=' || p[1] == '-')) ++ p = result.filename; ++ for (pos = result.filenameLength - 4; pos > 0; pos--) + { +- result.type = FTPLinkEntry; +- result.filenameLength = p - result.filename; +- result.linkname = p + 4; +- result.linknameLength = &(line[linelen_sans_wsp]) +- - result.linkname; +- break; ++ if (p[0] == ' ' && p[3] == ' ' && p[2] == '>' && ++ (p[1] == '=' || p[1] == '-')) ++ { ++ result.type = FTPLinkEntry; ++ result.filenameLength = p - result.filename; ++ result.linkname = p + 4; ++ result.linknameLength = &(line[linelen]) ++ - result.linkname; ++ break; ++ } ++ p++; + } +- p++; + } + } + } +@@ -817,8 +849,13 @@ FTPEntryType parseOneFTPLine(const char* + result.modifiedTime.tm_mon--; + result.modifiedTime.tm_mday = atoi(tokens[0]+3); + result.modifiedTime.tm_year = atoi(tokens[0]+6); ++ /* if year has only two digits then assume that ++ 00-79 is 2000-2079 ++ 80-99 is 1980-1999 */ + if (result.modifiedTime.tm_year < 80) +- result.modifiedTime.tm_year += 100; ++ result.modifiedTime.tm_year += 2000; ++ else if (result.modifiedTime.tm_year < 100) ++ result.modifiedTime.tm_year += 1900; + } + + result.modifiedTime.tm_hour = atoi(tokens[1]+0); +@@ -970,6 +1007,8 @@ FTPEntryType parseOneFTPLine(const char* + * "drwxr-xr-x 2 0 0 512 May 28 22:17 etc" + */ + ++ bool isOldHellsoft = false; ++ + if (numtoks >= 6) + { + /* there are two perm formats (Hellsoft/NetWare and *IX strmode(3)). +@@ -995,6 +1034,8 @@ FTPEntryType parseOneFTPLine(const char* + { + /* rest is FMA[S] or AFM[S] */ + lstyle = 'U'; /* very likely one of the NetWare servers */ ++ if (toklen[0] == 10) ++ isOldHellsoft = true; + } + } + } +@@ -1059,7 +1100,7 @@ FTPEntryType parseOneFTPLine(const char* + + /* check that size is numeric */ + p = tokens[tokmarker]; +- for (pos = 0; lstyle && pos < toklen[tokmarker]; pos++) ++ for (unsigned int i = 0; lstyle && i < toklen[tokmarker]; ++i) + { + if (!isASCIIDigit(*p++)) + lstyle = 0; +@@ -1068,11 +1109,11 @@ FTPEntryType parseOneFTPLine(const char* + { + month_num = 0; + p = tokens[tokmarker+1]; +- for (pos = 0;pos < (12*3); pos+=3) ++ for (unsigned int i = 0; i < (12*3); i+=3) + { +- if (p[0] == month_names[pos+0] && +- p[1] == month_names[pos+1] && +- p[2] == month_names[pos+2]) ++ if (p[0] == month_names[i+0] && ++ p[1] == month_names[i+1] && ++ p[2] == month_names[i+2]) + break; + month_num++; + } +@@ -1080,8 +1121,8 @@ FTPEntryType parseOneFTPLine(const char* + lstyle = 0; + } + } /* relative position test */ +- } /* while (pos+5) < numtoks */ +- } /* if (numtoks >= 4) */ ++ } /* for (pos = (numtoks-5); !lstyle && pos > 1; pos--) */ ++ } /* if (lstyle == 'U') */ + + if (lstyle == 'U') + { +@@ -1140,24 +1181,49 @@ FTPEntryType parseOneFTPLine(const char* + + } /* time/year */ + +- result.filename = tokens[tokmarker+4]; +- result.filenameLength = (&(line[linelen_sans_wsp])) ++ // there is exacly 1 space between filename and previous token in all ++ // outputs except old Hellsoft ++ if (!isOldHellsoft) ++ result.filename = tokens[tokmarker+3] + toklen[tokmarker+3] + 1; ++ else ++ result.filename = tokens[tokmarker+4]; ++ ++ result.filenameLength = (&(line[linelen])) + - (result.filename); + + if (result.type == FTPLinkEntry && result.filenameLength > 4) + { +- p = result.filename + 1; +- for (pos = 1; pos < (result.filenameLength - 4); pos++) ++ /* First try to use result.fe_size to find " -> " sequence. ++ This can give proper result for cases like "aaa -> bbb -> ccc". */ ++ unsigned int fileSize = result.fileSize.toUInt(); ++ ++ if (result.filenameLength > (fileSize + 4) && ++ strncmp(result.filename + result.filenameLength - fileSize - 4, " -> ", 4) == 0) ++ { ++ result.linkname = result.filename + (result.filenameLength - fileSize); ++ result.linknameLength = (&(line[linelen])) - (result.linkname); ++ result.filenameLength -= fileSize + 4; ++ } ++ else + { +- if (*p == ' ' && p[1] == '-' && p[2] == '>' && p[3] == ' ') ++ /* Search for sequence " -> " from the end for case when there are ++ more occurrences. F.e. if ftpd returns "a -> b -> c" assume ++ "a -> b" as a name. Powerusers can remove unnecessary parts ++ manually but there is no way to follow the link when some ++ essential part is missing. */ ++ p = result.filename + (result.filenameLength - 5); ++ for (pos = (result.filenameLength - 5); pos > 0; pos--) + { +- result.linkname = p + 4; +- result.linknameLength = (&(line[linelen_sans_wsp])) +- - (result.linkname); +- result.filenameLength = pos; +- break; ++ if (strncmp(p, " -> ", 4) == 0) ++ { ++ result.linkname = p + 4; ++ result.linknameLength = (&(line[linelen])) ++ - (result.linkname); ++ result.filenameLength = pos; ++ break; ++ } ++ p--; + } +- p++; + } + } + +@@ -1614,9 +1680,7 @@ FTPEntryType parseOneFTPLine(const char* + + } /* if (linelen > 0) */ + +- if (state.parsedOne || state.listStyle) /* junk if we fail to parse */ +- return FTPJunkEntry; /* this time but had previously parsed sucessfully */ +- return FTPMiscEntry; /* its part of a comment or error message */ ++ return ParsingFailed(state); + } + + } // namespace WebCore diff --git a/qt.spec b/qt.spec index 5e0d39f..646e727 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.3 -Release: 8%{?dist} +Release: 9%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -64,6 +64,8 @@ Patch55: qt-x11-opensource-src-4.5.3-glib-event-loop.patch Patch155: http://www.davidfaure.fr/2009/qeventdispatcher_glib_fix.diff # security patches +Patch180: qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch +Patch181: qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch # kde-qt git patches Patch201: 0001-This-patch-uses-object-name-as-a-fallback-for-window.patch @@ -400,6 +402,8 @@ Qt libraries used for drawing widgets and OpenGL items. #patch155 -p1 -b .qeventdispatcher_glib_fix # security fixes +%patch180 -p1 -b .cve-2009-2816-cors +%patch181 -p1 -b .cve-2009-3384-ftp-ls-handling # kde-qt branch %patch201 -p1 -b .kde-qt-0001 @@ -994,6 +998,10 @@ fi %changelog +* Thu Nov 12 2009 Jaroslav Reznik - 4.5.3-9 +- CVE-2009-3384 - WebKit, ftp listing handling (#525788) +- CVE-2009-2816 - WebKit, MITM Cross-Origin Resource Sharing (#525789) + * Sun Nov 08 2009 Rex Dieter - 4.5.3-8 - -x11: Requires: %%{name}-sqlite%{?_isa} From 88bcfd0a9082ad0b6d5b13c9f0d1c1368cdffbc9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 15 Nov 2009 00:04:43 +0000 Subject: [PATCH 16/41] - -tds: Add package with TDS sqldriver (#537586) - add arch'd provides for sql drivers --- qt.spec | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/qt.spec b/qt.spec index 646e727..4e99716 100644 --- a/qt.spec +++ b/qt.spec @@ -10,7 +10,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.5.3 -Release: 9%{?dist} +Release: 10%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -116,6 +116,7 @@ Source31: hi48-app-qt4-logo.png %define odbc -plugin-sql-odbc %define psql -plugin-sql-psql %define sqlite -plugin-sql-sqlite +%define tds -plugin-sql-tds %define phonon -phonon %define phonon_backend -phonon-backend %if 0%{?rhel} @@ -206,6 +207,10 @@ BuildRequires: unixODBC-devel BuildRequires: sqlite-devel %endif +%if "%{?tds}" != "-no-sql-tds" +BuildRequires: freetds-devel +%endif + Obsoletes: qgtkstyle < 0.1 Provides: qgtkstyle = 0.1-1 Obsoletes: qt4-config < 4.5.0 @@ -303,6 +308,7 @@ Obsoletes: qt4-MySQL < %{version}-%{release} Provides: qt4-MySQL = %{version}-%{release} Obsoletes: qt4-mysql < %{version}-%{release} Provides: qt4-mysql = %{version}-%{release} +%{?_isa:Provides: qt4-mysql%{?_isa} = %{version}-%{release}} %description mysql %{summary}. @@ -316,6 +322,7 @@ Obsoletes: qt4-ODBC < %{version}-%{release} Provides: qt4-ODBC = %{version}-%{release} Obsoletes: qt4-odbc < %{version}-%{release} Provides: qt4-odbc = %{version}-%{release} +%{?_isa:Provides: qt4-odbc%{?_isa} = %{version}-%{release}} %description odbc %{summary}. @@ -329,6 +336,7 @@ Obsoletes: qt4-PostgreSQL < %{version}-%{release} Provides: qt4-PostgreSQL = %{version}-%{release} Obsoletes: qt4-postgresql < %{version}-%{release} Provides: qt4-postgresql = %{version}-%{release} +%{?_isa:Provides: qt4-postgresql%{?_isa} = %{version}-%{release}} %description postgresql %{summary}. @@ -341,10 +349,22 @@ Obsoletes: qt4-SQLite < %{version}-%{release} Provides: qt4-SQLite = %{version}-%{release} Obsoletes: qt4-sqlite < %{version}-%{release} Provides: qt4-sqlite = %{version}-%{release} +%{?_isa:Provides: qt4-sqlite%{?_isa} = %{version}-%{release}} %description sqlite %{summary}. +%package tds +Summary: TDS driver for Qt's SQL classes +Group: System Environment/Libraries +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: qt4-tds = %{version}-%{release} +%{?_isa:Provides: qt4-tds%{?_isa} = %{version}-%{release}} + +%description tds +%{summary}. + + %package x11 Summary: Qt GUI-related libraries Group: System Environment/Libraries @@ -525,6 +545,7 @@ done %{?psql} \ %{?odbc} \ %{?sqlite} %{?_system_sqlite} \ + %{?tds} \ %{!?docs:-nomake docs} \ %{!?demos:-nomake demos} \ %{!?examples:-nomake examples} @@ -960,6 +981,12 @@ fi %{_qt4_plugindir}/sqldrivers/libqsqlite* %endif +%if "%{?tds}" == "-plugin-sql-tds" +%files tds +%defattr(-,root,root,-) +%{_qt4_plugindir}/sqldrivers/libqsqltds* +%endif + %files x11 %defattr(-,root,root,-) %{_sysconfdir}/rpm/macros.* @@ -998,6 +1025,10 @@ fi %changelog +* Sat Nov 14 2009 Rex Dieter - 4.5.3-10 +- -tds: Add package with TDS sqldriver (#537586) +- add arch'd provides for sql drivers + * Thu Nov 12 2009 Jaroslav Reznik - 4.5.3-9 - CVE-2009-3384 - WebKit, ftp listing handling (#525788) - CVE-2009-2816 - WebKit, MITM Cross-Origin Resource Sharing (#525789) From 7a9a94424fa3485d2cca516e7481401103b428f8 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:17:51 +0000 Subject: [PATCH 17/41] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fbee4ab..dcbdd58 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := qt SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From fe7c362aab2dae9e928084f51eee0bd9bfab4425 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 5 Feb 2010 16:40:23 +0000 Subject: [PATCH 18/41] sync w/devel branch for qt-4.6.1 goodness --- .cvsignore | 4 +- ...object-name-as-a-fallback-for-window.patch | 4 +- ...-override-redirect-windows-popup-men.patch | 4 +- ...es-QObjectPrivateVersion-thus-preven.patch | 4 +- ...support-for-using-isystem-to-allow-p.patch | 4 +- ...are-inserted-or-removed-in-a-QTabBar.patch | 4 +- ...e-to-do-an-out-of-source-build-on-wi.patch | 4 +- ...-outside-qt-src-tree-it-sometimes-ge.patch | 4 +- ...In-a-treeview-with-columns-like-this.patch | 52 -- ...-the-raster-graphics-system-use-shar.patch | 93 +++ ...n-of-the-file-that-got-removed-due-t.patch | 30 + ...-deserialization-of-values-with-cust.patch | 54 -- ...ME.qt-copy-from-the-original-qt-copy.patch | 207 ------ ...e-to-reflect-the-workflow-with-Git-a.patch | 257 ------- ...Add-context-to-tr-calls-in-QShortcut.patch | 4 +- ...-QMenu-respect-the-minimum-width-set.patch | 31 - ...rg-XFree-multimedia-special-launcher.patch | 660 ------------------ 0118-qtcopy-define.diff | 24 - 0274-shm-native-image-fix.patch | 88 --- ...-do-not-deduce-scrollbar-extent-twice.diff | 35 - 0285-qgv-dontshowchildren.diff | 24 - kde-qt-patches.sh | 4 +- qeventdispatcher_glib_fix.diff | 282 -------- qt-cups-1.patch | 92 +++ ...ere-opensource-src-4.6.0-beta1-qdoc3.patch | 21 + ...e-opensource-src-4.6.0-gst-pulsaudio.patch | 26 +- qt-x11-opensource-src-4.5.0-qdoc3.patch | 21 - ...nsource-src-4.5.3-cve-2009-2816-cors.patch | 11 - ...-4.5.3-cve-2009-3384-ftp-ls-handling.patch | 284 -------- ...opensource-src-4.5.3-glib-event-loop.patch | 11 - ...rce-src-4.5.3-javascript-disable-jit.patch | 24 - qt.spec | 187 ++--- sources | 2 +- 33 files changed, 368 insertions(+), 2188 deletions(-) rename 0002-This-patch-makes-override-redirect-windows-popup-me.patch => 0002-This-patch-makes-override-redirect-windows-popup-men.patch (97%) rename 0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch => 0003-This-patch-changes-QObjectPrivateVersion-thus-preven.patch (94%) rename 0004-This-patch-adds-support-for-using-isystem-to-allow.patch => 0004-This-patch-adds-support-for-using-isystem-to-allow-p.patch (96%) rename 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch => 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-ge.patch (97%) delete mode 100644 0008-In-a-treeview-with-columns-like-this.patch create mode 100644 0008-This-patch-makes-the-raster-graphics-system-use-shar.patch create mode 100644 0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch delete mode 100644 0009-This-patch-fixes-deserialization-of-values-with-cust.patch delete mode 100644 0010-Import-README.qt-copy-from-the-original-qt-copy.patch delete mode 100644 0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch rename 0017-Add-context-to-tr-calls-in-QShortcut.patch => 0012-Add-context-to-tr-calls-in-QShortcut.patch (98%) delete mode 100644 0015-Make-QMenu-respect-the-minimum-width-set.patch delete mode 100644 0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch delete mode 100644 0118-qtcopy-define.diff delete mode 100644 0274-shm-native-image-fix.patch delete mode 100644 0283-do-not-deduce-scrollbar-extent-twice.diff delete mode 100644 0285-qgv-dontshowchildren.diff delete mode 100644 qeventdispatcher_glib_fix.diff create mode 100644 qt-cups-1.patch create mode 100644 qt-everywhere-opensource-src-4.6.0-beta1-qdoc3.patch rename qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch => qt-everywhere-opensource-src-4.6.0-gst-pulsaudio.patch (57%) delete mode 100644 qt-x11-opensource-src-4.5.0-qdoc3.patch delete mode 100644 qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch delete mode 100644 qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch delete mode 100644 qt-x11-opensource-src-4.5.3-glib-event-loop.patch delete mode 100644 qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch diff --git a/.cvsignore b/.cvsignore index 870ad62..42a63c7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -7,4 +7,6 @@ hi22-phonon-gstreamer.png hi32-phonon-gstreamer.png hi48-phonon-gstreamer.png hi64-phonon-gstreamer.png -qt-x11-opensource-src-4.5.3.tar.gz +qt-everywhere-opensource-src-4.6.0-rc1.tar.gz +qt-everywhere-opensource-src-4.6.0.tar.gz +qt-everywhere-opensource-src-4.6.1.tar.gz diff --git a/0001-This-patch-uses-object-name-as-a-fallback-for-window.patch b/0001-This-patch-uses-object-name-as-a-fallback-for-window.patch index 189e565..1850cce 100644 --- a/0001-This-patch-uses-object-name-as-a-fallback-for-window.patch +++ b/0001-This-patch-uses-object-name-as-a-fallback-for-window.patch @@ -1,7 +1,7 @@ From b48e2091871516496cf0b133249fbf5326a55831 Mon Sep 17 00:00:00 2001 From: Lubos Lunak Date: Sat, 23 Feb 2008 16:44:52 +0100 -Subject: [PATCH 01/18] This patch uses object name as a fallback for window role if no window +Subject: [PATCH 01/13] This patch uses object name as a fallback for window role if no window role is set explicitly using setWindowRole(). Since Qt3 always used the object name as the window role and most Qt3/KDE3 code is ported to call setObjectName(), @@ -113,5 +113,5 @@ index 79ee8c9..b56849c 100644 QPaintEngine *QWidget::paintEngine() const { -- -1.6.2.5 +1.6.5.1 diff --git a/0002-This-patch-makes-override-redirect-windows-popup-me.patch b/0002-This-patch-makes-override-redirect-windows-popup-men.patch similarity index 97% rename from 0002-This-patch-makes-override-redirect-windows-popup-me.patch rename to 0002-This-patch-makes-override-redirect-windows-popup-men.patch index a33e083..bb2588d 100644 --- a/0002-This-patch-makes-override-redirect-windows-popup-me.patch +++ b/0002-This-patch-makes-override-redirect-windows-popup-men.patch @@ -1,7 +1,7 @@ From 339e220e29ff39b86705438b4be6f90e5618d27b Mon Sep 17 00:00:00 2001 From: Lubos Lunak Date: Tue, 2 Oct 2007 16:08:32 +0200 -Subject: [PATCH 02/18] This patch makes override-redirect windows (popup menu, dropdown menu, +Subject: [PATCH 02/13] This patch makes override-redirect windows (popup menu, dropdown menu, tooltip, combobox, etc.) also have more window properties like WM_CLASS, so they can be used when compositing. @@ -63,5 +63,5 @@ index 79ee8c9..a74a849 100644 if (initializeWindow && q->internalWinId()) { -- -1.6.2.5 +1.6.5.1 diff --git a/0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch b/0003-This-patch-changes-QObjectPrivateVersion-thus-preven.patch similarity index 94% rename from 0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch rename to 0003-This-patch-changes-QObjectPrivateVersion-thus-preven.patch index d40ce77..f6b55e0 100644 --- a/0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch +++ b/0003-This-patch-changes-QObjectPrivateVersion-thus-preven.patch @@ -1,7 +1,7 @@ From 68eaa07de69e873b89d4aba341c6ed1ca81f6819 Mon Sep 17 00:00:00 2001 From: Lubos Lunak Date: Wed, 30 Jan 2008 14:24:01 +0100 -Subject: [PATCH 03/18] This patch changes QObjectPrivateVersion, thus preventing mixing +Subject: [PATCH 03/13] This patch changes QObjectPrivateVersion, thus preventing mixing parts of upstream Qt and qt-copy. In general it is a bad idea to mix e.g. libQtCore from one build and libQtGui from another one, and other qt-copy patches could make changes in Qt internal structures that could @@ -33,5 +33,5 @@ index 0bcccba..88192fd 100644 class Q_CORE_EXPORT QObjectPrivate : public QObjectData { -- -1.6.2.5 +1.6.5.1 diff --git a/0004-This-patch-adds-support-for-using-isystem-to-allow.patch b/0004-This-patch-adds-support-for-using-isystem-to-allow-p.patch similarity index 96% rename from 0004-This-patch-adds-support-for-using-isystem-to-allow.patch rename to 0004-This-patch-adds-support-for-using-isystem-to-allow-p.patch index daa15fd..4005734 100644 --- a/0004-This-patch-adds-support-for-using-isystem-to-allow.patch +++ b/0004-This-patch-adds-support-for-using-isystem-to-allow-p.patch @@ -1,7 +1,7 @@ From 86fc0d43cdcf3232ae0e4e6f4f28cf8f1a45ede5 Mon Sep 17 00:00:00 2001 From: Benjamin Reed Date: Tue, 19 Feb 2008 17:37:37 +0100 -Subject: [PATCH 04/18] This patch adds support for using -isystem to allow putting an include +Subject: [PATCH 04/13] This patch adds support for using -isystem to allow putting an include directory at the end of the compiler's header search path. I don't have the exact output anymore (I've since patched Qt's configure) but @@ -52,5 +52,5 @@ index 2c108ad..610a201 100755 L_FLAGS="$L_FLAGS -L\"${VAL}\"" ;; -- -1.6.2.5 +1.6.5.1 diff --git a/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch b/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch index e383e94..0386a47 100644 --- a/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch +++ b/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch @@ -1,7 +1,7 @@ From 733d1afd03908d695aa8a6518f453b9ff0e5b8a2 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Sun, 20 Apr 2008 16:28:31 +0200 -Subject: [PATCH 05/18] When tabs are inserted or removed in a QTabBar, +Subject: [PATCH 05/13] When tabs are inserted or removed in a QTabBar, QTabBarPrivate::refresh() is called to update the layout. If the tabbar widget is hidden, this just sets a boolean variable (layoutDirty) and returns, so the parent widget's layout is not @@ -43,5 +43,5 @@ index 419d456..41107a0 100644 /*! -- -1.6.2.5 +1.6.5.1 diff --git a/0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch b/0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch index 384f027..4999964 100644 --- a/0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch +++ b/0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch @@ -1,7 +1,7 @@ From 8e28e0603a900e1b18ebfd14c4f87b16dabf4cf6 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 19 Sep 2008 17:41:26 +0200 -Subject: [PATCH 06/18] Fix configure.exe to do an out-of-source build on windows +Subject: [PATCH 06/13] Fix configure.exe to do an out-of-source build on windows qt-bugs@ issue : N227213 Trolltech task ID : none yet @@ -63,5 +63,5 @@ index d519b09..7979836 100644 -- -1.6.2.5 +1.6.5.1 diff --git a/0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch b/0007-When-using-qmake-outside-qt-src-tree-it-sometimes-ge.patch similarity index 97% rename from 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch rename to 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-ge.patch index cd66e4c..e3b4370 100644 --- a/0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch +++ b/0007-When-using-qmake-outside-qt-src-tree-it-sometimes-ge.patch @@ -1,7 +1,7 @@ From 0afcf33127c6ccbe5dfaae4f4c5e02f28dc10ae1 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Thu, 8 May 2008 21:25:49 +0200 -Subject: [PATCH 07/18] When using qmake outside qt src tree, it sometimes generates wrong +Subject: [PATCH 07/13] When using qmake outside qt src tree, it sometimes generates wrong paths (wrong path separator) qt-bugs@ issue : none @@ -69,5 +69,5 @@ index 8ba89f9..dd78349 100644 QString version = qmake_version(); if(slash != -1) { -- -1.6.2.5 +1.6.5.1 diff --git a/0008-In-a-treeview-with-columns-like-this.patch b/0008-In-a-treeview-with-columns-like-this.patch deleted file mode 100644 index af6ffae..0000000 --- a/0008-In-a-treeview-with-columns-like-this.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 1ec9dd029abaa0f00798535fdb1722154b1c63f6 Mon Sep 17 00:00:00 2001 -From: =?utf-8?q?Rafael=20Fern=C3=A1ndez=20L=C3=B3pez?= -Date: Sun, 26 Oct 2008 10:40:51 +0100 -Subject: [PATCH 08/18] In a treeview with columns like this: - -Column 1 | Column 2 | ... | Column k | ... | Column n - -When selecting with rubberband (by clicking on the blank part of the viewport) while Column k is -hidden, you get double items on the selection model, when asking for selection(). This is becase -ranges are incorrectly calculated when there are hidden columns. A way to reproduce: - -Column 1 | Column 2 | Column 4 (Column 3 is hidden) - item - item - item - x <- press button here and move it up to select items (on this same column) - -If you do like this: - -Column 1 | Column 2 | Column 4 (Column 3 is hidden) - item - item - item - x <- press button here and move it up - -you won't be able to reproduce, since you need the hidden column to be between the one you click and -the last one. The reason is that columnRanges returns two ranges when there is supposed to return 1 -range (even when there are hidden columns). - -qt-bugs@ issue : N232819 -Trolltech task ID : 232831 -bugs.kde.org number : 171436 ---- - src/gui/itemviews/qtreeview.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp -index ed6ad03..dc147f2 100644 ---- a/src/gui/itemviews/qtreeview.cpp -+++ b/src/gui/itemviews/qtreeview.cpp -@@ -3575,7 +3575,7 @@ QList > QTreeViewPrivate::columnRanges(const QModelIndex &topInd - current.first = -2; // -1 is not enough because -1+1 = 0 - current.second = -2; - foreach (int logicalColumn, logicalIndexes) { -- if (current.second + 1 != logicalColumn) { -+ if (current.second + 1 != logicalColumn && !header->isSectionHidden(current.second + 1)) { - if (current.first != -2) { - //let's save the current one - ret += current; --- -1.6.2.5 - diff --git a/0008-This-patch-makes-the-raster-graphics-system-use-shar.patch b/0008-This-patch-makes-the-raster-graphics-system-use-shar.patch new file mode 100644 index 0000000..a506a04 --- /dev/null +++ b/0008-This-patch-makes-the-raster-graphics-system-use-shar.patch @@ -0,0 +1,93 @@ +From 8731ab999b849dac4716e3d29f5f55ed8e56438e Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 25 Jun 2009 13:50:29 +0200 +Subject: [PATCH 08/13] This patch makes the raster graphics system use shared images instead + of shared pixmaps. + +Shared memory pixmaps are deprecated since they are slower than shared +images with modern graphics hardware. They are also not supported by EXA +drivers and can be disabled in the latest version of the NVidia driver. + +qt-bugs@ issue : none +Qt Software task ID : none +bugs.kde.org number : none +--- + src/gui/image/qnativeimage.cpp | 10 ---------- + src/gui/image/qnativeimage_p.h | 1 - + src/gui/painting/qwindowsurface_raster.cpp | 13 ++++++++++--- + 3 files changed, 10 insertions(+), 14 deletions(-) + +diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp +index 3745708..3c21fce 100644 +--- a/src/gui/image/qnativeimage.cpp ++++ b/src/gui/image/qnativeimage.cpp +@@ -147,7 +147,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* + { + if (!X11->use_mitshm) { + xshmimg = 0; +- xshmpm = 0; + image = QImage(width, height, format); + return; + } +@@ -191,11 +190,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* + shmctl(xshminfo.shmid, IPC_RMID, 0); + return; + } +- xshmpm = XShmCreatePixmap(X11->display, DefaultRootWindow(X11->display), xshmimg->data, +- &xshminfo, width, height, dd); +- if (!xshmpm) { +- qWarning() << "QNativeImage: Unable to create shared Pixmap."; +- } + } + + +@@ -204,10 +198,6 @@ QNativeImage::~QNativeImage() + if (!xshmimg) + return; + +- if (xshmpm) { +- XFreePixmap(X11->display, xshmpm); +- xshmpm = 0; +- } + XShmDetach(X11->display, &xshminfo); + xshmimg->data = 0; + XDestroyImage(xshmimg); +diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h +index 07d5dfe..ba01854 100644 +--- a/src/gui/image/qnativeimage_p.h ++++ b/src/gui/image/qnativeimage_p.h +@@ -90,7 +90,6 @@ public: + + #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM) + XImage *xshmimg; +- Pixmap xshmpm; + XShmSegmentInfo xshminfo; + + #elif defined(Q_WS_MAC) +diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp +index d6fb03b..09963d9 100644 +--- a/src/gui/painting/qwindowsurface_raster.cpp ++++ b/src/gui/painting/qwindowsurface_raster.cpp +@@ -220,9 +220,16 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi + + QRect br = rgn.boundingRect().translated(offset); + #ifndef QT_NO_MITSHM +- if (d_ptr->image->xshmpm) { +- XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc, +- br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y()); ++ if (d_ptr->image->xshmimg && (br.width() * br.height() > 65536)) { ++ const QImage &src = d->image->image; ++ br = br.intersected(src.rect()); ++ // Hack to make sure we satisify the PutImage() constraints in the X server, ++ // since the doShmPutImage() route currently forces a migration to system ram. ++ wbr.setX(wbr.x() - br.x()); ++ br.setX(0); ++ br.setWidth(src.width()); ++ XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg, ++ br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False); + XSync(X11->display, False); + } else + #endif +-- +1.6.5.1 + diff --git a/0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch b/0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch new file mode 100644 index 0000000..8e6396e --- /dev/null +++ b/0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch @@ -0,0 +1,30 @@ +From bb8255da422470c5012b6b1c4c24eb2afb6804dc Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Fri, 26 Jun 2009 11:41:45 +0200 +Subject: [PATCH 09/13] Restore a section of the file that got removed due to conflict resolution. + +Thanks to Kevin Kofler for pointing this out +--- + src/gui/kernel/qapplication_x11.cpp | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp +index 33aec9e..53f020b 100644 +--- a/src/gui/kernel/qapplication_x11.cpp ++++ b/src/gui/kernel/qapplication_x11.cpp +@@ -1955,9 +1955,9 @@ void qt_init(QApplicationPrivate *priv, int, + bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0; + if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) { + Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display)); +- X11->use_mitshm = mitshm_pixmaps && (defaultVisual->red_mask == 0xff0000 +- && defaultVisual->green_mask == 0xff00 +- && defaultVisual->blue_mask == 0xff); ++ X11->use_mitshm = defaultVisual->red_mask == 0xff0000 ++ && defaultVisual->green_mask == 0xff00 ++ && defaultVisual->blue_mask == 0xff; + } + } + #endif // QT_NO_MITSHM +-- +1.6.5.1 + diff --git a/0009-This-patch-fixes-deserialization-of-values-with-cust.patch b/0009-This-patch-fixes-deserialization-of-values-with-cust.patch deleted file mode 100644 index 083a1fc..0000000 --- a/0009-This-patch-fixes-deserialization-of-values-with-cust.patch +++ /dev/null @@ -1,54 +0,0 @@ -From b274bbaf4768dcfdfcf95ceda08b6402ffedb80d Mon Sep 17 00:00:00 2001 -From: George Goldberg -Date: Tue, 28 Apr 2009 17:08:07 +0200 -Subject: [PATCH 09/18] This patch fixes deserialization of values with custom types when setting - properties on dbus adaptors. It is needed, in particular by telepathy/Qt - programs and libraries. The bug was reported to Nokia on 2009-01-07 along - with the patch supplied here. The summary of the issue from the Qt - Software task tracker follows: - -When calling the setter for a DBus property, if that property has a custom type -(e.g. a struct with dbus type (uss)), QtDBus fails to demarshall the -QDBusArgument before attempting to set the property on the adaptor. The result -is that it attempts to call adaptor->setProperty() with a QDBusArgument of type -"uss" instead of with the type of the custom struct. - -qt-bugs@ issue : N240326 -Qt Software task ID : 240608 -bugs.kde.org number : none ---- - src/dbus/qdbusinternalfilters.cpp | 16 +++++++++++++++- - 1 files changed, 15 insertions(+), 1 deletions(-) - -diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp -index c71f2f4..d261d01 100644 ---- a/src/dbus/qdbusinternalfilters.cpp -+++ b/src/dbus/qdbusinternalfilters.cpp -@@ -274,9 +274,23 @@ QDBusMessage qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNode &node - QDBusAdaptorConnector::AdaptorMap::ConstIterator it; - it = qLowerBound(connector->adaptors.constBegin(), connector->adaptors.constEnd(), - interface_name); -- if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) -+ if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) { -+ if (value.userType() == qMetaTypeId()) { -+ QDBusArgument valueArg = qvariant_cast(value); -+ if (valueArg.currentType() != -1) { -+ int mid = it->adaptor->metaObject()->property(it->adaptor->metaObject()->indexOfProperty(property_name)).userType(); -+ void *null = 0; -+ QVariant valueStore(mid, null); -+ QDBusMetaType::demarshall(valueArg, mid, valueStore.data()); -+ -+ if (it->adaptor->setProperty(property_name, valueStore)) -+ return msg.createReply(); -+ } -+ } -+ - if (it->adaptor->setProperty(property_name, value)) - return msg.createReply(); -+ } - } - } - --- -1.6.2.5 - diff --git a/0010-Import-README.qt-copy-from-the-original-qt-copy.patch b/0010-Import-README.qt-copy-from-the-original-qt-copy.patch deleted file mode 100644 index 758a4dc..0000000 --- a/0010-Import-README.qt-copy-from-the-original-qt-copy.patch +++ /dev/null @@ -1,207 +0,0 @@ -From 9a3fe8fc4912bf82b791c4131f553c18140ca838 Mon Sep 17 00:00:00 2001 -From: Thiago Macieira -Date: Sun, 21 Jun 2009 13:17:13 -0300 -Subject: [PATCH 10/18] Import README.qt-copy from the original qt-copy - ---- - README.kde-qt | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 188 insertions(+), 0 deletions(-) - create mode 100644 README.kde-qt - -diff --git a/README.kde-qt b/README.kde-qt -new file mode 100644 -index 0000000..f605a0b ---- /dev/null -+++ b/README.kde-qt -@@ -0,0 +1,188 @@ -+This is a copy of Qt version 4.5.1. It may include -+modifications which are necessary for KDE; these are listed in the -+patches directory. -+ -+1. Qt-copy patches -+================== -+ -+You may also consider running the apply_patches script before configuring qt-copy, -+which will apply all not yet applied patches from the patches/ directory that -+are considered safe (they mostly include optimizations and features that don't -+add new API). Note that most of those patches haven't been accepted -+by Qt Software yet. and therefore they'll make your qt-copy differ from official -+Qt version. -+ -+2. Configuring Qt -+================= -+ -+The recommended compile line is: -+ -+--default-config-begin-- -+./configure -qt-gif -debug -fast -no-exceptions -no-separate-debug-info \ -+ -system-libpng -system-libjpeg -system-zlib \ -+ -dbus -webkit -no-phonon -plugin-sql-mysql \ -+ -nomake examples -nomake demos -prefix -+--default-config-end-- -+ -+It contains "-debug", which greatly improves the use for backtraces (but -+also needs a lot more disk space and makes things slower). To build in -+release mode, replace it with "-release". -+ -+It also contains "-no-separate-debug-info", which disables separate .debug -+files. Instead, the debug information will be built into the libraries. -+This option is needed when you install Qt. -+If you don't install Qt, it can be useful to disable this option, -+thus having separate debug symbol files. With separate debug files, you can -+just move those debug files to another directory to remove Qt debug symbols. -+Moving the files back will enable Qt debug symbols again. -+This is useful if you rarely need to step into Qt functions during debugging, -+because GDB loads much faster and uses less memory without Qt debug symbols. -+In the rare case you need to step into Qt code, you can temporarily enable -+debug symbols again by moving the debug files back. You can even load the Qt -+debug symbols from within GDB on demand, using the "symbol-file" command. -+ -+It also contains the "-no-exceptions" argument, which disables C++ -+exception support. Disabling exception support may improve memory -+consumption if GCC is being used. However, that also disables the -+QtXmlPatterns module since that requires exception support. If you -+plan on using that module, remove the option. -+ -+If you are planning to compile Qt using an Icecream cluster you have to -+pass the option -no-pch (no precompiled headers) to configure to make -+distributed compilation work. -+ -+3. Compiling Qt -+=============== -+ -+To compile Qt on a Unix platform, run: -+ -+ export MAKEFLAGS=-j2 -+ make -+ make install -+ -+If your computer has more than one core or processor, you may consider -+increasing the "2" above. If you've got a compile farm available, you -+should adjust the -j argument to match the number of slots in that -+farm. -+ -+4. Modifying & rebuilding Qt -+============================ -+ -+If you make modifications to the Qt source code, you don't need to -+build everything again. Simply go to the directory containing the -+Makefile closest to the files you changed and run "make" again. -+ -+For example, if you modified src/corelib/io/qiodevice.cpp, do: -+ -+ cd src/corelib -+ make -+ -+Do not commit your modifications to qt-copy as such. If you have a fix -+that benefit others, see the "Creating Qt-copy patches" section below. -+ -+5. Building Qt examples and demos -+================================= -+ -+The "-nomake examples -nomake demos" arguments to the configure script -+mean that those two sections will not be configured for -+building. Which is unneeded for usage of the library. If you want to -+compile the examples or demos later; just enter either directory and -+type: -+ -+ qmake -+ make -+ -+6. Building Qt documentation (only applies to Snapshot versions of Qt) -+============================ -+ -+To build and install the documentation, run: -+ -+ make docs -+ ./config.status -+ make install -+ -+It is necessary to do this once only, even if you rebuild Qt later. -+ -+7. Using Qt uninstalled -+======================= -+ -+To use without having to install it, configure it as follows: -+ -+ ./configure -prefix $PWD -+ make sub-src -+ make sub-tools -+ -+Attention: DO NOT run -+ -+ make install -+ -+If you do, Qt will overwrite your include/ directory with its -+installation. -+ -+8. Creating Qt-copy patches -+=========================== -+ -+If you have fixed a bug in Qt or modified it in any way that may -+benefit others, please share your change in the form of a patch. Do -+not commit your changes directly to the qt-copy module because they -+may be lost in a future update if they have not been added to the -+official Qt release. -+ -+The exception to the above rule is that if the fix has been accepted -+by Qt Software (and so will appear in the next release of Qt), then -+it can be applied directly to qt-copy. In this case, the patch -+should still be placed in patches/ as usual, but it should have a -+header line -+ Applied: yes -+ -+Before creating a patch, it is recommended to contact Qt Software -+support via qt-bugs@trolltech.com and explain the situation. There may -+be a solution for the problem already or a new direction that should -+be accounted for. -+ -+To create a patch, do the following: -+ a) make sure your Qt sources are clean of other changes. Run: -+ svn revert -R . -+ b) make your changes to the Qt source code and verify that it -+ compiles, links and works. -+ c) open the patches/README file and get the next patch number -+ (you must read and understand the README file; if you don't, ask for -+ help from other KDE developers) -+ d) create the patch with: -+ svn diff > patches/NNNN-short-description-of-your-patch.diff -+ where NNNN is the next available number. -+ e) open the file you've just created and add the header to it. The -+ header should be the template in patches/README followed by a longer -+ description of your patch. -+ -+Don't forget to submit your patch to qt-bugs@trolltech.com along with -+the long description of the issue found, if you haven't already. -+Qt Software does not monitor the patches/ directory, so qt-copy -+patches do not get automatically applied to Qt official releases. -+ -+When you receive the issue number and task tracker numbers, update the -+patch file. -+ -+9. Known issues with current Qt code -+==================================== -+ -+In case you have strange issues with non-resizing windows and similar, use -+ export QT_USE_NATIVE_WINDOWS=1 -+before starting KDE. -+ -+10. Troubleshooting: Re-configuring and re-compiling -+=================================================== -+ -+For those updating the source in a directory where Qt has already -+been compiled, you may need to run the following commands from the -+top directory of your Qt sources: -+ -+ find . -name '*.moc' | xargs rm -+ -+Sometimes ./configure will refuse to run. You may need to: -+ rm .qmake.cache -+ -+If you think you may have run "make install" on an install-less Qt -+(srcdir == $QTDIR), run: -+ -+ svn revert -R include --- -1.6.2.5 - diff --git a/0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch b/0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch deleted file mode 100644 index 870c9ab..0000000 --- a/0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch +++ /dev/null @@ -1,257 +0,0 @@ -From 39b24a10e4dee27357b9760b735c2ab98b132963 Mon Sep 17 00:00:00 2001 -From: Thiago Macieira -Date: Sun, 21 Jun 2009 13:46:54 -0300 -Subject: [PATCH 11/18] Update this file to reflect the workflow with Git, as well as use Git commands - ---- - README.kde-qt | 163 +++++++++++++++++++++++++++++++-------------------------- - 1 files changed, 88 insertions(+), 75 deletions(-) - -diff --git a/README.kde-qt b/README.kde-qt -index f605a0b..db3feb6 100644 ---- a/README.kde-qt -+++ b/README.kde-qt -@@ -1,27 +1,20 @@ --This is a copy of Qt version 4.5.1. It may include --modifications which are necessary for KDE; these are listed in the --patches directory. -+This is a patched version of Qt. It may include changes made by KDE -+and Qt developers that have either not been accepted for inclusion -+into Qt, or have been accepted for a later version of Qt than this -+one. - --1. Qt-copy patches --================== -- --You may also consider running the apply_patches script before configuring qt-copy, --which will apply all not yet applied patches from the patches/ directory that --are considered safe (they mostly include optimizations and features that don't --add new API). Note that most of those patches haven't been accepted --by Qt Software yet. and therefore they'll make your qt-copy differ from official --Qt version. -- --2. Configuring Qt -+1. Configuring Qt - ================= - - The recommended compile line is: - - --default-config-begin-- --./configure -qt-gif -debug -fast -no-exceptions -no-separate-debug-info \ -- -system-libpng -system-libjpeg -system-zlib \ -- -dbus -webkit -no-phonon -plugin-sql-mysql \ -- -nomake examples -nomake demos -prefix -+ -+ ./configure -qt-gif -debug -fast -no-separate-debug-info \ -+ -system-libpng -system-libjpeg -system-zlib \ -+ -dbus -webkit -plugin-sql-mysql \ -+ -nomake examples -nomake demos -prefix -+ - --default-config-end-- - - It contains "-debug", which greatly improves the use for backtraces (but -@@ -31,6 +24,7 @@ release mode, replace it with "-release". - It also contains "-no-separate-debug-info", which disables separate .debug - files. Instead, the debug information will be built into the libraries. - This option is needed when you install Qt. -+ - If you don't install Qt, it can be useful to disable this option, - thus having separate debug symbol files. With separate debug files, you can - just move those debug files to another directory to remove Qt debug symbols. -@@ -41,17 +35,11 @@ In the rare case you need to step into Qt code, you can temporarily enable - debug symbols again by moving the debug files back. You can even load the Qt - debug symbols from within GDB on demand, using the "symbol-file" command. - --It also contains the "-no-exceptions" argument, which disables C++ --exception support. Disabling exception support may improve memory --consumption if GCC is being used. However, that also disables the --QtXmlPatterns module since that requires exception support. If you --plan on using that module, remove the option. -- - If you are planning to compile Qt using an Icecream cluster you have to - pass the option -no-pch (no precompiled headers) to configure to make - distributed compilation work. - --3. Compiling Qt -+2. Compiling Qt - =============== - - To compile Qt on a Unix platform, run: -@@ -65,34 +53,49 @@ increasing the "2" above. If you've got a compile farm available, you - should adjust the -j argument to match the number of slots in that - farm. - --4. Modifying & rebuilding Qt -+3. Modifying & rebuilding Qt - ============================ - - If you make modifications to the Qt source code, you don't need to - build everything again. Simply go to the directory containing the - Makefile closest to the files you changed and run "make" again. - --For example, if you modified src/corelib/io/qiodevice.cpp, do: -+For example, if you've modified src/corelib/io/qiodevice.cpp, do: - - cd src/corelib - make - --Do not commit your modifications to qt-copy as such. If you have a fix --that benefit others, see the "Creating Qt-copy patches" section below. -+If you make a change that is not temporary, you should create a Git -+commit out of it. However, you shouldn't push those changes to -+kde-qt.git. If you have a fix that benefit others, see the "Creating -+kde-qt.git modifications" section below. - --5. Building Qt examples and demos -+4. Building Qt examples and demos - ================================= - - The "-nomake examples -nomake demos" arguments to the configure script --mean that those two sections will not be configured for --building. Which is unneeded for usage of the library. If you want to --compile the examples or demos later; just enter either directory and --type: -+mean that those two sections will not be configured for building, -+which is unneeded for usage of the library. If you want to compile -+the examples or demos later, just enter either directory and type: - - qmake - make - --6. Building Qt documentation (only applies to Snapshot versions of Qt) -+5. Build Qt tests -+================= -+ -+(Official information: http://qt.gitorious.org/qt/pages/QtAutotestsEnvironment) -+ -+In order to run Qt tests, you must have a "developer build" of Qt. For -+that, you need to reconfigure Qt and add the "-developer-build" -+option. That option is technically equivalent to the options: -+ -+ -debug -prefix $PWD -DQT_BUILD_INTERNAL -+ -+To run a test, go to its source dir in tests/auto/testname. Type -+"make" to build it, then run it (either ./tst_testname, or "make install"). -+ -+6. Building Qt documentation - ============================ - - To build and install the documentation, run: -@@ -119,21 +122,25 @@ Attention: DO NOT run - If you do, Qt will overwrite your include/ directory with its - installation. - --8. Creating Qt-copy patches --=========================== -+8. Creating kde-qt.git modifications -+==================================== - - If you have fixed a bug in Qt or modified it in any way that may - benefit others, please share your change in the form of a patch. Do --not commit your changes directly to the qt-copy module because they -+not commit your changes directly to the main branch because they - may be lost in a future update if they have not been added to the - official Qt release. - - The exception to the above rule is that if the fix has been accepted --by Qt Software (and so will appear in the next release of Qt), then --it can be applied directly to qt-copy. In this case, the patch --should still be placed in patches/ as usual, but it should have a --header line -- Applied: yes -+by Qt Software (and so will appear in the very next release of Qt), -+then it should be simply cherry-picked from the Qt development -+branch. Note that you shouldn't do this for changes that have been -+accepted into a release which is not the very next. -+In this case, you should use the following command: -+ -+ git cherry-pick -x SHA1_OF_THE_FIX -+where SHA1_OF_THE_FIX is the SHA-1 of the commit that you want to -+introduce. Then push the change to the server. - - Before creating a patch, it is recommended to contact Qt Software - support via qt-bugs@trolltech.com and explain the situation. There may -@@ -141,37 +148,42 @@ be a solution for the problem already or a new direction that should - be accounted for. - - To create a patch, do the following: -- a) make sure your Qt sources are clean of other changes. Run: -- svn revert -R . -- b) make your changes to the Qt source code and verify that it -- compiles, links and works. -- c) open the patches/README file and get the next patch number -- (you must read and understand the README file; if you don't, ask for -- help from other KDE developers) -- d) create the patch with: -- svn diff > patches/NNNN-short-description-of-your-patch.diff -- where NNNN is the next available number. -- e) open the file you've just created and add the header to it. The -- header should be the template in patches/README followed by a longer -- description of your patch. -- --Don't forget to submit your patch to qt-bugs@trolltech.com along with --the long description of the issue found, if you haven't already. --Qt Software does not monitor the patches/ directory, so qt-copy --patches do not get automatically applied to Qt official releases. -- --When you receive the issue number and task tracker numbers, update the --patch file. -- --9. Known issues with current Qt code --==================================== -- --In case you have strange issues with non-resizing windows and similar, use -- export QT_USE_NATIVE_WINDOWS=1 --before starting KDE. -- --10. Troubleshooting: Re-configuring and re-compiling --=================================================== -+ a) look at the listing of branches in -+ http://qt.gitorious.org/+kde-developers/qt/kde-qt/commits/HEAD and -+ select the next number. -+ -+ b) create a new branch out of a clean, released version of Qt, (for -+ example, 4.5.1), using the number above and a brief description of -+ your fix. For example: -+ git checkout -b patches/0180-window-role v4.5.1 -+ You can see the available released versions of Qt with: -+ git tag -+ -+ c) make your changes to the Qt source code and verify that it -+ compiles, links and works (please run the respective unit tests). -+ -+ c) commit your changes to Git, using the "git commit" command. Please -+ see http://qt.gitorious.org/qt/pages/GitIntroductionWithQt and -+ http://qt.gitorious.org/qt/pages/QtCodingStyle for information on -+ how to create commits -+ Note that you can create multiple commits. -+ -+ e) merge the change to the main branch, for example, 4.5.1-patched: -+ git checkout 4.5.1-patched -+ git merge patches/0180-window-role -+ -+ f) push the changes you made to your branch and to the main server: -+ git push git@gitorious.org:qt/kde-qt.git 4.5.1-patched patches/0180-window-role -+ (Don't forget to list both branch names) -+ -+Don't forget to submit your patch to using the Qt Contribution Model, -+along with the long description of the issue found. See -+http://qt.gitorious.org/qt/pages/QtContributionGuidelines for -+information how. You can submit the branch you've just sent to the -+server. -+ -+9. Troubleshooting: Re-configuring and re-compiling -+================================================== - - For those updating the source in a directory where Qt has already - been compiled, you may need to run the following commands from the -@@ -185,4 +197,5 @@ Sometimes ./configure will refuse to run. You may need to: - If you think you may have run "make install" on an install-less Qt - (srcdir == $QTDIR), run: - -- svn revert -R include -+ rm -rf include -+ bin/syncqt --- -1.6.2.5 - diff --git a/0017-Add-context-to-tr-calls-in-QShortcut.patch b/0012-Add-context-to-tr-calls-in-QShortcut.patch similarity index 98% rename from 0017-Add-context-to-tr-calls-in-QShortcut.patch rename to 0012-Add-context-to-tr-calls-in-QShortcut.patch index 82f68e4..2b552d3 100644 --- a/0017-Add-context-to-tr-calls-in-QShortcut.patch +++ b/0012-Add-context-to-tr-calls-in-QShortcut.patch @@ -1,7 +1,7 @@ From 9eb3560cfd5cd0bc9c7bf79f2c27657ee07b8f95 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sat, 8 Aug 2009 14:40:25 +0200 -Subject: [PATCH 17/18] Add context to tr calls in QShortcut +Subject: [PATCH 12/13] Add context to tr calls in QShortcut Some languages have special rules for using "+" to concatenate strings and for example it needs to be Ctrl + Shift instead of Ctrl+Shift, adding @@ -66,5 +66,5 @@ index 894f663..c17f253 100644 } else if (key) { int i=0; -- -1.6.2.5 +1.6.5.1 diff --git a/0015-Make-QMenu-respect-the-minimum-width-set.patch b/0015-Make-QMenu-respect-the-minimum-width-set.patch deleted file mode 100644 index 609a9bd..0000000 --- a/0015-Make-QMenu-respect-the-minimum-width-set.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 01f26d0756839fbe783c637ca7dec5b7987f7e14 Mon Sep 17 00:00:00 2001 -From: Aaron Seigo -Date: Mon, 27 Jul 2009 21:46:22 -0600 -Subject: [PATCH 15/18] Make QMenu respect the minimum width set - -If one sets a minimum width on a QMenu and that size is larger than the -smallest size needed by the large menu item, it ignores the minimum -width and just uses the largest menu item size. - -This results in ugly painting artifacts. This currently affects -(at least) the tasks widget in Plasma in KDE4. ---- - src/gui/widgets/qmenu.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp -index 9fbbb04..5d62ea6 100644 ---- a/src/gui/widgets/qmenu.cpp -+++ b/src/gui/widgets/qmenu.cpp -@@ -280,7 +280,7 @@ void QMenuPrivate::calcActionRects(QMap &actionRects, QListminimumWidth(), qMax(max_column_width, sz.width())); - //wrapping - if (!scroll && - y+sz.height()+vmargin > dh - (q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, 0, q) * 2)) { --- -1.6.2.5 - diff --git a/0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch b/0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch deleted file mode 100644 index 604cbd7..0000000 --- a/0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch +++ /dev/null @@ -1,660 +0,0 @@ -From 1a94cd7b132497f70a2b97ec2b58f6e2b1c5076a Mon Sep 17 00:00:00 2001 -From: Helio Chissini de Castro -Date: Fri, 10 Jul 2009 16:00:13 -0300 -Subject: [PATCH 16/18] Fill gap of X.org/XFree multimedia/special/launcher keys - Qt up to 4.5.x is missing whole setup of multimedia keys already defined by X - ---- - src/corelib/global/qnamespace.h | 97 ++++++++++++- - src/gui/kernel/qkeymapper_x11.cpp | 286 ++++++++++++++++++++++++++++++------- - src/gui/kernel/qkeysequence.cpp | 174 +++++++++++++++++------ - 3 files changed, 461 insertions(+), 96 deletions(-) - -diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h -index 3edbca7..ddf27a8 100644 ---- a/src/corelib/global/qnamespace.h -+++ b/src/corelib/global/qnamespace.h -@@ -895,12 +895,10 @@ public: - Key_Dead_Horn = 0x01001262, - - // multimedia/internet keys - ignored by default - see QKeyEvent c'tor -- - Key_Back = 0x01000061, - Key_Forward = 0x01000062, - Key_Stop = 0x01000063, - Key_Refresh = 0x01000064, -- - Key_VolumeDown = 0x01000070, - Key_VolumeMute = 0x01000071, - Key_VolumeUp = 0x01000072, -@@ -909,7 +907,6 @@ public: - Key_BassDown = 0x01000075, - Key_TrebleUp = 0x01000076, - Key_TrebleDown = 0x01000077, -- - Key_MediaPlay = 0x01000080, - Key_MediaStop = 0x01000081, - Key_MediaPrevious = 0x01000082, -@@ -918,13 +915,11 @@ public: - #endif - Key_MediaNext = 0x01000083, - Key_MediaRecord = 0x01000084, -- - Key_HomePage = 0x01000090, - Key_Favorites = 0x01000091, - Key_Search = 0x01000092, - Key_Standby = 0x01000093, - Key_OpenUrl = 0x01000094, -- - Key_LaunchMail = 0x010000a0, - Key_LaunchMedia = 0x010000a1, - Key_Launch0 = 0x010000a2, -@@ -943,6 +938,98 @@ public: - Key_LaunchD = 0x010000af, - Key_LaunchE = 0x010000b0, - Key_LaunchF = 0x010000b1, -+ Key_MonBrightnessUp = 0x010000b2, -+ Key_MonBrightnessDown = 0x010000b3, -+ Key_KeyboardLightOnOff = 0x010000b4, -+ Key_KeyboardBrightnessUp = 0x010000b5, -+ Key_KeyboardBrightnessDown = 0x010000b6, -+ Key_PowerOff = 0x010000b7, -+ Key_WakeUp = 0x010000b8, -+ Key_Eject = 0x010000b9, -+ Key_ScreenSaver = 0x010000ba, -+ Key_WWW = 0x010000bb, -+ Key_Memo = 0x010000bc, -+ Key_LightBulb = 0x010000bd, -+ Key_Shop = 0x010000be, -+ Key_History = 0x010000bf, -+ Key_AddFavorite = 0x010000c0, -+ Key_HotLinks = 0x010000c1, -+ Key_BrightnessAdjust = 0x010000c2, -+ Key_Finance = 0x010000c3, -+ Key_Community = 0x010000c4, -+ Key_AudioRewind = 0x010000c5, -+ Key_BackForward = 0x010000c6, -+ Key_ApplicationLeft = 0x010000c7, -+ Key_ApplicationRight = 0x010000c8, -+ Key_Book = 0x010000c9, -+ Key_CD = 0x010000ca, -+ Key_Calculator = 0x010000cb, -+ Key_ToDoList = 0x010000cc, -+ Key_ClearGrab = 0x010000cd, -+ Key_Close = 0x010000ce, -+ Key_Copy = 0x010000cf, -+ Key_Cut = 0x010000d0, -+ Key_Display = 0x010000d1, -+ Key_DOS = 0x010000d2, -+ Key_Documents = 0x010000d3, -+ Key_Excel = 0x010000d4, -+ Key_Explorer = 0x010000d5, -+ Key_Game = 0x010000d6, -+ Key_Go = 0x010000d7, -+ Key_iTouch = 0x010000d8, -+ Key_LogOff = 0x010000d9, -+ Key_Market = 0x010000da, -+ Key_Meeting = 0x010000db, -+ Key_MenuKB = 0x010000dc, -+ Key_MenuPB = 0x010000dd, -+ Key_MySites = 0x010000de, -+ Key_News = 0x010000df, -+ Key_OfficeHome = 0x010000e0, -+ Key_Option = 0x010000e1, -+ Key_Paste = 0x010000e2, -+ Key_Phone = 0x010000e3, -+ Key_Calendar = 0x010000e4, -+ Key_Reply = 0x010000e5, -+ Key_Reload = 0x010000e6, -+ Key_RotateWindows = 0x010000e7, -+ Key_RotationPB = 0x010000e8, -+ Key_RotationKB = 0x010000e9, -+ Key_Save = 0x010000ea, -+ Key_Send = 0x010000eb, -+ Key_Spell = 0x010000ec, -+ Key_SplitScreen = 0x010000ed, -+ Key_Support = 0x010000ee, -+ Key_TaskPane = 0x010000ef, -+ Key_Terminal = 0x010000f0, -+ Key_Tools = 0x010000f1, -+ Key_Travel = 0x010000f2, -+ Key_Video = 0x010000f3, -+ Key_Word = 0x010000f4, -+ Key_Xfer = 0x010000f5, -+ Key_ZoomIn = 0x010000f6, -+ Key_ZoomOut = 0x010000f7, -+ Key_Away = 0x010000f8, -+ Key_Messenger = 0x010000f9, -+ Key_WebCam = 0x010000fa, -+ Key_MailForward = 0x010000fb, -+ Key_Pictures = 0x010000fc, -+ Key_Music = 0x010000fd, -+ Key_Battery = 0x010000fe, -+ Key_Bluetooth = 0x010000ff, -+ Key_WLAN = 0x01000100, -+ Key_UWB = 0x01000101, -+ Key_AudioForward = 0x01000102, -+ Key_AudioRepeat = 0x01000103, -+ Key_AudioRandomPlay = 0x01000104, -+ Key_Subtitle = 0x01000105, -+ Key_AudioCycleTrack = 0x01000106, -+ Key_Time = 0x01000107, -+ Key_Hibernate = 0x01000108, -+ Key_View = 0x01000109, -+ Key_TopMenu = 0x0100010a, -+ Key_PowerDown = 0x0100010b, -+ Key_Suspend = 0x0100010c, -+ Key_ContrastAdjust = 0x0100010d, - - Key_MediaLast = 0x0100ffff, - -diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp -index 98ed61c..f55b491 100644 ---- a/src/gui/kernel/qkeymapper_x11.cpp -+++ b/src/gui/kernel/qkeymapper_x11.cpp -@@ -714,47 +714,144 @@ extern bool qt_sm_blockUserInput; - #define XK_KP_Delete 0xFF9F - #endif - --// the next lines are taken from XFree > 4.0 (X11/XF86keysyms.h), defining some special -+// the next lines are taken on 10/2009 from X.org (X11/XF86keysym.h), defining some special - // multimedia keys. They are included here as not every system has them. --#define XF86XK_Standby 0x1008FF10 --#define XF86XK_AudioLowerVolume 0x1008FF11 --#define XF86XK_AudioMute 0x1008FF12 --#define XF86XK_AudioRaiseVolume 0x1008FF13 --#define XF86XK_AudioPlay 0x1008FF14 --#define XF86XK_AudioStop 0x1008FF15 --#define XF86XK_AudioPrev 0x1008FF16 --#define XF86XK_AudioNext 0x1008FF17 --#define XF86XK_HomePage 0x1008FF18 --#define XF86XK_Calculator 0x1008FF1D --#define XF86XK_Mail 0x1008FF19 --#define XF86XK_Start 0x1008FF1A --#define XF86XK_Search 0x1008FF1B --#define XF86XK_AudioRecord 0x1008FF1C --#define XF86XK_Back 0x1008FF26 --#define XF86XK_Forward 0x1008FF27 --#define XF86XK_Stop 0x1008FF28 --#define XF86XK_Refresh 0x1008FF29 --#define XF86XK_Favorites 0x1008FF30 --#define XF86XK_AudioPause 0x1008FF31 --#define XF86XK_AudioMedia 0x1008FF32 --#define XF86XK_MyComputer 0x1008FF33 --#define XF86XK_OpenURL 0x1008FF38 --#define XF86XK_Launch0 0x1008FF40 --#define XF86XK_Launch1 0x1008FF41 --#define XF86XK_Launch2 0x1008FF42 --#define XF86XK_Launch3 0x1008FF43 --#define XF86XK_Launch4 0x1008FF44 --#define XF86XK_Launch5 0x1008FF45 --#define XF86XK_Launch6 0x1008FF46 --#define XF86XK_Launch7 0x1008FF47 --#define XF86XK_Launch8 0x1008FF48 --#define XF86XK_Launch9 0x1008FF49 --#define XF86XK_LaunchA 0x1008FF4A --#define XF86XK_LaunchB 0x1008FF4B --#define XF86XK_LaunchC 0x1008FF4C --#define XF86XK_LaunchD 0x1008FF4D --#define XF86XK_LaunchE 0x1008FF4E --#define XF86XK_LaunchF 0x1008FF4F -+#define XF86XK_MonBrightnessUp 0x1008FF02 -+#define XF86XK_MonBrightnessDown 0x1008FF03 -+#define XF86XK_KbdLightOnOff 0x1008FF04 -+#define XF86XK_KbdBrightnessUp 0x1008FF05 -+#define XF86XK_KbdBrightnessDown 0x1008FF06 -+#define XF86XK_Standby 0x1008FF10 -+#define XF86XK_AudioLowerVolume 0x1008FF11 -+#define XF86XK_AudioMute 0x1008FF12 -+#define XF86XK_AudioRaiseVolume 0x1008FF13 -+#define XF86XK_AudioPlay 0x1008FF14 -+#define XF86XK_AudioStop 0x1008FF15 -+#define XF86XK_AudioPrev 0x1008FF16 -+#define XF86XK_AudioNext 0x1008FF17 -+#define XF86XK_HomePage 0x1008FF18 -+#define XF86XK_Mail 0x1008FF19 -+#define XF86XK_Start 0x1008FF1A -+#define XF86XK_Search 0x1008FF1B -+#define XF86XK_AudioRecord 0x1008FF1C -+#define XF86XK_Calculator 0x1008FF1D -+#define XF86XK_Memo 0x1008FF1E -+#define XF86XK_ToDoList 0x1008FF1F -+#define XF86XK_Calendar 0x1008FF20 -+#define XF86XK_PowerDown 0x1008FF21 -+#define XF86XK_ContrastAdjust 0x1008FF22 -+#define XF86XK_Back 0x1008FF26 -+#define XF86XK_Forward 0x1008FF27 -+#define XF86XK_Stop 0x1008FF28 -+#define XF86XK_Refresh 0x1008FF29 -+#define XF86XK_PowerOff 0x1008FF2A -+#define XF86XK_WakeUp 0x1008FF2B -+#define XF86XK_Eject 0x1008FF2C -+#define XF86XK_ScreenSaver 0x1008FF2D -+#define XF86XK_WWW 0x1008FF2E -+#define XF86XK_Sleep 0x1008FF2F -+#define XF86XK_Favorites 0x1008FF30 -+#define XF86XK_AudioPause 0x1008FF31 -+#define XF86XK_AudioMedia 0x1008FF32 -+#define XF86XK_MyComputer 0x1008FF33 -+#define XF86XK_LightBulb 0x1008FF35 -+#define XF86XK_Shop 0x1008FF36 -+#define XF86XK_History 0x1008FF37 -+#define XF86XK_OpenURL 0x1008FF38 -+#define XF86XK_AddFavorite 0x1008FF39 -+#define XF86XK_HotLinks 0x1008FF3A -+#define XF86XK_BrightnessAdjust 0x1008FF3B -+#define XF86XK_Finance 0x1008FF3C -+#define XF86XK_Community 0x1008FF3D -+#define XF86XK_AudioRewind 0x1008FF3E -+#define XF86XK_BackForward 0x1008FF3F -+#define XF86XK_Launch0 0x1008FF40 -+#define XF86XK_Launch1 0x1008FF41 -+#define XF86XK_Launch2 0x1008FF42 -+#define XF86XK_Launch3 0x1008FF43 -+#define XF86XK_Launch4 0x1008FF44 -+#define XF86XK_Launch5 0x1008FF45 -+#define XF86XK_Launch6 0x1008FF46 -+#define XF86XK_Launch7 0x1008FF47 -+#define XF86XK_Launch8 0x1008FF48 -+#define XF86XK_Launch9 0x1008FF49 -+#define XF86XK_LaunchA 0x1008FF4A -+#define XF86XK_LaunchB 0x1008FF4B -+#define XF86XK_LaunchC 0x1008FF4C -+#define XF86XK_LaunchD 0x1008FF4D -+#define XF86XK_LaunchE 0x1008FF4E -+#define XF86XK_LaunchF 0x1008FF4F -+#define XF86XK_ApplicationLeft 0x1008FF50 -+#define XF86XK_ApplicationRight 0x1008FF51 -+#define XF86XK_Book 0x1008FF52 -+#define XF86XK_CD 0x1008FF53 -+#define XF86XK_Calculater 0x1008FF54 -+#define XF86XK_Clear 0x1008FF55 -+#define XF86XK_ClearGrab 0x1008FE21 -+#define XF86XK_Close 0x1008FF56 -+#define XF86XK_Copy 0x1008FF57 -+#define XF86XK_Cut 0x1008FF58 -+#define XF86XK_Display 0x1008FF59 -+#define XF86XK_DOS 0x1008FF5A -+#define XF86XK_Documents 0x1008FF5B -+#define XF86XK_Excel 0x1008FF5C -+#define XF86XK_Explorer 0x1008FF5D -+#define XF86XK_Game 0x1008FF5E -+#define XF86XK_Go 0x1008FF5F -+#define XF86XK_iTouch 0x1008FF60 -+#define XF86XK_LogOff 0x1008FF61 -+#define XF86XK_Market 0x1008FF62 -+#define XF86XK_Meeting 0x1008FF63 -+#define XF86XK_MenuKB 0x1008FF65 -+#define XF86XK_MenuPB 0x1008FF66 -+#define XF86XK_MySites 0x1008FF67 -+#define XF86XK_News 0x1008FF69 -+#define XF86XK_OfficeHome 0x1008FF6A -+#define XF86XK_Option 0x1008FF6C -+#define XF86XK_Paste 0x1008FF6D -+#define XF86XK_Phone 0x1008FF6E -+#define XF86XK_Reply 0x1008FF72 -+#define XF86XK_Reload 0x1008FF73 -+#define XF86XK_RotateWindows 0x1008FF74 -+#define XF86XK_RotationPB 0x1008FF75 -+#define XF86XK_RotationKB 0x1008FF76 -+#define XF86XK_Save 0x1008FF77 -+#define XF86XK_Send 0x1008FF7B -+#define XF86XK_Spell 0x1008FF7C -+#define XF86XK_SplitScreen 0x1008FF7D -+#define XF86XK_Support 0x1008FF7E -+#define XF86XK_TaskPane 0x1008FF7F -+#define XF86XK_Terminal 0x1008FF80 -+#define XF86XK_Tools 0x1008FF81 -+#define XF86XK_Travel 0x1008FF82 -+#define XF86XK_Video 0x1008FF87 -+#define XF86XK_Word 0x1008FF89 -+#define XF86XK_Xfer 0x1008FF8A -+#define XF86XK_ZoomIn 0x1008FF8B -+#define XF86XK_ZoomOut 0x1008FF8C -+#define XF86XK_Away 0x1008FF8D -+#define XF86XK_Messenger 0x1008FF8E -+#define XF86XK_WebCam 0x1008FF8F -+#define XF86XK_MailForward 0x1008FF90 -+#define XF86XK_Pictures 0x1008FF91 -+#define XF86XK_Music 0x1008FF92 -+#define XF86XK_Battery 0x1008FF93 -+#define XF86XK_Bluetooth 0x1008FF94 -+#define XF86XK_WLAN 0x1008FF95 -+#define XF86XK_UWB 0x1008FF96 -+#define XF86XK_AudioForward 0x1008FF97 -+#define XF86XK_AudioRepeat 0x1008FF98 -+#define XF86XK_AudioRandomPlay 0x1008FF99 -+#define XF86XK_Subtitle 0x1008FF9A -+#define XF86XK_AudioCycleTrack 0x1008FF9B -+#define XF86XK_Time 0x1008FF9F -+#define XF86XK_Select 0x1008FFA0 -+#define XF86XK_View 0x1008FFA1 -+#define XF86XK_TopMenu 0x1008FFA2 -+#define XF86XK_Suspend 0x1008FFA7 -+#define XF86XK_Hibernate 0x1008FFA8 -+ -+ - // end of XF86keysyms.h - - // Special keys used by Qtopia, mapped into the X11 private keypad range. -@@ -942,10 +1039,8 @@ static const unsigned int KeyTbl[] = { - XK_dead_hook, Qt::Key_Dead_Hook, - XK_dead_horn, Qt::Key_Dead_Horn, - -- // Special multimedia keys -- // currently only tested with MS internet keyboard -- -- // browsing keys -+ // Special keys from X.org - This include multimedia keys, -+ // wireless/bluetooth/uwb keys, special launcher keys, etc. - XF86XK_Back, Qt::Key_Back, - XF86XK_Forward, Qt::Key_Forward, - XF86XK_Stop, Qt::Key_Stop, -@@ -955,8 +1050,6 @@ static const unsigned int KeyTbl[] = { - XF86XK_OpenURL, Qt::Key_OpenUrl, - XF86XK_HomePage, Qt::Key_HomePage, - XF86XK_Search, Qt::Key_Search, -- -- // media keys - XF86XK_AudioLowerVolume, Qt::Key_VolumeDown, - XF86XK_AudioMute, Qt::Key_VolumeMute, - XF86XK_AudioRaiseVolume, Qt::Key_VolumeUp, -@@ -965,13 +1058,106 @@ static const unsigned int KeyTbl[] = { - XF86XK_AudioPrev, Qt::Key_MediaPrevious, - XF86XK_AudioNext, Qt::Key_MediaNext, - XF86XK_AudioRecord, Qt::Key_MediaRecord, -- -- // launch keys - XF86XK_Mail, Qt::Key_LaunchMail, - XF86XK_MyComputer, Qt::Key_Launch0, -- XF86XK_Calculator, Qt::Key_Launch1, -+ XF86XK_Calculator, Qt::Key_Calculator, -+ XF86XK_Memo, Qt::Key_Memo, -+ XF86XK_ToDoList, Qt::Key_ToDoList, -+ XF86XK_Calendar, Qt::Key_Calendar, -+ XF86XK_PowerDown, Qt::Key_PowerDown, -+ XF86XK_ContrastAdjust, Qt::Key_ContrastAdjust, - XF86XK_Standby, Qt::Key_Standby, -- -+ XF86XK_MonBrightnessUp, Qt::Key_MonBrightnessUp, -+ XF86XK_MonBrightnessDown, Qt::Key_MonBrightnessDown, -+ XF86XK_KbdLightOnOff, Qt::Key_KeyboardLightOnOff, -+ XF86XK_KbdBrightnessUp, Qt::Key_KeyboardBrightnessUp, -+ XF86XK_KbdBrightnessDown, Qt::Key_KeyboardBrightnessDown, -+ XF86XK_PowerOff, Qt::Key_PowerOff, -+ XF86XK_WakeUp, Qt::Key_WakeUp, -+ XF86XK_Eject, Qt::Key_Eject, -+ XF86XK_ScreenSaver, Qt::Key_ScreenSaver, -+ XF86XK_WWW, Qt::Key_WWW, -+ XF86XK_Sleep, Qt::Key_Sleep, -+ XF86XK_LightBulb, Qt::Key_LightBulb, -+ XF86XK_Shop, Qt::Key_Shop, -+ XF86XK_History, Qt::Key_History, -+ XF86XK_AddFavorite, Qt::Key_AddFavorite, -+ XF86XK_HotLinks, Qt::Key_HotLinks, -+ XF86XK_BrightnessAdjust, Qt::Key_BrightnessAdjust, -+ XF86XK_Finance, Qt::Key_Finance, -+ XF86XK_Community, Qt::Key_Community, -+ XF86XK_AudioRewind, Qt::Key_AudioRewind, -+ XF86XK_BackForward, Qt::Key_BackForward, -+ XF86XK_ApplicationLeft, Qt::Key_ApplicationLeft, -+ XF86XK_ApplicationRight, Qt::Key_ApplicationRight, -+ XF86XK_Book, Qt::Key_Book, -+ XF86XK_CD, Qt::Key_CD, -+ XF86XK_Calculater, Qt::Key_Calculator, -+ XF86XK_Clear, Qt::Key_Clear, -+ XF86XK_ClearGrab, Qt::Key_ClearGrab, -+ XF86XK_Close, Qt::Key_Close, -+ XF86XK_Copy, Qt::Key_Copy, -+ XF86XK_Cut, Qt::Key_Cut, -+ XF86XK_Display, Qt::Key_Display, -+ XF86XK_DOS, Qt::Key_DOS, -+ XF86XK_Documents, Qt::Key_Documents, -+ XF86XK_Excel, Qt::Key_Excel, -+ XF86XK_Explorer, Qt::Key_Explorer, -+ XF86XK_Game, Qt::Key_Game, -+ XF86XK_Go, Qt::Key_Go, -+ XF86XK_iTouch, Qt::Key_iTouch, -+ XF86XK_LogOff, Qt::Key_LogOff, -+ XF86XK_Market, Qt::Key_Market, -+ XF86XK_Meeting, Qt::Key_Meeting, -+ XF86XK_MenuKB, Qt::Key_MenuKB, -+ XF86XK_MenuPB, Qt::Key_MenuPB, -+ XF86XK_MySites, Qt::Key_MySites, -+ XF86XK_News, Qt::Key_News, -+ XF86XK_OfficeHome, Qt::Key_OfficeHome, -+ XF86XK_Option, Qt::Key_Option, -+ XF86XK_Paste, Qt::Key_Paste, -+ XF86XK_Phone, Qt::Key_Phone, -+ XF86XK_Reply, Qt::Key_Reply, -+ XF86XK_Reload, Qt::Key_Reload, -+ XF86XK_RotateWindows, Qt::Key_RotateWindows, -+ XF86XK_RotationPB, Qt::Key_RotationPB, -+ XF86XK_RotationKB, Qt::Key_RotationKB, -+ XF86XK_Save, Qt::Key_Save, -+ XF86XK_Send, Qt::Key_Send, -+ XF86XK_Spell, Qt::Key_Spell, -+ XF86XK_SplitScreen, Qt::Key_SplitScreen, -+ XF86XK_Support, Qt::Key_Support, -+ XF86XK_TaskPane, Qt::Key_TaskPane, -+ XF86XK_Terminal, Qt::Key_Terminal, -+ XF86XK_Tools, Qt::Key_Tools, -+ XF86XK_Travel, Qt::Key_Travel, -+ XF86XK_Video, Qt::Key_Video, -+ XF86XK_Word, Qt::Key_Word, -+ XF86XK_Xfer, Qt::Key_Xfer, -+ XF86XK_ZoomIn, Qt::Key_ZoomIn, -+ XF86XK_ZoomOut, Qt::Key_ZoomOut, -+ XF86XK_Away, Qt::Key_Away, -+ XF86XK_Messenger, Qt::Key_Messenger, -+ XF86XK_WebCam, Qt::Key_WebCam, -+ XF86XK_MailForward, Qt::Key_MailForward, -+ XF86XK_Pictures, Qt::Key_Pictures, -+ XF86XK_Music, Qt::Key_Music, -+ XF86XK_Battery, Qt::Key_Battery, -+ XF86XK_Bluetooth, Qt::Key_Bluetooth, -+ XF86XK_WLAN, Qt::Key_WLAN, -+ XF86XK_UWB, Qt::Key_UWB, -+ XF86XK_AudioForward, Qt::Key_AudioForward, -+ XF86XK_AudioRepeat, Qt::Key_AudioRepeat, -+ XF86XK_AudioRandomPlay, Qt::Key_AudioRandomPlay, -+ XF86XK_Subtitle, Qt::Key_Subtitle, -+ XF86XK_AudioCycleTrack, Qt::Key_AudioCycleTrack, -+ XF86XK_Time, Qt::Key_Time, -+ XF86XK_Select, Qt::Key_Select, -+ XF86XK_View, Qt::Key_View, -+ XF86XK_TopMenu, Qt::Key_TopMenu, -+ XF86XK_Bluetooth, Qt::Key_Bluetooth, -+ XF86XK_Suspend, Qt::Key_Suspend, -+ XF86XK_Hibernate, Qt::Key_Hibernate, - XF86XK_Launch0, Qt::Key_Launch2, - XF86XK_Launch1, Qt::Key_Launch3, - XF86XK_Launch2, Qt::Key_Launch4, -diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp -index 894f663..665c058 100644 ---- a/src/gui/kernel/qkeysequence.cpp -+++ b/src/gui/kernel/qkeysequence.cpp -@@ -396,47 +396,139 @@ static const struct { - { Qt::Key_Menu, QT_TRANSLATE_NOOP("QShortcut", "Menu") }, - { Qt::Key_Help, QT_TRANSLATE_NOOP("QShortcut", "Help") }, - -- // Multimedia keys -- { Qt::Key_Back, QT_TRANSLATE_NOOP("QShortcut", "Back") }, -- { Qt::Key_Forward, QT_TRANSLATE_NOOP("QShortcut", "Forward") }, -- { Qt::Key_Stop, QT_TRANSLATE_NOOP("QShortcut", "Stop") }, -- { Qt::Key_Refresh, QT_TRANSLATE_NOOP("QShortcut", "Refresh") }, -- { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP("QShortcut", "Volume Down") }, -- { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP("QShortcut", "Volume Mute") }, -- { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP("QShortcut", "Volume Up") }, -- { Qt::Key_BassBoost, QT_TRANSLATE_NOOP("QShortcut", "Bass Boost") }, -- { Qt::Key_BassUp, QT_TRANSLATE_NOOP("QShortcut", "Bass Up") }, -- { Qt::Key_BassDown, QT_TRANSLATE_NOOP("QShortcut", "Bass Down") }, -- { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP("QShortcut", "Treble Up") }, -- { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP("QShortcut", "Treble Down") }, -- { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP("QShortcut", "Media Play") }, -- { Qt::Key_MediaStop, QT_TRANSLATE_NOOP("QShortcut", "Media Stop") }, -- { Qt::Key_MediaPrevious,QT_TRANSLATE_NOOP("QShortcut", "Media Previous") }, -- { Qt::Key_MediaNext, QT_TRANSLATE_NOOP("QShortcut", "Media Next") }, -- { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP("QShortcut", "Media Record") }, -- { Qt::Key_HomePage, QT_TRANSLATE_NOOP("QShortcut", "Home Page") }, -- { Qt::Key_Favorites, QT_TRANSLATE_NOOP("QShortcut", "Favorites") }, -- { Qt::Key_Search, QT_TRANSLATE_NOOP("QShortcut", "Search") }, -- { Qt::Key_Standby, QT_TRANSLATE_NOOP("QShortcut", "Standby") }, -- { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP("QShortcut", "Open URL") }, -- { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP("QShortcut", "Launch Mail") }, -- { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP("QShortcut", "Launch Media") }, -- { Qt::Key_Launch0, QT_TRANSLATE_NOOP("QShortcut", "Launch (0)") }, -- { Qt::Key_Launch1, QT_TRANSLATE_NOOP("QShortcut", "Launch (1)") }, -- { Qt::Key_Launch2, QT_TRANSLATE_NOOP("QShortcut", "Launch (2)") }, -- { Qt::Key_Launch3, QT_TRANSLATE_NOOP("QShortcut", "Launch (3)") }, -- { Qt::Key_Launch4, QT_TRANSLATE_NOOP("QShortcut", "Launch (4)") }, -- { Qt::Key_Launch5, QT_TRANSLATE_NOOP("QShortcut", "Launch (5)") }, -- { Qt::Key_Launch6, QT_TRANSLATE_NOOP("QShortcut", "Launch (6)") }, -- { Qt::Key_Launch7, QT_TRANSLATE_NOOP("QShortcut", "Launch (7)") }, -- { Qt::Key_Launch8, QT_TRANSLATE_NOOP("QShortcut", "Launch (8)") }, -- { Qt::Key_Launch9, QT_TRANSLATE_NOOP("QShortcut", "Launch (9)") }, -- { Qt::Key_LaunchA, QT_TRANSLATE_NOOP("QShortcut", "Launch (A)") }, -- { Qt::Key_LaunchB, QT_TRANSLATE_NOOP("QShortcut", "Launch (B)") }, -- { Qt::Key_LaunchC, QT_TRANSLATE_NOOP("QShortcut", "Launch (C)") }, -- { Qt::Key_LaunchD, QT_TRANSLATE_NOOP("QShortcut", "Launch (D)") }, -- { Qt::Key_LaunchE, QT_TRANSLATE_NOOP("QShortcut", "Launch (E)") }, -- { Qt::Key_LaunchF, QT_TRANSLATE_NOOP("QShortcut", "Launch (F)") }, -+ // Special keys -+ // Includes multimedia, launcher, lan keys ( bluetooth, wireless ) -+ // window navigation -+ { Qt::Key_Back, QT_TRANSLATE_NOOP("QShortcut", "Back") }, -+ { Qt::Key_Forward, QT_TRANSLATE_NOOP("QShortcut", "Forward") }, -+ { Qt::Key_Stop, QT_TRANSLATE_NOOP("QShortcut", "Stop") }, -+ { Qt::Key_Refresh, QT_TRANSLATE_NOOP("QShortcut", "Refresh") }, -+ { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP("QShortcut", "Volume Down") }, -+ { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP("QShortcut", "Volume Mute") }, -+ { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP("QShortcut", "Volume Up") }, -+ { Qt::Key_BassBoost, QT_TRANSLATE_NOOP("QShortcut", "Bass Boost") }, -+ { Qt::Key_BassUp, QT_TRANSLATE_NOOP("QShortcut", "Bass Up") }, -+ { Qt::Key_BassDown, QT_TRANSLATE_NOOP("QShortcut", "Bass Down") }, -+ { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP("QShortcut", "Treble Up") }, -+ { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP("QShortcut", "Treble Down") }, -+ { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP("QShortcut", "Media Play") }, -+ { Qt::Key_MediaStop, QT_TRANSLATE_NOOP("QShortcut", "Media Stop") }, -+ { Qt::Key_MediaPrevious, QT_TRANSLATE_NOOP("QShortcut", "Media Previous") }, -+ { Qt::Key_MediaNext, QT_TRANSLATE_NOOP("QShortcut", "Media Next") }, -+ { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP("QShortcut", "Media Record") }, -+ { Qt::Key_HomePage, QT_TRANSLATE_NOOP("QShortcut", "Home Page") }, -+ { Qt::Key_Favorites, QT_TRANSLATE_NOOP("QShortcut", "Favorites") }, -+ { Qt::Key_Search, QT_TRANSLATE_NOOP("QShortcut", "Search") }, -+ { Qt::Key_Standby, QT_TRANSLATE_NOOP("QShortcut", "Standby") }, -+ { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP("QShortcut", "Open URL") }, -+ { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP("QShortcut", "Launch Mail") }, -+ { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP("QShortcut", "Launch Media") }, -+ { Qt::Key_Launch0, QT_TRANSLATE_NOOP("QShortcut", "Launch (0)") }, -+ { Qt::Key_Launch1, QT_TRANSLATE_NOOP("QShortcut", "Launch (1)") }, -+ { Qt::Key_Launch2, QT_TRANSLATE_NOOP("QShortcut", "Launch (2)") }, -+ { Qt::Key_Launch3, QT_TRANSLATE_NOOP("QShortcut", "Launch (3)") }, -+ { Qt::Key_Launch4, QT_TRANSLATE_NOOP("QShortcut", "Launch (4)") }, -+ { Qt::Key_Launch5, QT_TRANSLATE_NOOP("QShortcut", "Launch (5)") }, -+ { Qt::Key_Launch6, QT_TRANSLATE_NOOP("QShortcut", "Launch (6)") }, -+ { Qt::Key_Launch7, QT_TRANSLATE_NOOP("QShortcut", "Launch (7)") }, -+ { Qt::Key_Launch8, QT_TRANSLATE_NOOP("QShortcut", "Launch (8)") }, -+ { Qt::Key_Launch9, QT_TRANSLATE_NOOP("QShortcut", "Launch (9)") }, -+ { Qt::Key_LaunchA, QT_TRANSLATE_NOOP("QShortcut", "Launch (A)") }, -+ { Qt::Key_LaunchB, QT_TRANSLATE_NOOP("QShortcut", "Launch (B)") }, -+ { Qt::Key_LaunchC, QT_TRANSLATE_NOOP("QShortcut", "Launch (C)") }, -+ { Qt::Key_LaunchD, QT_TRANSLATE_NOOP("QShortcut", "Launch (D)") }, -+ { Qt::Key_LaunchE, QT_TRANSLATE_NOOP("QShortcut", "Launch (E)") }, -+ { Qt::Key_LaunchF, QT_TRANSLATE_NOOP("QShortcut", "Launch (F)") }, -+ { Qt::Key_MonBrightnessUp, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Up") }, -+ { Qt::Key_MonBrightnessDown, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Down") }, -+ { Qt::Key_KeyboardLightOnOff, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Light On/Off") }, -+ { Qt::Key_KeyboardBrightnessUp, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Brightness Up") }, -+ { Qt::Key_KeyboardBrightnessDown, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Brightness Down") }, -+ { Qt::Key_PowerOff, QT_TRANSLATE_NOOP("QShortcut", "Power Off") }, -+ { Qt::Key_WakeUp, QT_TRANSLATE_NOOP("QShortcut", "Wake Up") }, -+ { Qt::Key_Eject, QT_TRANSLATE_NOOP("QShortcut", "Eject") }, -+ { Qt::Key_ScreenSaver, QT_TRANSLATE_NOOP("QShortcut", "Screensaver") }, -+ { Qt::Key_WWW, QT_TRANSLATE_NOOP("QShortcut", "WWW") }, -+ { Qt::Key_Sleep, QT_TRANSLATE_NOOP("QShortcut", "Sleep") }, -+ { Qt::Key_LightBulb, QT_TRANSLATE_NOOP("QShortcut", "LightBulb") }, -+ { Qt::Key_Shop, QT_TRANSLATE_NOOP("QShortcut", "Shop") }, -+ { Qt::Key_History, QT_TRANSLATE_NOOP("QShortcut", "History") }, -+ { Qt::Key_AddFavorite, QT_TRANSLATE_NOOP("QShortcut", "Add Favorite") }, -+ { Qt::Key_HotLinks, QT_TRANSLATE_NOOP("QShortcut", "Hot Links") }, -+ { Qt::Key_BrightnessAdjust, QT_TRANSLATE_NOOP("QShortcut", "Adjust Brightness") }, -+ { Qt::Key_Finance, QT_TRANSLATE_NOOP("QShortcut", "Finance") }, -+ { Qt::Key_Community, QT_TRANSLATE_NOOP("QShortcut", "Community") }, -+ { Qt::Key_AudioRewind, QT_TRANSLATE_NOOP("QShortcut", "Audio Rewind") }, -+ { Qt::Key_BackForward, QT_TRANSLATE_NOOP("QShortcut", "Back Forward") }, -+ { Qt::Key_ApplicationLeft, QT_TRANSLATE_NOOP("QShortcut", "Application Left") }, -+ { Qt::Key_ApplicationRight, QT_TRANSLATE_NOOP("QShortcut", "Application Right") }, -+ { Qt::Key_Book, QT_TRANSLATE_NOOP("QShortcut", "Book") }, -+ { Qt::Key_CD, QT_TRANSLATE_NOOP("QShortcut", "CD") }, -+ { Qt::Key_Calculator, QT_TRANSLATE_NOOP("QShortcut", "Calculator") }, -+ { Qt::Key_Clear, QT_TRANSLATE_NOOP("QShortcut", "Clear") }, -+ { Qt::Key_ClearGrab, QT_TRANSLATE_NOOP("QShortcut", "Clear Grab") }, -+ { Qt::Key_Close, QT_TRANSLATE_NOOP("QShortcut", "Close") }, -+ { Qt::Key_Copy, QT_TRANSLATE_NOOP("QShortcut", "Copy") }, -+ { Qt::Key_Cut, QT_TRANSLATE_NOOP("QShortcut", "Cut") }, -+ { Qt::Key_Display, QT_TRANSLATE_NOOP("QShortcut", "Display") }, -+ { Qt::Key_DOS, QT_TRANSLATE_NOOP("QShortcut", "DOS") }, -+ { Qt::Key_Documents, QT_TRANSLATE_NOOP("QShortcut", "Documents") }, -+ { Qt::Key_Excel, QT_TRANSLATE_NOOP("QShortcut", "Spreadsheet") }, -+ { Qt::Key_Explorer, QT_TRANSLATE_NOOP("QShortcut", "Browser") }, -+ { Qt::Key_Game, QT_TRANSLATE_NOOP("QShortcut", "Game") }, -+ { Qt::Key_Go, QT_TRANSLATE_NOOP("QShortcut", "Go") }, -+ { Qt::Key_iTouch, QT_TRANSLATE_NOOP("QShortcut", "iTouch") }, -+ { Qt::Key_LogOff, QT_TRANSLATE_NOOP("QShortcut", "Logoff") }, -+ { Qt::Key_Market, QT_TRANSLATE_NOOP("QShortcut", "Market") }, -+ { Qt::Key_Meeting, QT_TRANSLATE_NOOP("QShortcut", "Meeting") }, -+ { Qt::Key_MenuKB, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Menu") }, -+ { Qt::Key_MenuPB, QT_TRANSLATE_NOOP("QShortcut", "Menu PB") }, -+ { Qt::Key_MySites, QT_TRANSLATE_NOOP("QShortcut", "My Sites") }, -+ { Qt::Key_News, QT_TRANSLATE_NOOP("QShortcut", "News") }, -+ { Qt::Key_OfficeHome, QT_TRANSLATE_NOOP("QShortcut", "Home Office") }, -+ { Qt::Key_Option, QT_TRANSLATE_NOOP("QShortcut", "Option") }, -+ { Qt::Key_Paste, QT_TRANSLATE_NOOP("QShortcut", "Paste") }, -+ { Qt::Key_Phone, QT_TRANSLATE_NOOP("QShortcut", "Phone") }, -+ { Qt::Key_Reply, QT_TRANSLATE_NOOP("QShortcut", "Reply") }, -+ { Qt::Key_Reload, QT_TRANSLATE_NOOP("QShortcut", "Reload") }, -+ { Qt::Key_RotateWindows, QT_TRANSLATE_NOOP("QShortcut", "Rotate Windows") }, -+ { Qt::Key_RotationPB, QT_TRANSLATE_NOOP("QShortcut", "Rotation PB") }, -+ { Qt::Key_RotationKB, QT_TRANSLATE_NOOP("QShortcut", "Rotation KB") }, -+ { Qt::Key_Save, QT_TRANSLATE_NOOP("QShortcut", "Save") }, -+ { Qt::Key_Send, QT_TRANSLATE_NOOP("QShortcut", "Send") }, -+ { Qt::Key_Spell, QT_TRANSLATE_NOOP("QShortcut", "Spellchecker") }, -+ { Qt::Key_SplitScreen, QT_TRANSLATE_NOOP("QShortcut", "Split Screen") }, -+ { Qt::Key_Support, QT_TRANSLATE_NOOP("QShortcut", "Support") }, -+ { Qt::Key_TaskPane, QT_TRANSLATE_NOOP("QShortcut", "Task Panel") }, -+ { Qt::Key_Terminal, QT_TRANSLATE_NOOP("QShortcut", "Terminal") }, -+ { Qt::Key_Tools, QT_TRANSLATE_NOOP("QShortcut", "Tools") }, -+ { Qt::Key_Travel, QT_TRANSLATE_NOOP("QShortcut", "Travel") }, -+ { Qt::Key_Video, QT_TRANSLATE_NOOP("QShortcut", "Video") }, -+ { Qt::Key_Word, QT_TRANSLATE_NOOP("QShortcut", "Word Processor") }, -+ { Qt::Key_Xfer, QT_TRANSLATE_NOOP("QShortcut", "XFer") }, -+ { Qt::Key_ZoomIn, QT_TRANSLATE_NOOP("QShortcut", "Zoom In") }, -+ { Qt::Key_ZoomOut, QT_TRANSLATE_NOOP("QShortcut", "Zoom Out") }, -+ { Qt::Key_Away, QT_TRANSLATE_NOOP("QShortcut", "Away") }, -+ { Qt::Key_Messenger, QT_TRANSLATE_NOOP("QShortcut", "Messenger") }, -+ { Qt::Key_WebCam, QT_TRANSLATE_NOOP("QShortcut", "WebCam") }, -+ { Qt::Key_MailForward, QT_TRANSLATE_NOOP("QShortcut", "Mail Forward") }, -+ { Qt::Key_Pictures, QT_TRANSLATE_NOOP("QShortcut", "Pictures") }, -+ { Qt::Key_Music, QT_TRANSLATE_NOOP("QShortcut", "Music") }, -+ { Qt::Key_Battery, QT_TRANSLATE_NOOP("QShortcut", "Battery") }, -+ { Qt::Key_Bluetooth, QT_TRANSLATE_NOOP("QShortcut", "Bluetooth") }, -+ { Qt::Key_WLAN, QT_TRANSLATE_NOOP("QShortcut", "Wireless") }, -+ { Qt::Key_UWB, QT_TRANSLATE_NOOP("QShortcut", "Ultra Wide Band") }, -+ { Qt::Key_AudioForward, QT_TRANSLATE_NOOP("QShortcut", "Audio Forward") }, -+ { Qt::Key_AudioRepeat, QT_TRANSLATE_NOOP("QShortcut", "Audio Repeat") }, -+ { Qt::Key_AudioRandomPlay, QT_TRANSLATE_NOOP("QShortcut", "Audio Random Play") }, -+ { Qt::Key_Subtitle, QT_TRANSLATE_NOOP("QShortcut", "Subtitle") }, -+ { Qt::Key_AudioCycleTrack, QT_TRANSLATE_NOOP("QShortcut", "Audio Cycle Track") }, -+ { Qt::Key_Time, QT_TRANSLATE_NOOP("QShortcut", "Time") }, -+ { Qt::Key_Select, QT_TRANSLATE_NOOP("QShortcut", "Select") }, -+ { Qt::Key_View, QT_TRANSLATE_NOOP("QShortcut", "View") }, -+ { Qt::Key_TopMenu, QT_TRANSLATE_NOOP("QShortcut", "Top Menu") }, -+ { Qt::Key_Suspend, QT_TRANSLATE_NOOP("QShortcut", "Suspend") }, -+ { Qt::Key_Hibernate, QT_TRANSLATE_NOOP("QShortcut", "Hibernate") }, - - // -------------------------------------------------------------- - // More consistent namings --- -1.6.2.5 - diff --git a/0118-qtcopy-define.diff b/0118-qtcopy-define.diff deleted file mode 100644 index e3b86a8..0000000 --- a/0118-qtcopy-define.diff +++ /dev/null @@ -1,24 +0,0 @@ -qt-bugs@ issue : none -Trolltech task ID : none -applied: yes -author: David Faure - -Needed to distinguish qt-copy from released versions of qt, at least while -we backport API additions to qt-copy. - -Index: src/corelib/global/qglobal.h -=================================================================== ---- src/corelib/global/qglobal.h (revision 536662) -+++ src/corelib/global/qglobal.h (working copy) -@@ -38,6 +38,11 @@ - #include - #endif - -+/* QT_KDE_QT_COPY is set in qt-copy so that we know when we can use features backported to qt-copy -+ Keep in mind that it should also work with the right release of Qt, so use something like: -+ #if defined(QT_KDE_QT_COPY) || QT_VERSION >= 0x040200 */ -+#define QT_KDE_QT_COPY -+ - /* - The operating system, must be one of: (Q_OS_x) - diff --git a/0274-shm-native-image-fix.patch b/0274-shm-native-image-fix.patch deleted file mode 100644 index 03247a4..0000000 --- a/0274-shm-native-image-fix.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp.me qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp ---- qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp.me 2009-10-02 18:26:02.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage.cpp 2009-10-02 18:27:13.000000000 +0200 -@@ -144,7 +144,7 @@ QImage::Format QNativeImage::systemForma - #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM) - - QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* isTextBuffer */, QWidget *widget) -- : xshmimg(0), xshmpm(0) -+ : xshmimg(0) - { - if (!X11->use_mitshm) { - image = QImage(width, height, format); -@@ -195,11 +195,6 @@ QNativeImage::QNativeImage(int width, in - shmctl(xshminfo.shmid, IPC_RMID, 0); - return; - } -- xshmpm = XShmCreatePixmap(X11->display, DefaultRootWindow(X11->display), xshmimg->data, -- &xshminfo, width, height, dd); -- if (!xshmpm) { -- qWarning() << "QNativeImage: Unable to create shared Pixmap."; -- } - } - - -@@ -208,10 +203,6 @@ QNativeImage::~QNativeImage() - if (!xshmimg) - return; - -- if (xshmpm) { -- XFreePixmap(X11->display, xshmpm); -- xshmpm = 0; -- } - XShmDetach(X11->display, &xshminfo); - xshmimg->data = 0; - XDestroyImage(xshmimg); -diff -up qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h.me qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h ---- qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h.me 2009-10-02 18:33:38.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/gui/image/qnativeimage_p.h 2009-10-02 18:34:01.000000000 +0200 -@@ -90,7 +90,6 @@ public: - - #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM) - XImage *xshmimg; -- Pixmap xshmpm; - XShmSegmentInfo xshminfo; - - #elif defined(Q_WS_MAC) -diff -up qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp.me qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp ---- qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp.me 2009-10-02 18:27:55.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/gui/kernel/qapplication_x11.cpp 2009-10-02 18:33:30.000000000 +0200 -@@ -1959,12 +1959,9 @@ void qt_init(QApplicationPrivate *priv, - bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0; - if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) { - Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display)); -- X11->use_mitshm = mitshm_pixmaps && ((defaultVisual->red_mask == 0xff0000 -- || defaultVisual->red_mask == 0xf800) -- && (defaultVisual->green_mask == 0xff00 -- || defaultVisual->green_mask == 0x7e0) -- && (defaultVisual->blue_mask == 0xff -- || defaultVisual->blue_mask == 0x1f)); -+ X11->use_mitshm = (defaultVisual->red_mask == 0xff0000 || defaultVisual->red_mask == 0xf800) -+ && (defaultVisual->green_mask == 0xff00 || defaultVisual->green_mask == 0x7e0) -+ && (defaultVisual->blue_mask == 0xff || defaultVisual->blue_mask == 0x1f); - } - } - #endif // QT_NO_MITSHM -diff -up qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp.me qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp ---- qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp.me 2009-10-02 18:34:18.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/gui/painting/qwindowsurface_raster.cpp 2009-10-02 18:35:54.000000000 +0200 -@@ -220,9 +220,16 @@ void QRasterWindowSurface::flush(QWidget - - QRect br = rgn.boundingRect().translated(offset); - #ifndef QT_NO_MITSHM -- if (d_ptr->image->xshmpm) { -- XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc, -- br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y()); -+ if (d_ptr->image->xshmimg && (br.width() * br.height() > 65536)) { -+ const QImage &src = d->image->image; -+ br = br.intersected(src.rect()); -+ // Hack to make sure we satisify the PutImage() constraints in the X server, -+ // since the doShmPutImage() route currently forces a migration to system ram. -+ wbr.setX(wbr.x() - br.x()); -+ br.setX(0); -+ br.setWidth(src.width()); -+ XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg, -+ br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False); - XSync(X11->display, False); - } else - #endif diff --git a/0283-do-not-deduce-scrollbar-extent-twice.diff b/0283-do-not-deduce-scrollbar-extent-twice.diff deleted file mode 100644 index 53ec85e..0000000 --- a/0283-do-not-deduce-scrollbar-extent-twice.diff +++ /dev/null @@ -1,35 +0,0 @@ -qt-bugs@ issue : none -Qt Software task ID : none -bugs.kde.org number : none -applied: no -author: Aurélien Gâteau - -Do not deduce scrollbar extent twice if scrollbar policy is -Qt::ScrollBarAlwaysOn. - -This patch has been merged in master but won't be in 4.5. -http://qt.gitorious.org/qt/qt/merge_requests/432 - ---- src/gui/itemviews/qlistview.cpp -+++ src/gui/itemviews/qlistview.cpp -@@ -1969,10 +1969,16 @@ void QListViewPrivate::prepareItemsLayout() - int frameAroundContents = 0; - if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents)) - frameAroundContents = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth) * 2; -- int verticalMargin = vbarpolicy==Qt::ScrollBarAlwaysOff ? 0 : -- q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->verticalScrollBar()) + frameAroundContents; -- int horizontalMargin = hbarpolicy==Qt::ScrollBarAlwaysOff ? 0 : -- q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->horizontalScrollBar()) + frameAroundContents; -+ -+ // maximumViewportSize() already takes scrollbar into account if policy is -+ // Qt::ScrollBarAlwaysOn but scrollbar extent must be deduced if policy -+ // is Qt::ScrollBarAsNeeded -+ int verticalMargin = vbarpolicy==Qt::ScrollBarAsNeeded -+ ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->verticalScrollBar()) + frameAroundContents -+ : 0; -+ int horizontalMargin = hbarpolicy==Qt::ScrollBarAsNeeded -+ ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->horizontalScrollBar()) + frameAroundContents -+ : 0; - - layoutBounds.adjust(0, 0, -verticalMargin, -horizontalMargin); - diff --git a/0285-qgv-dontshowchildren.diff b/0285-qgv-dontshowchildren.diff deleted file mode 100644 index 52fb798..0000000 --- a/0285-qgv-dontshowchildren.diff +++ /dev/null @@ -1,24 +0,0 @@ -qt-bugs@ issue : unknows -Qt Software task ID : 197802 -bugs.kde.org number : bugs on the issue not reported yed -applied: no -author: Marco Martin - -This patch makes children items of an hidden qgraphicsitem not be shown if show() is called on them. fixes several issues like the opensocial plasma widget and the Plasma desktop toolbox behaviour. - -Index: src/gui/graphicsview/qgraphicsitem.cpp -=================================================================== ---- src/gui/graphicsview/qgraphicsitem.cpp (revision 958522) -+++ src/gui/graphicsview/qgraphicsitem.cpp (working copy) -@@ -1522,6 +1522,11 @@ - if (visible == quint32(newVisible)) - return; - -+ QGraphicsItem *parent(q_ptr->parentItem()); -+ if (parent && newVisible && !parent->d_ptr->visible) { -+ return; -+ } -+ - // Modify the property. - const QVariant newVisibleVariant(q_ptr->itemChange(QGraphicsItem::ItemVisibleChange, - quint32(newVisible))); diff --git a/kde-qt-patches.sh b/kde-qt-patches.sh index 47cee3e..d50d003 100644 --- a/kde-qt-patches.sh +++ b/kde-qt-patches.sh @@ -1,4 +1,6 @@ # quick-n-dirty method to fetch patches from -patched git branch # unfortunately, requires an already checked-out copy of the git repo -git format-patch --output-directory kde-qt-patches v4.5.3..4.5.3-patched +# when switching branches, use something like: git checkout --track remotes/origin/4.6-stable-patched +git format-patch --output-directory kde-qt-patches v4.6.1..origin/4.6.1-patched + diff --git a/qeventdispatcher_glib_fix.diff b/qeventdispatcher_glib_fix.diff deleted file mode 100644 index 482c0a3..0000000 --- a/qeventdispatcher_glib_fix.diff +++ /dev/null @@ -1,282 +0,0 @@ -commit 063bded33b417cdf92fd51366fc7fdb06dea00ba -Author: Bradley T. Hughes -Date: Wed Sep 23 13:51:17 2009 +0200 - - Fix regressions in qeventloop, qtimer, and qsocketnotifier autotests - - Commit ed375675d4a4f6fd63edeb242e23c87b3de4be6f triggers a behavior in - Glib's mainloop implementation where some event sources are not - "serviced" every iteration of the mainloop context. This breaks an - invariant that many tests relied on, so we need to solve the problem. - - The invariant is that a newly added timer that would normally fire on - the next pass of the event loop (liker a zero timer) SHOULD actually - fire. We do this by registering 2 timer event sources with Glib's - mainloop: one normal priority source and one idle priority source. The - idle priority source is the one that will send events most of the - time, with the normal priority one taking over only when - processEvents() is called manually. - - Task-number: QT-877 - Reviewed-by: jbache - Reviewed-by: thiago - Reviewed-by: denis - (cherry picked from commit d0d0fdb8e46351b4ab8492de31e5363ef6662b57) - (cherry picked from commit 0ed23e95fa756fd851f509a565f91ab43fc30449) - -diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp -index 87e9728..7f6dbb6 100644 ---- a/src/corelib/kernel/qeventdispatcher_glib.cpp -+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp -@@ -127,16 +127,11 @@ struct GTimerSource - GSource source; - QTimerInfoList timerList; - QEventLoop::ProcessEventsFlags processEventsFlags; -+ bool runWithIdlePriority; - }; - --static gboolean timerSourcePrepare(GSource *source, gint *timeout) -+static gboolean timerSourcePrepareHelper(GTimerSource *src, gint *timeout) - { -- gint dummy; -- if (!timeout) -- timeout = &dummy; -- -- GTimerSource *src = reinterpret_cast(source); -- - timeval tv = { 0l, 0l }; - if (!(src->processEventsFlags & QEventLoop::X11ExcludeTimers) && src->timerList.timerWait(tv)) - *timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000); -@@ -146,10 +141,8 @@ static gboolean timerSourcePrepare(GSource *source, gint *timeout) - return (*timeout == 0); - } - --static gboolean timerSourceCheck(GSource *source) -+static gboolean timerSourceCheckHelper(GTimerSource *src) - { -- GTimerSource *src = reinterpret_cast(source); -- - if (src->timerList.isEmpty() - || (src->processEventsFlags & QEventLoop::X11ExcludeTimers)) - return false; -@@ -160,9 +153,35 @@ static gboolean timerSourceCheck(GSource *source) - return true; - } - -+static gboolean timerSourcePrepare(GSource *source, gint *timeout) -+{ -+ gint dummy; -+ if (!timeout) -+ timeout = &dummy; -+ -+ GTimerSource *src = reinterpret_cast(source); -+ if (src->runWithIdlePriority) { -+ if (timeout) -+ *timeout = -1; -+ return false; -+ } -+ -+ return timerSourcePrepareHelper(src, timeout); -+} -+ -+static gboolean timerSourceCheck(GSource *source) -+{ -+ GTimerSource *src = reinterpret_cast(source); -+ if (src->runWithIdlePriority) -+ return false; -+ return timerSourceCheckHelper(src); -+} -+ - static gboolean timerSourceDispatch(GSource *source, GSourceFunc, gpointer) - { -- (void) reinterpret_cast(source)->timerList.activateTimers(); -+ GTimerSource *timerSource = reinterpret_cast(source); -+ timerSource->runWithIdlePriority = true; -+ (void) timerSource->timerList.activateTimers(); - return true; // ??? don't remove, right again? - } - -@@ -175,6 +194,53 @@ static GSourceFuncs timerSourceFuncs = { - NULL - }; - -+struct GIdleTimerSource -+{ -+ GSource source; -+ GTimerSource *timerSource; -+}; -+ -+static gboolean idleTimerSourcePrepare(GSource *source, gint *timeout) -+{ -+ GIdleTimerSource *idleTimerSource = reinterpret_cast(source); -+ GTimerSource *timerSource = idleTimerSource->timerSource; -+ if (!timerSource->runWithIdlePriority) { -+ // Yield to the normal priority timer source -+ if (timeout) -+ *timeout = -1; -+ return false; -+ } -+ -+ return timerSourcePrepareHelper(timerSource, timeout); -+} -+ -+static gboolean idleTimerSourceCheck(GSource *source) -+{ -+ GIdleTimerSource *idleTimerSource = reinterpret_cast(source); -+ GTimerSource *timerSource = idleTimerSource->timerSource; -+ if (!timerSource->runWithIdlePriority) { -+ // Yield to the normal priority timer source -+ return false; -+ } -+ return timerSourceCheckHelper(timerSource); -+} -+ -+static gboolean idleTimerSourceDispatch(GSource *source, GSourceFunc, gpointer) -+{ -+ GTimerSource *timerSource = reinterpret_cast(source)->timerSource; -+ (void) timerSourceDispatch(&timerSource->source, 0, 0); -+ return true; -+} -+ -+static GSourceFuncs idleTimerSourceFuncs = { -+ idleTimerSourcePrepare, -+ idleTimerSourceCheck, -+ idleTimerSourceDispatch, -+ NULL, -+ NULL, -+ NULL -+}; -+ - struct GPostEventSource - { - GSource source; -@@ -235,14 +301,15 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) - g_main_context_ref(mainContext); - } else { - QCoreApplication *app = QCoreApplication::instance(); -- if (app && QThread::currentThread() == app->thread()) { -- mainContext = g_main_context_default(); -- g_main_context_ref(mainContext); -- } else { -- mainContext = g_main_context_new(); -- } -+ if (app && QThread::currentThread() == app->thread()) { -+ mainContext = g_main_context_default(); -+ g_main_context_ref(mainContext); -+ } else { -+ mainContext = g_main_context_new(); -+ } - } - -+ // setup post event source - postEventSource = reinterpret_cast(g_source_new(&postEventSourceFuncs, - sizeof(GPostEventSource))); - postEventSource->serialNumber = 1; -@@ -257,14 +324,21 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) - g_source_set_can_recurse(&socketNotifierSource->source, true); - g_source_attach(&socketNotifierSource->source, mainContext); - -- // setup timerSource -+ // setup normal and idle timer sources - timerSource = reinterpret_cast(g_source_new(&timerSourceFuncs, - sizeof(GTimerSource))); - (void) new (&timerSource->timerList) QTimerInfoList(); - timerSource->processEventsFlags = QEventLoop::AllEvents; -+ timerSource->runWithIdlePriority = false; - g_source_set_can_recurse(&timerSource->source, true); -- g_source_set_priority(&timerSource->source, G_PRIORITY_DEFAULT_IDLE); - g_source_attach(&timerSource->source, mainContext); -+ -+ idleTimerSource = reinterpret_cast(g_source_new(&idleTimerSourceFuncs, -+ sizeof(GIdleTimerSource))); -+ idleTimerSource->timerSource = timerSource; -+ g_source_set_can_recurse(&idleTimerSource->source, true); -+ g_source_set_priority(&idleTimerSource->source, G_PRIORITY_DEFAULT_IDLE); -+ g_source_attach(&idleTimerSource->source, mainContext); - } - - QEventDispatcherGlib::QEventDispatcherGlib(QObject *parent) -@@ -272,12 +346,9 @@ QEventDispatcherGlib::QEventDispatcherGlib(QObject *parent) - { - } - --QEventDispatcherGlib::QEventDispatcherGlib(GMainContext *mainContext, -- QObject *parent) -- : QAbstractEventDispatcher(*(new QEventDispatcherGlibPrivate(mainContext)), -- parent) --{ --} -+QEventDispatcherGlib::QEventDispatcherGlib(GMainContext *mainContext, QObject *parent) -+ : QAbstractEventDispatcher(*(new QEventDispatcherGlibPrivate(mainContext)), parent) -+{ } - - QEventDispatcherGlib::~QEventDispatcherGlib() - { -@@ -289,6 +360,9 @@ QEventDispatcherGlib::~QEventDispatcherGlib() - g_source_destroy(&d->timerSource->source); - g_source_unref(&d->timerSource->source); - d->timerSource = 0; -+ g_source_destroy(&d->idleTimerSource->source); -+ g_source_unref(&d->idleTimerSource->source); -+ d->idleTimerSource = 0; - - // destroy socket notifier source - for (int i = 0; i < d->socketNotifierSource->pollfds.count(); ++i) { -@@ -324,11 +398,16 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags) - // tell postEventSourcePrepare() and timerSource about any new flags - QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; - d->timerSource->processEventsFlags = flags; -- -+ -+ if (!(flags & QEventLoop::EventLoopExec)) { -+ // force timers to be sent at normal priority -+ d->timerSource->runWithIdlePriority = false; -+ } -+ - bool result = g_main_context_iteration(d->mainContext, canWait); - while (!result && canWait) - result = g_main_context_iteration(d->mainContext, canWait); -- -+ - d->timerSource->processEventsFlags = savedFlags; - - if (canWait) -diff --git a/src/corelib/kernel/qeventdispatcher_glib_p.h b/src/corelib/kernel/qeventdispatcher_glib_p.h -index eb7fb75..4103aa3 100644 ---- a/src/corelib/kernel/qeventdispatcher_glib_p.h -+++ b/src/corelib/kernel/qeventdispatcher_glib_p.h -@@ -98,6 +98,7 @@ protected: - struct GPostEventSource; - struct GSocketNotifierSource; - struct GTimerSource; -+struct GIdleTimerSource; - - class Q_CORE_EXPORT QEventDispatcherGlibPrivate : public QAbstractEventDispatcherPrivate - { -@@ -108,6 +109,7 @@ public: - GPostEventSource *postEventSource; - GSocketNotifierSource *socketNotifierSource; - GTimerSource *timerSource; -+ GIdleTimerSource *idleTimerSource; - }; - - QT_END_NAMESPACE -diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp -index 897bb49..903b0eb 100644 ---- a/src/corelib/kernel/qeventdispatcher_unix.cpp -+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp -@@ -423,10 +423,10 @@ bool QTimerInfoList::timerWait(timeval &tm) - // Find first waiting timer not already active - QTimerInfo *t = 0; - for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) { -- if (!(*it)->inTimerEvent) { -- t = *it; -- break; -- } -+ if (!(*it)->inTimerEvent) { -+ t = *it; -+ break; -+ } - } - - if (!t) diff --git a/qt-cups-1.patch b/qt-cups-1.patch new file mode 100644 index 0000000..013e3e2 --- /dev/null +++ b/qt-cups-1.patch @@ -0,0 +1,92 @@ +diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp +index 23f5831..f34277a 100644 +--- a/src/gui/dialogs/qprintdialog_unix.cpp ++++ b/src/gui/dialogs/qprintdialog_unix.cpp +@@ -569,6 +569,34 @@ void QPrintDialogPrivate::setTabs(const QList &tabWidgets) + void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups) + { + options.duplex->setEnabled(cups && cups->ppdOption("Duplex")); ++ ++ if(cups) ++ { ++ const ppd_option_t* duplex = cups->ppdOption("Duplex"); ++ if( duplex ) ++ { ++ // copy default ppd duplex to qt dialog ++ if( qstrcmp(duplex->defchoice, "DuplexTumble") == 0 ) ++ options.duplexShort->setChecked(true); ++ else if ( qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0 ) ++ options.duplexLong->setChecked(true); ++ else ++ options.noDuplex->setChecked(true); ++ } ++ ++ // set default color ++ if( cups->currentPPD()->color_device ) ++ options.color->setChecked(true); ++ else ++ options.grayscale->setChecked(true); ++ ++ // set collation ++ const ppd_option_t *collate = cups->ppdOption("Collate"); ++ if( collate ) ++ { ++ options.collate->setChecked(qstrcmp(collate->defchoice, "True")==0); ++ } ++ } + } + #endif + +diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp +index 4d2b50a..c7ab1b3 100644 +--- a/src/gui/painting/qprinter.cpp ++++ b/src/gui/painting/qprinter.cpp +@@ -627,6 +627,48 @@ QPrinter::QPrinter(PrinterMode mode) + && d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) { + setOutputFormat(QPrinter::PdfFormat); + } ++ ++#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) ++ // fill in defaults from ppd file ++ QCUPSSupport cups; ++ ++ int printernum = -1; ++ for(int i = 0; i < cups.availablePrintersCount(); i++) ++ { ++ if( printerName().toLocal8Bit() == cups.availablePrinters()[i].name ) ++ printernum = i; ++ } ++ if( printernum >= 0 ) ++ { ++ cups.setCurrentPrinter(printernum); ++ ++ const ppd_option_t* duplex = cups.ppdOption("Duplex"); ++ if( duplex ) ++ { ++ // copy default ppd duplex to qt dialog ++ if( qstrcmp(duplex->defchoice, "DuplexTumble") == 0 ) ++ setDuplex(DuplexShortSide); ++ else if ( qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0 ) ++ setDuplex(DuplexLongSide); ++ else ++ setDuplex(DuplexNone); ++ } ++ ++ // set default color ++ if( cups.currentPPD()->color_device ) ++ setColorMode(Color); ++ else ++ setColorMode(GrayScale); ++ ++ // set collation ++ const ppd_option_t *collate = cups.ppdOption("Collate"); ++ if( collate ) ++ { ++ setCollateCopies(qstrcmp(collate->defchoice, "True")==0); ++ } ++ } ++ ++#endif + } + + /*! diff --git a/qt-everywhere-opensource-src-4.6.0-beta1-qdoc3.patch b/qt-everywhere-opensource-src-4.6.0-beta1-qdoc3.patch new file mode 100644 index 0000000..e90609a --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.0-beta1-qdoc3.patch @@ -0,0 +1,21 @@ +diff -up qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro.qdoc3 qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro +--- qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro.qdoc3 2009-10-13 10:34:08.000000000 -0500 ++++ qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro 2009-10-16 14:55:27.024789581 -0500 +@@ -105,3 +105,6 @@ SOURCES += apigenerator.cpp \ + webxmlgenerator.cpp \ + yyindent.cpp + ++TARGET= qdoc3 ++target.path = $$[QT_INSTALL_BINS] ++INSTALLS += target +diff -up qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro.qdoc3 qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro +--- qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro.qdoc3 2009-10-13 10:34:08.000000000 -0500 ++++ qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro 2009-10-16 14:57:49.699789384 -0500 +@@ -14,6 +14,7 @@ no-png { + SUBDIRS += designer + } + SUBDIRS += linguist ++ SUBDIRS += qdoc3 + symbian: SUBDIRS = designer + wince*: SUBDIRS = qtestlib designer + unix:!mac:!embedded:contains(QT_CONFIG, qt3support):SUBDIRS += qtconfig diff --git a/qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch b/qt-everywhere-opensource-src-4.6.0-gst-pulsaudio.patch similarity index 57% rename from qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch rename to qt-everywhere-opensource-src-4.6.0-gst-pulsaudio.patch index 6ccefab..6f7b4b4 100644 --- a/qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch +++ b/qt-everywhere-opensource-src-4.6.0-gst-pulsaudio.patch @@ -1,20 +1,20 @@ -diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/audiooutput.cpp.than qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/audiooutput.cpp ---- qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/audiooutput.cpp.than 2009-08-16 14:20:43.000000000 +0200 -+++ qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/audiooutput.cpp 2009-08-16 14:45:56.000000000 +0200 -@@ -141,7 +141,9 @@ bool AudioOutput::setOutputDevice(int ne +diff -up qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp.gst-pulsaudio qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp +--- qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp.gst-pulsaudio 2009-11-27 02:27:50.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp 2009-12-01 13:36:43.000000000 +0100 +@@ -148,7 +148,9 @@ bool AudioOutput::setOutputDevice(int ne // Save previous state GstState oldState = GST_STATE(m_audioSink); const QByteArray oldDeviceValue = GstHelper::property(m_audioSink, "device"); -- const QByteArray deviceId = deviceList.at(newDevice).gstId; -+ const QByteArray deviceId = (deviceList.at(newDevice).gstId == "PulseAudio" -+ ? "default" -+ : deviceList.at(newDevice).gstId); +- const QByteArray deviceId = deviceList.at(deviceIdx).gstId; ++ const QByteArray deviceId = (deviceList.at(deviceIdx).gstId == "PulseAudio" ++ ? "default" ++ : deviceList.at(deviceIdx).gstId); m_device = newDevice; // We test if the device can be opened by checking if it can go from NULL to READY state -diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager.cpp.than qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager.cpp ---- qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager.cpp.than 2009-08-15 12:39:08.000000000 +0200 -+++ qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager.cpp 2009-08-16 14:45:13.000000000 +0200 +diff -up qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp.gst-pulsaudio qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp +--- qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp.gst-pulsaudio 2009-11-27 02:27:50.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp 2009-12-01 13:04:18.000000000 +0100 @@ -50,6 +50,8 @@ AudioDevice::AudioDevice(DeviceManager * //get name from device if (gstId == "default") { @@ -24,7 +24,7 @@ diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager } else { GstElement *aSink= manager->createAudioSink(); -@@ -175,6 +177,18 @@ GstElement *DeviceManager::createAudioSi +@@ -178,6 +180,18 @@ GstElement *DeviceManager::createAudioSi } } @@ -43,7 +43,7 @@ diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/devicemanager #ifdef USE_ALSASINK2 if (!sink) { sink = gst_element_factory_make ("_k_alsasink", NULL); -@@ -306,8 +320,12 @@ void DeviceManager::updateDeviceList() +@@ -311,8 +325,12 @@ void DeviceManager::updateDeviceList() QList list; if (audioSink) { diff --git a/qt-x11-opensource-src-4.5.0-qdoc3.patch b/qt-x11-opensource-src-4.5.0-qdoc3.patch deleted file mode 100644 index 7c32ca9..0000000 --- a/qt-x11-opensource-src-4.5.0-qdoc3.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur qt-orig/tools/qdoc3/qdoc3.pro qt-4.5.2/tools/qdoc3/qdoc3.pro ---- qt-orig/tools/qdoc3/qdoc3.pro 2009-06-20 06:57:59.000000000 +0200 -+++ qt-4.5.2/tools/qdoc3/qdoc3.pro 2009-06-25 20:00:12.000000000 +0200 -@@ -99,3 +99,6 @@ - webxmlgenerator.cpp \ - yyindent.cpp - -+TARGET= qdoc3 -+target.path = $$[QT_INSTALL_BINS] -+INSTALLS += target -diff -ur qt-orig/tools/tools.pro qt-4.5.2/tools/tools.pro ---- qt-orig/tools/tools.pro 2009-06-20 06:57:59.000000000 +0200 -+++ qt-4.5.2/tools/tools.pro 2009-06-25 19:59:19.000000000 +0200 -@@ -13,6 +13,7 @@ - SUBDIRS += designer - } - SUBDIRS += linguist -+ SUBDIRS += qdoc3 - wince*: SUBDIRS = qtestlib designer - unix:!mac:!embedded:contains(QT_CONFIG, qt3support):SUBDIRS += qtconfig - win32:!wince*:SUBDIRS += activeqt diff --git a/qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch b/qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch deleted file mode 100644 index fa80e1f..0000000 --- a/qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp.cve-2009-2816-cors qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp ---- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp.cve-2009-2816-cors 2009-09-29 13:01:37.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp 2009-11-03 13:47:52.974837432 +0100 -@@ -735,7 +735,6 @@ void XMLHttpRequest::makeCrossSiteAccess - } - - preflightRequest.setHTTPHeaderField("Access-Control-Request-Headers", String::adopt(headerBuffer)); -- preflightRequest.addHTTPHeaderFields(m_requestHeaders); - } - - if (m_async) { diff --git a/qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch b/qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch deleted file mode 100644 index 14e0cc0..0000000 --- a/qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch +++ /dev/null @@ -1,284 +0,0 @@ -diff -U0 qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/ChangeLog.cve-2009-3384-ftp-ls-handling qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/ChangeLog ---- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/ChangeLog.cve-2009-3384-ftp-ls-handling 2009-09-29 13:01:35.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/ChangeLog 2009-11-03 14:53:34.008898552 +0100 -@@ -0,0 +1,14 @@ -+2009-09-24 Brady Eidson -+ -+ Reviewed by Sam Weinig. -+ -+ Merge changes from Mozilla's FTP directory parser. -+ and https://bugs.webkit.org/show_bug.cgi?id=29294 -+ -+ FTP layout tests not possible at this time. -+ https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible. -+ -+ * loader/FTPDirectoryParser.cpp: -+ (WebCore::ParsingFailed): -+ (WebCore::parseOneFTPLine): -+ -diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp.cve-2009-3384-ftp-ls-handling qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp ---- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp.cve-2009-3384-ftp-ls-handling 2009-09-29 13:01:36.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp 2009-11-03 14:53:34.044898565 +0100 -@@ -53,6 +53,13 @@ static struct tm *gmtimeQt(const time_t - #define gmtime_r(x, y) gmtime_s((y), (x)) - #endif - -+static inline FTPEntryType ParsingFailed(ListState& state) -+{ -+ if (state.parsedOne || state.listStyle) /* junk if we fail to parse */ -+ return FTPJunkEntry; /* this time but had previously parsed sucessfully */ -+ return FTPMiscEntry; /* its part of a comment or error message */ -+} -+ - FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& result) - { - result.clear(); -@@ -122,6 +129,9 @@ FTPEntryType parseOneFTPLine(const char* - } - } - -+ if (!numtoks) -+ return ParsingFailed(state); -+ - linelen_sans_wsp = &(tokens[numtoks-1][toklen[numtoks-1]]) - tokens[0]; - if (numtoks == (sizeof(tokens)/sizeof(tokens[0])) ) - { -@@ -352,11 +362,16 @@ FTPEntryType parseOneFTPLine(const char* - pos++; - p++; - } -- if (lstyle && pos < (toklen[0]-1) && *p == ']') -+ if (lstyle && pos < (toklen[0]-1)) - { -+ /* ']' was found and there is at least one character after it */ -+ ASSERT(*p == ']'); - pos++; - p++; - tokmarker = pos; /* length of leading "[DIR1.DIR2.etc]" */ -+ } else { -+ /* not a CMU style listing */ -+ lstyle = 0; - } - } - while (lstyle && pos < toklen[0] && *p != ';') -@@ -383,7 +398,7 @@ FTPEntryType parseOneFTPLine(const char* - pos -= tokmarker; /* => fnlength sans "[DIR1.DIR2.etc]" */ - p = &(tokens[0][tokmarker]); /* offset of basename */ - -- if (!lstyle || pos > 80) /* VMS filenames can't be longer than that */ -+ if (!lstyle || pos == 0 || pos > 80) /* VMS filenames can't be longer than that */ - { - lstyle = 0; - } -@@ -776,7 +791,7 @@ FTPEntryType parseOneFTPLine(const char* - state.parsedOne = true; - state.listStyle = lstyle; - -- p = &(line[linelen_sans_wsp]); /* line end sans wsp */ -+ p = &(line[linelen]); /* line end */ - result.caseSensitive = true; - result.filename = tokens[3]; - result.filenameLength = p - tokens[3]; -@@ -784,29 +799,46 @@ FTPEntryType parseOneFTPLine(const char* - - if (*tokens[2] != '<') /* not or */ - { -+ // try to handle correctly spaces at the beginning of the filename -+ // filesize (token[2]) must end at offset 38 -+ if (tokens[2] + toklen[2] - line == 38) { -+ result.filename = &(line[39]); -+ result.filenameLength = p - result.filename; -+ } - result.type = FTPFileEntry; - pos = toklen[2]; - result.fileSize = String(tokens[2], pos); - } -- else if ((tokens[2][1]) != 'D') /* not */ -- { -- result.type = FTPJunkEntry; /* unknown until junc for sure */ -- if (result.filenameLength > 4) -+ else { -+ // try to handle correctly spaces at the beginning of the filename -+ // token[2] must begin at offset 24, the length is 5 or 10 -+ // token[3] must begin at offset 39 or higher -+ if (tokens[2] - line == 24 && (toklen[2] == 5 || toklen[2] == 10) && -+ tokens[3] - line >= 39) { -+ result.filename = &(line[39]); -+ result.filenameLength = p - result.filename; -+ } -+ -+ if ((tokens[2][1]) != 'D') /* not */ - { -- p = result.filename; -- for (pos = result.filenameLength - 4; pos > 0; pos--) -+ result.type = FTPJunkEntry; /* unknown until junc for sure */ -+ if (result.filenameLength > 4) - { -- if (p[0] == ' ' && p[3] == ' ' && p[2] == '>' && -- (p[1] == '=' || p[1] == '-')) -+ p = result.filename; -+ for (pos = result.filenameLength - 4; pos > 0; pos--) - { -- result.type = FTPLinkEntry; -- result.filenameLength = p - result.filename; -- result.linkname = p + 4; -- result.linknameLength = &(line[linelen_sans_wsp]) -- - result.linkname; -- break; -+ if (p[0] == ' ' && p[3] == ' ' && p[2] == '>' && -+ (p[1] == '=' || p[1] == '-')) -+ { -+ result.type = FTPLinkEntry; -+ result.filenameLength = p - result.filename; -+ result.linkname = p + 4; -+ result.linknameLength = &(line[linelen]) -+ - result.linkname; -+ break; -+ } -+ p++; - } -- p++; - } - } - } -@@ -817,8 +849,13 @@ FTPEntryType parseOneFTPLine(const char* - result.modifiedTime.tm_mon--; - result.modifiedTime.tm_mday = atoi(tokens[0]+3); - result.modifiedTime.tm_year = atoi(tokens[0]+6); -+ /* if year has only two digits then assume that -+ 00-79 is 2000-2079 -+ 80-99 is 1980-1999 */ - if (result.modifiedTime.tm_year < 80) -- result.modifiedTime.tm_year += 100; -+ result.modifiedTime.tm_year += 2000; -+ else if (result.modifiedTime.tm_year < 100) -+ result.modifiedTime.tm_year += 1900; - } - - result.modifiedTime.tm_hour = atoi(tokens[1]+0); -@@ -970,6 +1007,8 @@ FTPEntryType parseOneFTPLine(const char* - * "drwxr-xr-x 2 0 0 512 May 28 22:17 etc" - */ - -+ bool isOldHellsoft = false; -+ - if (numtoks >= 6) - { - /* there are two perm formats (Hellsoft/NetWare and *IX strmode(3)). -@@ -995,6 +1034,8 @@ FTPEntryType parseOneFTPLine(const char* - { - /* rest is FMA[S] or AFM[S] */ - lstyle = 'U'; /* very likely one of the NetWare servers */ -+ if (toklen[0] == 10) -+ isOldHellsoft = true; - } - } - } -@@ -1059,7 +1100,7 @@ FTPEntryType parseOneFTPLine(const char* - - /* check that size is numeric */ - p = tokens[tokmarker]; -- for (pos = 0; lstyle && pos < toklen[tokmarker]; pos++) -+ for (unsigned int i = 0; lstyle && i < toklen[tokmarker]; ++i) - { - if (!isASCIIDigit(*p++)) - lstyle = 0; -@@ -1068,11 +1109,11 @@ FTPEntryType parseOneFTPLine(const char* - { - month_num = 0; - p = tokens[tokmarker+1]; -- for (pos = 0;pos < (12*3); pos+=3) -+ for (unsigned int i = 0; i < (12*3); i+=3) - { -- if (p[0] == month_names[pos+0] && -- p[1] == month_names[pos+1] && -- p[2] == month_names[pos+2]) -+ if (p[0] == month_names[i+0] && -+ p[1] == month_names[i+1] && -+ p[2] == month_names[i+2]) - break; - month_num++; - } -@@ -1080,8 +1121,8 @@ FTPEntryType parseOneFTPLine(const char* - lstyle = 0; - } - } /* relative position test */ -- } /* while (pos+5) < numtoks */ -- } /* if (numtoks >= 4) */ -+ } /* for (pos = (numtoks-5); !lstyle && pos > 1; pos--) */ -+ } /* if (lstyle == 'U') */ - - if (lstyle == 'U') - { -@@ -1140,24 +1181,49 @@ FTPEntryType parseOneFTPLine(const char* - - } /* time/year */ - -- result.filename = tokens[tokmarker+4]; -- result.filenameLength = (&(line[linelen_sans_wsp])) -+ // there is exacly 1 space between filename and previous token in all -+ // outputs except old Hellsoft -+ if (!isOldHellsoft) -+ result.filename = tokens[tokmarker+3] + toklen[tokmarker+3] + 1; -+ else -+ result.filename = tokens[tokmarker+4]; -+ -+ result.filenameLength = (&(line[linelen])) - - (result.filename); - - if (result.type == FTPLinkEntry && result.filenameLength > 4) - { -- p = result.filename + 1; -- for (pos = 1; pos < (result.filenameLength - 4); pos++) -+ /* First try to use result.fe_size to find " -> " sequence. -+ This can give proper result for cases like "aaa -> bbb -> ccc". */ -+ unsigned int fileSize = result.fileSize.toUInt(); -+ -+ if (result.filenameLength > (fileSize + 4) && -+ strncmp(result.filename + result.filenameLength - fileSize - 4, " -> ", 4) == 0) -+ { -+ result.linkname = result.filename + (result.filenameLength - fileSize); -+ result.linknameLength = (&(line[linelen])) - (result.linkname); -+ result.filenameLength -= fileSize + 4; -+ } -+ else - { -- if (*p == ' ' && p[1] == '-' && p[2] == '>' && p[3] == ' ') -+ /* Search for sequence " -> " from the end for case when there are -+ more occurrences. F.e. if ftpd returns "a -> b -> c" assume -+ "a -> b" as a name. Powerusers can remove unnecessary parts -+ manually but there is no way to follow the link when some -+ essential part is missing. */ -+ p = result.filename + (result.filenameLength - 5); -+ for (pos = (result.filenameLength - 5); pos > 0; pos--) - { -- result.linkname = p + 4; -- result.linknameLength = (&(line[linelen_sans_wsp])) -- - (result.linkname); -- result.filenameLength = pos; -- break; -+ if (strncmp(p, " -> ", 4) == 0) -+ { -+ result.linkname = p + 4; -+ result.linknameLength = (&(line[linelen])) -+ - (result.linkname); -+ result.filenameLength = pos; -+ break; -+ } -+ p--; - } -- p++; - } - } - -@@ -1614,9 +1680,7 @@ FTPEntryType parseOneFTPLine(const char* - - } /* if (linelen > 0) */ - -- if (state.parsedOne || state.listStyle) /* junk if we fail to parse */ -- return FTPJunkEntry; /* this time but had previously parsed sucessfully */ -- return FTPMiscEntry; /* its part of a comment or error message */ -+ return ParsingFailed(state); - } - - } // namespace WebCore diff --git a/qt-x11-opensource-src-4.5.3-glib-event-loop.patch b/qt-x11-opensource-src-4.5.3-glib-event-loop.patch deleted file mode 100644 index 580f027..0000000 --- a/qt-x11-opensource-src-4.5.3-glib-event-loop.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.3/src/corelib/kernel/qeventdispatcher_glib.cpp.than qt-x11-opensource-src-4.5.3/src/corelib/kernel/qeventdispatcher_glib.cpp ---- qt-x11-opensource-src-4.5.3/src/corelib/kernel/qeventdispatcher_glib.cpp.than 2009-10-29 16:15:58.000000000 +0100 -+++ qt-x11-opensource-src-4.5.3/src/corelib/kernel/qeventdispatcher_glib.cpp 2009-10-29 16:16:22.000000000 +0100 -@@ -263,7 +263,6 @@ QEventDispatcherGlibPrivate::QEventDispa - (void) new (&timerSource->timerList) QTimerInfoList(); - timerSource->processEventsFlags = QEventLoop::AllEvents; - g_source_set_can_recurse(&timerSource->source, true); -- g_source_set_priority(&timerSource->source, G_PRIORITY_DEFAULT_IDLE); - g_source_attach(&timerSource->source, mainContext); - } - diff --git a/qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch b/qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch deleted file mode 100644 index 123908a..0000000 --- a/qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri.javascriptcore-disable-jit qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri ---- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri.javascriptcore-disable-jit 2009-09-29 13:01:35.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri 2009-10-06 10:39:55.976466622 +0200 -@@ -13,20 +13,6 @@ win32-* { - LIBS += -lwinmm - } - --# Disable the JIT due to numerous observed miscompilations :( --CONFIG(release):isEqual(QT_ARCH,i386) { -- JIT_DEFINES = ENABLE_JIT ENABLE_WREC ENABLE_JIT_OPTIMIZE_CALL ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS ENABLE_JIT_OPTIMIZE_ARITHMETIC -- # Require gcc >= 4.1 -- linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { -- DEFINES += $$JIT_DEFINES WTF_USE_JIT_STUB_ARGUMENT_VA_LIST -- QMAKE_CXXFLAGS += -fno-stack-protector -- QMAKE_CFLAGS += -fno-stack-protector -- } -- win32-msvc* { -- DEFINES += $$JIT_DEFINES WTF_USE_JIT_STUB_ARGUMENT_REGISTER -- } --} -- - win32-msvc*: INCLUDEPATH += $$PWD/os-win32 - wince* { - INCLUDEPATH += $$PWD/os-wince diff --git a/qt.spec b/qt.spec index 4e99716..1c616ba 100644 --- a/qt.spec +++ b/qt.spec @@ -4,19 +4,22 @@ # -no-pch disables precompiled headers, make ccache-friendly %define no_pch -no-pch -%define _default_patch_fuzz 2 +%define _default_patch_fuzz 3 + +# enable kde-qt integration/patches (currently a no-op) +%define kde_qt 1 Summary: Qt toolkit Name: qt Epoch: 1 -Version: 4.5.3 -Release: 10%{?dist} +Version: 4.6.1 +Release: 3%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions Group: System Environment/Libraries Url: http://www.qtsoftware.com/ -Source0: ftp://ftp.qt.nokia.com/qt/source/qt-x11-opensource-src-%{version}.tar.gz +Source0: http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: qt4 < %{version}-%{release} Provides: qt4 = %{version}-%{release} @@ -40,54 +43,37 @@ Patch16: qt-x11-opensource-src-4.5.1-kde4_plugins.patch # make PulseAudio the default device in Phonon Patch17: qt-x11-opensource-src-4.5.2-pulseaudio.patch Patch19: qt-x11-opensource-src-4.5.1-phonon.patch -Patch21: qt-x11-opensource-src-4.5.2-gst-pulsaudio.patch +Patch21: qt-everywhere-opensource-src-4.6.0-gst-pulsaudio.patch # use system ca-bundle certs, http://bugzilla.redhat.com/521911 Patch22: qt-x11-opensource-src-4.5.3-system_ca_certificates.patch Requires: ca-certificates -# disable JavaScriptCore JIT as it crashes with SE Linux -# http://bugzilla.redhat.com/527079 -Patch23: qt-x11-opensource-src-4.5.3-javascript-disable-jit.patch ## upstreamable bits # http://bugzilla.redhat.com/485677 -Patch51: qt-x11-opensource-src-4.5.0-qdoc3.patch +Patch51: qt-everywhere-opensource-src-4.6.0-beta1-qdoc3.patch Patch52: qt-4.5-sparc64.patch # fix invalid inline assembly in qatomic_{i386,x86_64}.h (de)ref implementations 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 -# glib-event-loop regression -Patch55: qt-x11-opensource-src-4.5.3-glib-event-loop.patch -# or fix from http://bugs.kde.org/210171 -# than reports this doesn't fix our original 3star echo bug -Patch155: http://www.davidfaure.fr/2009/qeventdispatcher_glib_fix.diff +# http://bugs.kde.org/show_bug.cgi?id=180051#c22 +Patch55: qt-cups-1.patch # security patches -Patch180: qt-x11-opensource-src-4.5.3-cve-2009-2816-cors.patch -Patch181: qt-x11-opensource-src-4.5.3-cve-2009-3384-ftp-ls-handling.patch # kde-qt git patches Patch201: 0001-This-patch-uses-object-name-as-a-fallback-for-window.patch -Patch202: 0002-This-patch-makes-override-redirect-windows-popup-me.patch -Patch203: 0003-This-patch-changes-QObjectPrivateVersion-thus-preve.patch -Patch204: 0004-This-patch-adds-support-for-using-isystem-to-allow.patch +Patch202: 0002-This-patch-makes-override-redirect-windows-popup-men.patch +Patch203: 0003-This-patch-changes-QObjectPrivateVersion-thus-preven.patch +Patch204: 0004-This-patch-adds-support-for-using-isystem-to-allow-p.patch Patch205: 0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch Patch206: 0006-Fix-configure.exe-to-do-an-out-of-source-build-on-wi.patch -Patch207: 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-g.patch -Patch208: 0008-In-a-treeview-with-columns-like-this.patch -Patch209: 0009-This-patch-fixes-deserialization-of-values-with-cust.patch -Patch210: 0010-Import-README.qt-copy-from-the-original-qt-copy.patch -Patch211: 0011-Update-this-file-to-reflect-the-workflow-with-Git-a.patch -Patch212: 0274-shm-native-image-fix.patch -Patch213: 0015-Make-QMenu-respect-the-minimum-width-set.patch -Patch214: 0016-Fill-gap-of-X.org-XFree-multimedia-special-launcher.patch -Patch215: 0017-Add-context-to-tr-calls-in-QShortcut.patch +Patch207: 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-ge.patch +Patch208: 0008-This-patch-makes-the-raster-graphics-system-use-shar.patch +Patch209: 0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch +Patch212: 0012-Add-context-to-tr-calls-in-QShortcut.patch -# these patches are not merged yet in kde-qt branches -Patch301: 0118-qtcopy-define.diff -Patch302: 0283-do-not-deduce-scrollbar-extent-twice.diff -Patch303: 0285-qgv-dontshowchildren.diff Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg Source11: hi16-phonon-gstreamer.png @@ -125,9 +111,9 @@ Source31: hi48-app-qt4-logo.png # if -phonon-backend, include in packaging (else it's omitted) %define phonon_backend_packaged 1 %endif -%define phonon_version 4.3.1 +%define phonon_version 4.3.50 %define phonon_version_major 4.3 -%define phonon_release 100 +%define phonon_release 1 %define webkit -webkit %define gtkstyle -gtkstyle %define nas -no-nas-sound @@ -354,17 +340,16 @@ Provides: qt4-sqlite = %{version}-%{release} %description sqlite %{summary}. -%package tds +%package tds Summary: TDS driver for Qt's SQL classes Group: System Environment/Libraries Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Provides: qt4-tds = %{version}-%{release} %{?_isa:Provides: qt4-tds%{?_isa} = %{version}-%{release}} -%description tds +%description tds %{summary}. - %package x11 Summary: Qt GUI-related libraries Group: System Environment/Libraries @@ -397,7 +382,7 @@ Qt libraries used for drawing widgets and OpenGL items. %prep -%setup -q -n qt-x11-opensource-src-%{version} +%setup -q -n qt-everywhere-opensource-src-%{version} # don't use -b on mkspec files, else they get installed too. # multilib hacks no longer required @@ -413,17 +398,16 @@ Qt libraries used for drawing widgets and OpenGL items. %patch19 -p1 -b .servicesfile %patch21 -p1 -b .gst-pulsaudio %patch22 -p1 -b .system_ca_certificates -%patch23 -p1 -b .javascriptcore-disable-jit %patch51 -p1 -b .qdoc3 -%patch52 -p1 -b .sparc64 +## FIXME: port patch +#patch52 -p1 -b .sparc64 +## TODO: still worth carrying? if so, upstream it. %patch53 -p1 -b .qatomic-inline-asm +## TODO: upstream me %patch54 -p1 -b .mysql_config -%patch55 -p1 -b .glib-event-loop -#patch155 -p1 -b .qeventdispatcher_glib_fix +%patch55 -p1 -b .cups-1 # security fixes -%patch180 -p1 -b .cve-2009-2816-cors -%patch181 -p1 -b .cve-2009-3384-ftp-ls-handling # kde-qt branch %patch201 -p1 -b .kde-qt-0001 @@ -433,19 +417,7 @@ Qt libraries used for drawing widgets and OpenGL items. %patch205 -p1 -b .kde-qt-0005 %patch206 -p1 -b .kde-qt-0006 %patch207 -p1 -b .kde-qt-0007 -%patch208 -p1 -b .kde-qt-0008 -%patch209 -p1 -b .kde-qt-0009 -%patch210 -p1 -b .kde-qt-0010 -%patch211 -p1 -b .kde-qt-0011 -%patch212 -p1 -b .0274-shm-native-image-fix -%patch213 -p1 -b .kde-qt-0015 -%patch214 -p1 -b .kde-qt-0016 -%patch215 -p1 -b .kde-qt-0017 - -# not yet merged ones -%patch301 -p0 -b .0118-qtcopy-define -%patch302 -p0 -b .0283-do-not-deduce-scrollbar-extent-twice -%patch303 -p0 -b .0285-qgv-dontshowchildren +%patch212 -p1 -b .kde-qt-0012 # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -520,6 +492,7 @@ done %{?phonon} %{!?phonon:-no-phonon} \ %{?phonon_backend} \ %{?no_pch} \ + -no-javascript-jit \ -sm \ -stl \ -system-libmng \ @@ -720,10 +693,12 @@ EOF # create/own %%_qt4_plugindir/styles mkdir %{buildroot}%{_qt4_plugindir}/styles +# create/own %%_qt4_plugindir/gui_platform +mkdir %{buildroot}%{_qt4_plugindir}/gui_platform %if 0%{?phonon_internal} mkdir -p %{buildroot}%{_qt4_plugindir}/phonon_backend -# needed by qtscriptgenerator +# needed by qtscriptgenerator pushd %{buildroot}%{_qt4_headerdir} ln -s phonon Phonon popd @@ -811,7 +786,7 @@ fi %files %defattr(-,root,root,-) -%doc README README.kde-qt LGPL_EXCEPTION.txt LICENSE.LGPL LICENSE.GPL3 +%doc README LGPL_EXCEPTION.txt LICENSE.LGPL LICENSE.GPL3 %if "%{_qt4_libdir}" != "%{_libdir}" /etc/ld.so.conf.d/* %dir %{_qt4_libdir} @@ -836,20 +811,20 @@ fi %endif %config(noreplace) %{_qt4_sysconfdir}/Trolltech.conf %{_qt4_datadir}/phrasebooks/ -%{_qt4_libdir}/libQtCore.so.* +%{_qt4_libdir}/libQtCore.so.4* %if 0%{?dbus:1} %if "%{_qt4_bindir}" != "%{_bindir}" %{_bindir}/qdbus %endif %{_qt4_bindir}/qdbus -%{_qt4_libdir}/libQtDBus.so.* +%{_qt4_libdir}/libQtDBus.so.4* %endif -%{_qt4_libdir}/libQtNetwork.so.* -%{_qt4_libdir}/libQtScript.so.* -%{_qt4_libdir}/libQtSql.so.* -%{_qt4_libdir}/libQtTest.so.* -%{_qt4_libdir}/libQtXml.so.* -%{_qt4_libdir}/libQtXmlPatterns.so.* +%{_qt4_libdir}/libQtNetwork.so.4* +%{_qt4_libdir}/libQtScript.so.4* +%{_qt4_libdir}/libQtSql.so.4* +%{_qt4_libdir}/libQtTest.so.4* +%{_qt4_libdir}/libQtXml.so.4* +%{_qt4_libdir}/libQtXmlPatterns.so.4* %dir %{_qt4_plugindir} %dir %{_qt4_plugindir}/sqldrivers/ %{_qt4_translationdir}/ @@ -875,6 +850,7 @@ fi %{_qt4_bindir}/qdoc3* %{_qt4_bindir}/qmake* %{_qt4_bindir}/qt3to4 +%{_qt4_bindir}/qttracereplay %{_qt4_bindir}/rcc* %{_qt4_bindir}/uic* %{_qt4_bindir}/qcollectiongenerator @@ -885,6 +861,7 @@ fi %{_qt4_bindir}/qhelpconverter %{_qt4_bindir}/qhelpgenerator %{_qt4_bindir}/xmlpatterns +%{_qt4_bindir}/xmlpatternsvalidator %if "%{_qt4_bindir}" != "%{_bindir}" %{_bindir}/lconvert %{_bindir}/lrelease* @@ -894,6 +871,7 @@ fi %{_bindir}/qdoc3 %{_bindir}/qmake* %{_bindir}/qt3to4 +%{_bindir}/qttracereplay %{_bindir}/rcc* %{_bindir}/uic* %{_bindir}/designer* @@ -906,6 +884,7 @@ fi %{_bindir}/qhelpconverter %{_bindir}/qhelpgenerator %{_bindir}/xmlpatterns +%{_bindir}/xmlpatternsvalidator %endif %if "%{_qt4_headerdir}" != "%{_includedir}" %dir %{_qt4_headerdir}/ @@ -982,7 +961,7 @@ fi %endif %if "%{?tds}" == "-plugin-sql-tds" -%files tds +%files tds %defattr(-,root,root,-) %{_qt4_plugindir}/sqldrivers/libqsqltds* %endif @@ -995,17 +974,18 @@ fi %dir %{_datadir}/kde4/services/phononbackends/ %{_datadir}/dbus-1/interfaces/org.kde.Phonon.AudioOutput.xml %endif -%{_qt4_libdir}/libQt3Support.so.* -%{_qt4_libdir}/libQtAssistantClient.so.* -%{_qt4_libdir}/libQtCLucene.so.* -%{_qt4_libdir}/libQtDesigner.so.* -%{_qt4_libdir}/libQtDesignerComponents.so.* -%{_qt4_libdir}/libQtGui.so.* -%{_qt4_libdir}/libQtHelp.so.* -%{_qt4_libdir}/libQtOpenGL.so.* -%{_qt4_libdir}/libQtScriptTools.so.* -%{_qt4_libdir}/libQtSvg.so.* -%{?webkit:%{_qt4_libdir}/libQtWebKit.so.*} +%{_qt4_libdir}/libQt3Support.so.4* +%{_qt4_libdir}/libQtAssistantClient.so.4* +%{_qt4_libdir}/libQtCLucene.so.4* +%{_qt4_libdir}/libQtDesigner.so.4* +%{_qt4_libdir}/libQtDesignerComponents.so.4* +%{_qt4_libdir}/libQtGui.so.4* +%{_qt4_libdir}/libQtHelp.so.4* +%{_qt4_libdir}/libQtMultimedia.so.4* +%{_qt4_libdir}/libQtOpenGL.so.4* +%{_qt4_libdir}/libQtScriptTools.so.4* +%{_qt4_libdir}/libQtSvg.so.4* +%{?webkit:%{_qt4_libdir}/libQtWebKit.so.4*} %{_qt4_plugindir}/* %exclude %{_qt4_plugindir}/sqldrivers #if "%{?phonon_backend}" == "-phonon-backend" @@ -1025,27 +1005,52 @@ fi %changelog -* Sat Nov 14 2009 Rex Dieter - 4.5.3-10 +* Fri Feb 05 2010 Rex Dieter - 4.6.1-3 +- improve cups support (#523846, kde#180051#c22) + +* Tue Jan 19 2010 Rex Dieter - 4.6.1-2 +- drop bitmap_font_speed patch, rejected upstream + +* Tue Jan 19 2010 Than Ngo - 4.6.1-1 +- 4.6.1 + +* Mon Jan 11 2010 Rex Dieter - 4.6.0-5 +- bitmap_font_speed patch (QTBUG-7255) + +* Sat Jan 09 2010 Rex Dieter - 4.6.0-4 +- Fix crash when QGraphicsItem destructor deletes other QGraphicsItem (kde-qt cec34b01) +- Fix a crash in KDE/Plasma with QGraphicsView. TopLevel list of items (kde-qt 63839f0c) + +* Wed Dec 23 2009 Kevin Kofler - 4.6.0-3 +- disable QtWebKit JavaScript JIT again, incompatible with SELinux (#549994) + +* Sat Dec 05 2009 Kevin Kofler - 4.6.0-2 +- own %%{_qt4_plugindir}/gui_platform + +* Tue Dec 01 2009 Than Ngo - 4.6.0-1 +- 4.6.0 + +* Tue Nov 17 2009 Rex Dieter - 4.6.0-0.6.rc1 +- qt-4.6.0-rc1 + +* Sat Nov 14 2009 Rex Dieter - 4.6.0-0.5.beta1 - -tds: Add package with TDS sqldriver (#537586) - add arch'd provides for sql drivers -* Thu Nov 12 2009 Jaroslav Reznik - 4.5.3-9 -- CVE-2009-3384 - WebKit, ftp listing handling (#525788) -- CVE-2009-2816 - WebKit, MITM Cross-Origin Resource Sharing (#525789) - -* Sun Nov 08 2009 Rex Dieter - 4.5.3-8 +* Sun Nov 08 2009 Rex Dieter - 4.6.0-0.4.beta1 - -x11: Requires: %%{name}-sqlite%{?_isa} -* Thu Oct 29 2009 Than Ngo - 4.5.3-7 -- fix glib-even-loop issue, regression which causes - Password dialogs get stuck +* Mon Oct 26 2009 Rex Dieter - 4.6.0-0.3.beta1 +- kde-qt patches (as of 20091026) -* Fri Oct 16 2009 Than Ngo - 4.5.3-6 +* Fri Oct 16 2009 Than Ngo - 4.6.0-0.2.beta1 - subpackage sqlite plugin, add Require on qt-sqlite in qt-x11 for assistant +- build/install qdoc3 again -* Wed Oct 14 2009 Rex Dieter 4.5.3-5 -- drop needless Prereq: /etc/ld.so.conf.d +* Wed Oct 14 2009 Rex Dieter - 4.6.0-0.1.beta1 +- qt-4.6.0-beta1 +- no kde-qt patches (yet) * Sat Oct 10 2009 Than Ngo - 4.5.3-4 - fix translation build issue diff --git a/sources b/sources index d8e2350..31a9d46 100644 --- a/sources +++ b/sources @@ -7,4 +7,4 @@ d9f511e4b51983b4e10eb58b320416d5 hi128-app-qt4-logo.png 12db12c009b722a6dc141f78feb7e330 hi32-phonon-gstreamer.png 86c34a1b81d44980b1381f94ed6b7a23 hi48-phonon-gstreamer.png 153505c71ec021b0a3bd4b74f2492e93 hi64-phonon-gstreamer.png -3988cf9af68be2df8a8000ede231de9b qt-x11-opensource-src-4.5.3.tar.gz +0542a4be6425451ab5f668c6899cac36 qt-everywhere-opensource-src-4.6.1.tar.gz From 421a7010eaf9fa398e6b1decadca795357dd3bf5 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 15 Feb 2010 16:34:35 +0000 Subject: [PATCH 19/41] - 4.6.2 --- .cvsignore | 4 +--- qt.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 42a63c7..a3d4a40 100644 --- a/.cvsignore +++ b/.cvsignore @@ -7,6 +7,4 @@ hi22-phonon-gstreamer.png hi32-phonon-gstreamer.png hi48-phonon-gstreamer.png hi64-phonon-gstreamer.png -qt-everywhere-opensource-src-4.6.0-rc1.tar.gz -qt-everywhere-opensource-src-4.6.0.tar.gz -qt-everywhere-opensource-src-4.6.1.tar.gz +qt-everywhere-opensource-src-4.6.2.tar.gz diff --git a/qt.spec b/qt.spec index 1c616ba..1913d35 100644 --- a/qt.spec +++ b/qt.spec @@ -12,8 +12,8 @@ Summary: Qt toolkit Name: qt Epoch: 1 -Version: 4.6.1 -Release: 3%{?dist} +Version: 4.6.2 +Release: 1%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -1005,6 +1005,9 @@ fi %changelog +* Mon Feb 15 2010 Rex Dieter - 4.6.2-1 +- 4.6.2 + * Fri Feb 05 2010 Rex Dieter - 4.6.1-3 - improve cups support (#523846, kde#180051#c22) diff --git a/sources b/sources index 31a9d46..1a97e63 100644 --- a/sources +++ b/sources @@ -7,4 +7,4 @@ d9f511e4b51983b4e10eb58b320416d5 hi128-app-qt4-logo.png 12db12c009b722a6dc141f78feb7e330 hi32-phonon-gstreamer.png 86c34a1b81d44980b1381f94ed6b7a23 hi48-phonon-gstreamer.png 153505c71ec021b0a3bd4b74f2492e93 hi64-phonon-gstreamer.png -0542a4be6425451ab5f668c6899cac36 qt-everywhere-opensource-src-4.6.1.tar.gz +eb651ee4b157c01696aa56777fc6e0e5 qt-everywhere-opensource-src-4.6.2.tar.gz From 0a814aab28fca4503b8c5bae342b2e9ad864c5e4 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 28 Feb 2010 13:27:25 +0000 Subject: [PATCH 20/41] Sync from devel: Sun Feb 28 2010 Kevin Kofler - 4.6.2-3 - fix CUPS patch not to crash if currentPPD is NULL (#566304) Tue Feb 16 2010 Rex Dieter - 4.6.2-2 - macros.qt4: s/qt45/qt46/ --- qt-cups-1.patch | 92 ------------------- qt-everywhere-opensource-src-4.6.2-cups.patch | 84 +++++++++++++++++ qt.spec | 12 ++- 3 files changed, 93 insertions(+), 95 deletions(-) delete mode 100644 qt-cups-1.patch create mode 100644 qt-everywhere-opensource-src-4.6.2-cups.patch diff --git a/qt-cups-1.patch b/qt-cups-1.patch deleted file mode 100644 index 013e3e2..0000000 --- a/qt-cups-1.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp -index 23f5831..f34277a 100644 ---- a/src/gui/dialogs/qprintdialog_unix.cpp -+++ b/src/gui/dialogs/qprintdialog_unix.cpp -@@ -569,6 +569,34 @@ void QPrintDialogPrivate::setTabs(const QList &tabWidgets) - void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups) - { - options.duplex->setEnabled(cups && cups->ppdOption("Duplex")); -+ -+ if(cups) -+ { -+ const ppd_option_t* duplex = cups->ppdOption("Duplex"); -+ if( duplex ) -+ { -+ // copy default ppd duplex to qt dialog -+ if( qstrcmp(duplex->defchoice, "DuplexTumble") == 0 ) -+ options.duplexShort->setChecked(true); -+ else if ( qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0 ) -+ options.duplexLong->setChecked(true); -+ else -+ options.noDuplex->setChecked(true); -+ } -+ -+ // set default color -+ if( cups->currentPPD()->color_device ) -+ options.color->setChecked(true); -+ else -+ options.grayscale->setChecked(true); -+ -+ // set collation -+ const ppd_option_t *collate = cups->ppdOption("Collate"); -+ if( collate ) -+ { -+ options.collate->setChecked(qstrcmp(collate->defchoice, "True")==0); -+ } -+ } - } - #endif - -diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp -index 4d2b50a..c7ab1b3 100644 ---- a/src/gui/painting/qprinter.cpp -+++ b/src/gui/painting/qprinter.cpp -@@ -627,6 +627,48 @@ QPrinter::QPrinter(PrinterMode mode) - && d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) { - setOutputFormat(QPrinter::PdfFormat); - } -+ -+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) -+ // fill in defaults from ppd file -+ QCUPSSupport cups; -+ -+ int printernum = -1; -+ for(int i = 0; i < cups.availablePrintersCount(); i++) -+ { -+ if( printerName().toLocal8Bit() == cups.availablePrinters()[i].name ) -+ printernum = i; -+ } -+ if( printernum >= 0 ) -+ { -+ cups.setCurrentPrinter(printernum); -+ -+ const ppd_option_t* duplex = cups.ppdOption("Duplex"); -+ if( duplex ) -+ { -+ // copy default ppd duplex to qt dialog -+ if( qstrcmp(duplex->defchoice, "DuplexTumble") == 0 ) -+ setDuplex(DuplexShortSide); -+ else if ( qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0 ) -+ setDuplex(DuplexLongSide); -+ else -+ setDuplex(DuplexNone); -+ } -+ -+ // set default color -+ if( cups.currentPPD()->color_device ) -+ setColorMode(Color); -+ else -+ setColorMode(GrayScale); -+ -+ // set collation -+ const ppd_option_t *collate = cups.ppdOption("Collate"); -+ if( collate ) -+ { -+ setCollateCopies(qstrcmp(collate->defchoice, "True")==0); -+ } -+ } -+ -+#endif - } - - /*! diff --git a/qt-everywhere-opensource-src-4.6.2-cups.patch b/qt-everywhere-opensource-src-4.6.2-cups.patch new file mode 100644 index 0000000..e0305e1 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-cups.patch @@ -0,0 +1,84 @@ +diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp +--- qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-11 16:55:22.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-28 04:34:16.000000000 +0100 +@@ -569,6 +569,32 @@ + void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups) + { + options.duplex->setEnabled(cups && cups->ppdOption("Duplex")); ++ ++ if (cups) { ++ const ppd_option_t* duplex = cups->ppdOption("Duplex"); ++ if (duplex) { ++ // copy default ppd duplex to qt dialog ++ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0) ++ options.duplexShort->setChecked(true); ++ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0) ++ options.duplexLong->setChecked(true); ++ else ++ options.noDuplex->setChecked(true); ++ } ++ ++ if (cups->currentPPD()) { ++ // set default color ++ if (cups->currentPPD()->color_device) ++ options.color->setChecked(true); ++ else ++ options.grayscale->setChecked(true); ++ } ++ ++ // set collation ++ const ppd_option_t *collate = cups->ppdOption("Collate"); ++ if (collate) ++ options.collate->setChecked(qstrcmp(collate->defchoice, "True")==0); ++ } + } + #endif + +diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp +--- qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp 2010-02-11 16:55:22.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp 2010-02-28 04:55:15.000000000 +0100 +@@ -627,6 +627,44 @@ + && d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) { + setOutputFormat(QPrinter::PdfFormat); + } ++ ++#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) ++ // fill in defaults from ppd file ++ QCUPSSupport cups; ++ ++ int printernum = -1; ++ for (int i = 0; i < cups.availablePrintersCount(); i++) { ++ if (printerName().toLocal8Bit() == cups.availablePrinters()[i].name) ++ printernum = i; ++ } ++ if (printernum >= 0) { ++ cups.setCurrentPrinter(printernum); ++ ++ const ppd_option_t* duplex = cups.ppdOption("Duplex"); ++ if (duplex) { ++ // copy default ppd duplex to qt dialog ++ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0) ++ setDuplex(DuplexShortSide); ++ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0) ++ setDuplex(DuplexLongSide); ++ else ++ setDuplex(DuplexNone); ++ } ++ ++ if (cups.currentPPD()) { ++ // set default color ++ if (cups.currentPPD()->color_device) ++ setColorMode(Color); ++ else ++ setColorMode(GrayScale); ++ } ++ ++ // set collation ++ const ppd_option_t *collate = cups.ppdOption("Collate"); ++ if (collate) ++ setCollateCopies(qstrcmp(collate->defchoice, "True")==0); ++ } ++#endif + } + + /*! diff --git a/qt.spec b/qt.spec index 1913d35..c088e68 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 1%{?dist} +Release: 3%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -58,7 +58,7 @@ Patch53: qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch # 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-cups-1.patch +Patch55: qt-everywhere-opensource-src-4.6.2-cups.patch # security patches @@ -675,7 +675,7 @@ EOF mkdir -p %{buildroot}%{_sysconfdir}/rpm cat >%{buildroot}%{_sysconfdir}/rpm/macros.qt4< - 4.6.2-3 +- fix CUPS patch not to crash if currentPPD is NULL (#566304) + +* Tue Feb 16 2010 Rex Dieter - 4.6.2-2 +- macros.qt4: s/qt45/qt46/ + * Mon Feb 15 2010 Rex Dieter - 4.6.2-1 - 4.6.2 From b4dd757e2adb8685fe2ac701461a82176be7e3a5 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Fri, 5 Mar 2010 14:10:32 +0000 Subject: [PATCH 21/41] Make tablet detection work with new wacom drivers (#569132) --- qt-4.5-sparc64.patch | 60 ---------------- ...ce-src-4.6.2-tablet-wacom-QTBUG-8599.patch | 69 +++++++++++++++++++ qt.spec | 23 +++++-- 3 files changed, 86 insertions(+), 66 deletions(-) delete mode 100644 qt-4.5-sparc64.patch create mode 100644 qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch diff --git a/qt-4.5-sparc64.patch b/qt-4.5-sparc64.patch deleted file mode 100644 index c7493f5..0000000 --- a/qt-4.5-sparc64.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- qt-x11-opensource-src-4.5.0/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h.orig 2009-03-15 00:21:08.000000000 -0500 -+++ qt-x11-opensource-src-4.5.0/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h 2009-03-15 00:22:38.000000000 -0500 -@@ -196,14 +196,14 @@ - #elif COMPILER(GCC) - #define WTF_USE_LOCKFREE_THREADSAFESHARED 1 - --inline void atomicIncrement(int volatile* addend) { __gnu_cxx::__atomic_add(addend, 1); } --inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, -1) - 1; } -+inline void atomicIncrement(_Atomic_word volatile* addend) { __gnu_cxx::__atomic_add(addend, 1); } -+inline _Atomic_word atomicDecrement(_Atomic_word volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, -1) - 1; } - - #endif - - template class ThreadSafeShared : Noncopyable { - public: -- ThreadSafeShared(int initialRefCount = 1) -+ ThreadSafeShared(_Atomic_word initialRefCount = 1) - : m_refCount(initialRefCount) - { - } -@@ -237,16 +237,16 @@ - return refCount() == 1; - } - -- int refCount() const -+ _Atomic_word refCount() const - { - #if !USE(LOCKFREE_THREADSAFESHARED) - MutexLocker locker(m_mutex); - #endif -- return static_cast(m_refCount); -+ return static_cast<_Atomic_word const volatile &>(m_refCount); - } - - private: -- int m_refCount; -+ _Atomic_word m_refCount; - #if !USE(LOCKFREE_THREADSAFESHARED) - mutable Mutex m_mutex; - #endif ---- qt-x11-opensource-src-4.5.0/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.orig 2009-03-15 00:21:37.000000000 -0500 -+++ qt-x11-opensource-src-4.5.0/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2009-03-15 00:22:38.000000000 -0500 -@@ -214,9 +214,16 @@ - #endif - - /* PLATFORM(SPARC64) */ --#if defined(__sparc64__) -+#if defined(__sparc64__) \ -+ || defined(__sparc__) && defined(_arch64__) - #define WTF_PLATFORM_SPARC64 1 - #define WTF_PLATFORM_BIG_ENDIAN 1 -+#else -+/* PLATFORM(SPARC) */ -+#if defined(__sparc__) -+#define WTF_PLATFORM_SPARC 1 -+#define WTF_PLATFORM_BIG_ENDIAN 1 -+#endif - #endif - - /* PLATFORM(WIN_CE) && PLATFORM(QT) diff --git a/qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch b/qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch new file mode 100644 index 0000000..ad8450c --- /dev/null +++ b/qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch @@ -0,0 +1,69 @@ +From f1e39e7dea8634695263435f0bf912ce19c43195 Mon Sep 17 00:00:00 2001 +From: Thomas Zander +Date: Thu, 4 Mar 2010 13:16:09 +0100 +Subject: [PATCH] Make tablet detection work with new wacom drivers + +wacom driver fixed a bug in assigning atom names where it messed +up the device names. Their solution apparently renamed the atoms +The type names used now are "STYLUS", "CURSOR", "ERASER", "PAD" +and "TOUCH" for each respective device. This change detects +those as our tablet input devices. + +Reviewed-by: Benjamin Poulain +Task-number: QTBUG-8599 +--- + src/gui/kernel/qapplication_x11.cpp | 9 +++++++-- + src/gui/kernel/qt_x11_p.h | 3 +++ + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp +index 121e9ec..25a7750 100644 +--- a/src/gui/kernel/qapplication_x11.cpp ++++ b/src/gui/kernel/qapplication_x11.cpp +@@ -320,9 +320,14 @@ static const char * x11_atomnames = { + "_XEMBED\0" + "_XEMBED_INFO\0" + ++ // Wacom old. (before version 0.10) + "Wacom Stylus\0" + "Wacom Cursor\0" + "Wacom Eraser\0" ++ ++ // Tablet ++ "STYLUS\0" ++ "ERASER\0" + }; + + Q_GUI_EXPORT QX11Data *qt_x11Data = 0; +@@ -2366,12 +2371,12 @@ void qt_init(QApplicationPrivate *priv, int, + gotStylus = true; + } + #else +- if (devs->type == ATOM(XWacomStylus)) { ++ if (devs->type == ATOM(XWacomStylus) || devs->type == ATOM(XTabletStylus)) { + deviceType = QTabletEvent::Stylus; + if (wacomDeviceName()->isEmpty()) + wacomDeviceName()->append(devs->name); + gotStylus = true; +- } else if (devs->type == ATOM(XWacomEraser)) { ++ } else if (devs->type == ATOM(XWacomEraser) || devs->type == ATOM(XTabletEraser)) { + deviceType = QTabletEvent::XFreeEraser; + gotEraser = true; + } +diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h +index d110084..14e04bb 100644 +--- a/src/gui/kernel/qt_x11_p.h ++++ b/src/gui/kernel/qt_x11_p.h +@@ -675,6 +675,9 @@ struct QX11Data + XWacomCursor, + XWacomEraser, + ++ XTabletStylus, ++ XTabletEraser, ++ + NPredefinedAtoms, + + _QT_SETTINGS_TIMESTAMP = NPredefinedAtoms, +-- +1.6.1 + diff --git a/qt.spec b/qt.spec index c088e68..fb9a5e5 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 3%{?dist} +Release: 5%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -51,7 +51,6 @@ Requires: ca-certificates ## upstreamable bits # http://bugzilla.redhat.com/485677 Patch51: qt-everywhere-opensource-src-4.6.0-beta1-qdoc3.patch -Patch52: qt-4.5-sparc64.patch # fix invalid inline assembly in qatomic_{i386,x86_64}.h (de)ref implementations Patch53: qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch # fix invalid assumptions about mysql_config --libs @@ -73,7 +72,7 @@ Patch207: 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-ge.patch Patch208: 0008-This-patch-makes-the-raster-graphics-system-use-shar.patch Patch209: 0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch Patch212: 0012-Add-context-to-tr-calls-in-QShortcut.patch - +Patch213: qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg Source11: hi16-phonon-gstreamer.png @@ -399,8 +398,6 @@ Qt libraries used for drawing widgets and OpenGL items. %patch21 -p1 -b .gst-pulsaudio %patch22 -p1 -b .system_ca_certificates %patch51 -p1 -b .qdoc3 -## FIXME: port patch -#patch52 -p1 -b .sparc64 ## TODO: still worth carrying? if so, upstream it. %patch53 -p1 -b .qatomic-inline-asm ## TODO: upstream me @@ -418,15 +415,23 @@ Qt libraries used for drawing widgets and OpenGL items. %patch206 -p1 -b .kde-qt-0006 %patch207 -p1 -b .kde-qt-0007 %patch212 -p1 -b .kde-qt-0012 +%patch213 -p1 -b .tablet-wacom-QTBUG-8599 # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` %define platform linux-g++ -%if "%{_qt4_datadir}" != "%{_qt4_prefix}" && "%{_lib}" == "lib64" + +# some 64bit platforms assume -64 suffix, https://bugzilla.redhat.com/569542 +%if "%{?__isa_bits}" == "64" %define platform linux-g++-64 %endif +# https://bugzilla.redhat.com/478481 +%ifarch x86_64 +%define platform linux-g++ +%endif + sed -i \ -e "s|-O2|$RPM_OPT_FLAGS|g" \ -e "s|g++.conf|g++-multilib.conf|g" mkspecs/%{platform}/qmake.conf @@ -1005,6 +1010,12 @@ fi %changelog +* Fri Mar 05 2010 Than Ngo - 4.6.2-5 +- Make tablet detection work with new wacom drivers (#569132) + +* Mon Mar 01 2010 Rex Dieter - 4.6.2-4 +- fix 64bit platform logic, use linux-g++-64 everywhere except x86_64 (#569542) + * Sun Feb 28 2010 Kevin Kofler - 4.6.2-3 - fix CUPS patch not to crash if currentPPD is NULL (#566304) From 2b737fbd9fde00c94872d92237451d51747a9328 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 14 Mar 2010 00:16:22 +0000 Subject: [PATCH 22/41] Sync from devel: Sat Mar 13 2010 Kevin Kofler - 4.6.2-7 - BR alsa-lib-devel (for QtMultimedia) Sat Mar 13 2010 Kevin Kofler - 4.6.2-6 - Provides: qt-assistant-adp(-devel) --- qt.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qt.spec b/qt.spec index fb9a5e5..b09a629 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 5%{?dist} +Release: 7%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -138,6 +138,7 @@ Source31: hi48-app-qt4-logo.png Prereq: /etc/ld.so.conf.d %endif +BuildRequires: alsa-lib-devel BuildRequires: dbus-devel >= 0.62 BuildRequires: cups-devel BuildRequires: desktop-file-utils @@ -268,6 +269,8 @@ Obsoletes: qt4-devel < %{version}-%{release} Provides: qt4-devel = %{version}-%{release} %{?_isa:Provides: qt4-devel%{?_isa} = %{version}-%{release}} Provides: qt4-static = %{version}-%{release} +Provides: qt-assistant-adp-devel = %{version}-0.%{release} +%{?_isa:Provides: qt-assistant-adp-devel%{?_isa} = %{version}-0.%{release}} %description devel This package contains the files necessary to develop @@ -373,6 +376,8 @@ Provides: %{name}-assistant = %{version}-%{release} Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: qt4-x11 < %{version}-%{release} Provides: qt4-x11 = %{version}-%{release} +Provides: qt-assistant-adp = %{version}-0.%{release} +%{?_isa:Provides: qt-assistant-adp%{?_isa} = %{version}-0.%{release}} Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -1010,6 +1015,12 @@ fi %changelog +* Sat Mar 13 2010 Kevin Kofler - 4.6.2-7 +- BR alsa-lib-devel (for QtMultimedia) + +* Sat Mar 13 2010 Kevin Kofler - 4.6.2-6 +- Provides: qt-assistant-adp(-devel) + * Fri Mar 05 2010 Than Ngo - 4.6.2-5 - Make tablet detection work with new wacom drivers (#569132) From 6aec805cced8e89a9dcf5701ce8fcf9b0b6ffddf Mon Sep 17 00:00:00 2001 From: Jaroslav Reznik Date: Wed, 17 Mar 2010 13:16:38 +0000 Subject: [PATCH 23/41] - WebKit security update: CVE-2010-0046, CVE-2010-0049, CVE-2010-0050, CVE-2010-0051, CVE-2010-0052, CVE-2010-0054 --- ...1-lax-css-parsing-cross-domain-theft.patch | 267 ++++++++++++++++++ ...54-image-element-pointer-name-getter.patch | 85 ++++++ ...-2010-0046-css-format-mem-corruption.patch | 25 ++ ...e-2010-0049-freed-line-boxes-ltr-rtl.patch | 29 ++ ...2010-0050-crash-misnested-style-tags.patch | 13 + ...cve-2010-0052-destroyed-input-cached.patch | 21 ++ qt.spec | 19 +- 7 files changed, 458 insertions(+), 1 deletion(-) create mode 100644 qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch create mode 100644 qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch create mode 100644 qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch create mode 100644 qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch create mode 100644 qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch create mode 100644 qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch diff --git a/qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch b/qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch new file mode 100644 index 0000000..e4e32b3 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch @@ -0,0 +1,267 @@ +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y 2010-02-25 17:07:29.114742034 +0100 +@@ -416,7 +416,9 @@ valid_rule: + ; + + rule: +- valid_rule ++ valid_rule { ++ static_cast(parser)->m_hadSyntacticallyValidCSSRule = true; ++ } + | invalid_rule + | invalid_at + | invalid_import +@@ -1517,8 +1519,12 @@ invalid_rule: + ; + + invalid_block: +- '{' error invalid_block_list error closing_brace +- | '{' error closing_brace ++ '{' error invalid_block_list error closing_brace { ++ static_cast(parser)->invalidBlockHit(); ++ } ++ | '{' error closing_brace { ++ static_cast(parser)->invalidBlockHit(); ++ } + ; + + invalid_block_list: +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp 2010-02-25 17:13:34.292803953 +0100 +@@ -25,6 +25,7 @@ + #include "CachedCSSStyleSheet.h" + #include "DocLoader.h" + #include "Document.h" ++#include "SecurityOrigin.h" + #include "MediaList.h" + #include "Settings.h" + #include +@@ -60,11 +61,21 @@ void CSSImportRule::setCSSStyleSheet(con + m_styleSheet->setParent(0); + m_styleSheet = CSSStyleSheet::create(this, url, charset); + ++ bool crossOriginCSS = false; ++ bool validMIMEType = false; + CSSStyleSheet* parent = parentStyleSheet(); + bool strict = !parent || parent->useStrictParsing(); +- String sheetText = sheet->sheetText(strict); ++ bool enforceMIMEType = strict; ++ ++ String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType); + m_styleSheet->parseString(sheetText, strict); + ++ if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(KURL(ParsedURLString, url))) ++ crossOriginCSS = true; ++ ++ if (crossOriginCSS && !validMIMEType && !m_styleSheet->hasSyntacticallyValidCSSHeader()) ++ m_styleSheet = CSSStyleSheet::create(this, url, charset); ++ + if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) { + // Work around . + DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css")); +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-25 17:07:29.101741771 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp 2010-02-25 17:07:29.117741744 +0100 +@@ -139,6 +139,7 @@ CSSParser::CSSParser(bool strictParsing) + , m_currentShorthand(0) + , m_implicitShorthand(false) + , m_hasFontFaceOnlyValues(false) ++ , m_hadSyntacticallyValidCSSRule(false) + , m_defaultNamespace(starAtom) + , m_data(0) + , yy_start(1) +@@ -5175,6 +5176,12 @@ WebKitCSSKeyframeRule* CSSParser::create + return keyframePtr; + } + ++void CSSParser::invalidBlockHit() ++{ ++ if (m_styleSheet && !m_hadSyntacticallyValidCSSRule) ++ m_styleSheet->setHasSyntacticallyValidCSSHeader(false); ++} ++ + static int cssPropertyID(const UChar* propertyName, unsigned length) + { + if (!length) +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h 2010-02-25 17:07:29.117741744 +0100 +@@ -191,6 +191,7 @@ namespace WebCore { + bool addVariableDeclarationBlock(const CSSParserString&); + bool checkForVariables(CSSParserValueList*); + void addUnresolvedProperty(int propId, bool important); ++ void invalidBlockHit(); + + Vector* reusableSelectorVector() { return &m_reusableSelectorVector; } + +@@ -212,6 +213,7 @@ namespace WebCore { + bool m_implicitShorthand; + + bool m_hasFontFaceOnlyValues; ++ bool m_hadSyntacticallyValidCSSRule; + + Vector m_variableNames; + Vector > m_variableValues; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp 2010-02-25 17:07:29.118741824 +0100 +@@ -41,6 +41,7 @@ CSSStyleSheet::CSSStyleSheet(CSSStyleShe + , m_loadCompleted(false) + , m_strictParsing(!parentSheet || parentSheet->useStrictParsing()) + , m_isUserStyleSheet(parentSheet ? parentSheet->isUserStyleSheet() : false) ++ , m_hasSyntacticallyValidCSSHeader(true) + { + } + +@@ -52,6 +53,7 @@ CSSStyleSheet::CSSStyleSheet(Node* paren + , m_loadCompleted(false) + , m_strictParsing(false) + , m_isUserStyleSheet(false) ++ , m_hasSyntacticallyValidCSSHeader(true) + { + } + +@@ -61,6 +63,7 @@ CSSStyleSheet::CSSStyleSheet(CSSRule* ow + , m_charset(charset) + , m_loadCompleted(false) + , m_strictParsing(!ownerRule || ownerRule->useStrictParsing()) ++ , m_hasSyntacticallyValidCSSHeader(true) + { + CSSStyleSheet* parentSheet = ownerRule ? ownerRule->parentStyleSheet() : 0; + m_doc = parentSheet ? parentSheet->doc() : 0; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h 2010-02-25 17:07:29.118741824 +0100 +@@ -95,6 +95,8 @@ public: + + void setIsUserStyleSheet(bool b) { m_isUserStyleSheet = b; } + bool isUserStyleSheet() const { return m_isUserStyleSheet; } ++ void setHasSyntacticallyValidCSSHeader(bool b) { m_hasSyntacticallyValidCSSHeader = b; } ++ bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; } + + private: + CSSStyleSheet(Node* ownerNode, const String& href, const String& charset); +@@ -110,6 +112,7 @@ private: + bool m_loadCompleted : 1; + bool m_strictParsing : 1; + bool m_isUserStyleSheet : 1; ++ bool m_hasSyntacticallyValidCSSHeader : 1; + }; + + } // namespace +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp 2010-02-25 17:07:29.118741824 +0100 +@@ -203,7 +203,10 @@ void ProcessingInstruction::setCSSStyleS + #endif + RefPtr newSheet = CSSStyleSheet::create(this, url, charset); + m_sheet = newSheet; +- parseStyleSheet(sheet->sheetText()); ++ // We don't need the cross-origin security check here because we are ++ // getting the sheet text in "strict" mode. This enforces a valid CSS MIME ++ // type. ++ parseStyleSheet(sheet->sheetText(true)); + newSheet->setTitle(m_title); + newSheet->setMedia(MediaList::create(newSheet.get(), m_media)); + newSheet->setDisabled(m_alternate); +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp 2010-02-25 17:07:29.119741915 +0100 +@@ -260,14 +260,27 @@ void HTMLLinkElement::setCSSStyleSheet(c + bool strictParsing = !document()->inCompatMode(); + bool enforceMIMEType = strictParsing; + ++ bool crossOriginCSS = false; ++ bool validMIMEType = false; + // Check to see if we should enforce the MIME type of the CSS resource in strict mode. + // Running in iWeb 2 is one example of where we don't want to - + if (enforceMIMEType && document()->page() && !document()->page()->settings()->enforceCSSMIMETypeInStrictMode()) + enforceMIMEType = false; + +- String sheetText = sheet->sheetText(enforceMIMEType); ++ String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType); + m_sheet->parseString(sheetText, strictParsing); + ++ // If we're loading a stylesheet cross-origin, and the MIME type is not ++ // standard, require the CSS to at least start with a syntactically ++ // valid CSS rule. ++ // This prevents an attacker playing games by injecting CSS strings into ++ // HTML, XML, JSON, etc. etc. ++ if (!document()->securityOrigin()->canRequest(KURL(ParsedURLString, url))) ++ crossOriginCSS = true; ++ ++ if (crossOriginCSS && !validMIMEType && !m_sheet->hasSyntacticallyValidCSSHeader()) ++ m_sheet = CSSStyleSheet::create(this, url, charset); ++ + if (strictParsing && document()->settings() && document()->settings()->needsSiteSpecificQuirks()) { + // Work around . + DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css")); +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp 2010-02-25 17:07:29.119741915 +0100 +@@ -71,11 +71,11 @@ String CachedCSSStyleSheet::encoding() c + return m_decoder->encoding().name(); + } + +-const String CachedCSSStyleSheet::sheetText(bool enforceMIMEType) const ++const String CachedCSSStyleSheet::sheetText(bool enforceMIMEType, bool* hasValidMIMEType) const + { + ASSERT(!isPurgeable()); + +- if (!m_data || m_data->isEmpty() || !canUseSheet(enforceMIMEType)) ++ if (!m_data || m_data->isEmpty() || !canUseSheet(enforceMIMEType, hasValidMIMEType)) + return String(); + + if (!m_decodedSheetText.isNull()) +@@ -122,12 +122,12 @@ void CachedCSSStyleSheet::error() + checkNotify(); + } + +-bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType) const ++bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const + { + if (errorOccurred()) + return false; + +- if (!enforceMIMEType) ++ if (!enforceMIMEType && !hasValidMIMEType) + return true; + + // This check exactly matches Firefox. Note that we grab the Content-Type +@@ -138,7 +138,12 @@ bool CachedCSSStyleSheet::canUseSheet(bo + // This code defaults to allowing the stylesheet for non-HTTP protocols so + // folks can use standards mode for local HTML documents. + String mimeType = extractMIMETypeFromMediaType(response().httpHeaderField("Content-Type")); +- return mimeType.isEmpty() || equalIgnoringCase(mimeType, "text/css") || equalIgnoringCase(mimeType, "application/x-unknown-content-type"); ++ bool typeOK = mimeType.isEmpty() || equalIgnoringCase(mimeType, "text/css") || equalIgnoringCase(mimeType, "application/x-unknown-content-type"); ++ if (hasValidMIMEType) ++ *hasValidMIMEType = typeOK; ++ if (!enforceMIMEType) ++ return true; ++ return typeOK; + } + + } +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h 2010-02-25 17:07:29.120741848 +0100 +@@ -40,7 +40,7 @@ namespace WebCore { + CachedCSSStyleSheet(const String& URL, const String& charset); + virtual ~CachedCSSStyleSheet(); + +- const String sheetText(bool enforceMIMEType = true) const; ++ const String sheetText(bool enforceMIMEType = true, bool* hasValidMIMEType = 0) const; + + virtual void didAddClient(CachedResourceClient*); + +@@ -56,7 +56,7 @@ namespace WebCore { + void checkNotify(); + + private: +- bool canUseSheet(bool enforceMIMEType) const; ++ bool canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const; + + protected: + RefPtr m_decoder; diff --git a/qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch b/qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch new file mode 100644 index 0000000..f9ce041 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch @@ -0,0 +1,85 @@ +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp.cve-2010-0054-image-element-pointer-name-getter qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp.cve-2010-0054-image-element-pointer-name-getter 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp 2010-02-25 15:50:05.987741463 +0100 +@@ -515,11 +515,13 @@ bool HTMLFormElement::isURLAttribute(Att + + void HTMLFormElement::registerImgElement(HTMLImageElement* e) + { ++ ASSERT(imgElements.find(e) == notFound); + imgElements.append(e); + } + + void HTMLFormElement::removeImgElement(HTMLImageElement* e) + { ++ ASSERT(imgElements.find(e) == notFound); + removeFromVector(imgElements, e); + } + +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp.cve-2010-0054-image-element-pointer-name-getter qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp.cve-2010-0054-image-element-pointer-name-getter 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp 2010-02-25 15:43:45.016742027 +0100 +@@ -209,6 +209,40 @@ void HTMLImageElement::removedFromDocume + HTMLElement::removedFromDocument(); + } + ++void HTMLImageElement::insertedIntoTree(bool deep) ++{ ++ if (m_form) { ++ // m_form was set by constructor. In debug builds, check that it's an ancestor indeed. ++#ifndef NDEBUG ++ for (Node* ancestor = parentNode(); /* no end condition - there must be a form ancestor */; ancestor = ancestor->parentNode()) { ++ ASSERT(ancestor); ++ if (ancestor->hasTagName(formTag)) { ++ ASSERT(m_form == static_cast(ancestor)); ++ break; ++ } ++ } ++#endif ++ } else { ++ for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) { ++ if (ancestor->hasTagName(formTag)) { ++ m_form = static_cast(ancestor); ++ m_form->registerImgElement(this); ++ break; ++ } ++ } ++ } ++ ++ HTMLElement::insertedIntoTree(deep); ++} ++ ++void HTMLImageElement::removedFromTree(bool deep) ++{ ++ if (m_form) ++ m_form->removeImgElement(this); ++ m_form = 0; ++ HTMLElement::removedFromTree(deep); ++} ++ + int HTMLImageElement::width(bool ignorePendingStylesheets) const + { + if (!renderer()) { +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h.cve-2010-0054-image-element-pointer-name-getter qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h.cve-2010-0054-image-element-pointer-name-getter 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h 2010-02-25 15:41:18.340929598 +0100 +@@ -45,8 +45,6 @@ public: + + virtual void attach(); + virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); +- virtual void insertedIntoDocument(); +- virtual void removedFromDocument(); + + virtual bool canStartSelection() const { return false; } + +@@ -105,6 +103,11 @@ public: + virtual void addSubresourceAttributeURLs(ListHashSet&) const; + + private: ++ virtual void insertedIntoDocument(); ++ virtual void removedFromDocument(); ++ virtual void insertedIntoTree(bool deep); ++ virtual void removedFromTree(bool deep); ++ + HTMLImageLoader m_imageLoader; + String usemap; + bool ismap; diff --git a/qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch b/qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch new file mode 100644 index 0000000..c5755a4 --- /dev/null +++ b/qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch @@ -0,0 +1,25 @@ +diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0046-css-format-mem-corruption qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/css/CSSParser.cpp +--- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0046-css-format-mem-corruption 2009-09-29 13:01:35.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/css/CSSParser.cpp 2010-02-04 15:00:24.778776273 +0100 +@@ -3085,6 +3085,12 @@ bool CSSParser::parseFontWeight(bool imp + return false; + } + ++static bool isValidFormatFunction(CSSParserValue* val) ++{ ++ CSSParserValueList* args = val->function->args; ++ return equalIgnoringCase(val->function->name, "format(") && (args->current()->unit == CSSPrimitiveValue::CSS_STRING || args->current()->unit == CSSPrimitiveValue::CSS_IDENT); ++} ++ + bool CSSParser::parseFontFaceSrc() + { + RefPtr values(CSSValueList::createCommaSeparated()); +@@ -3111,7 +3117,7 @@ bool CSSParser::parseFontFaceSrc() + CSSParserValue* a = args->current(); + uriValue.clear(); + parsedValue = CSSFontFaceSrcValue::createLocal(a->string); +- } else if (equalIgnoringCase(val->function->name, "format(") && allowFormat && uriValue) { ++ } else if (allowFormat && uriValue && isValidFormatFunction(val)) { + expectComma = true; + allowFormat = false; + uriValue->setFormat(args->current()->string); diff --git a/qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch b/qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch new file mode 100644 index 0000000..6739bc4 --- /dev/null +++ b/qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch @@ -0,0 +1,29 @@ +diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp.cve-2010-0049-freed-line-boxes-ltr-rtl qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp +--- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp.cve-2010-0049-freed-line-boxes-ltr-rtl 2009-09-29 13:01:36.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp 2010-02-04 15:43:15.707711730 +0100 +@@ -1025,8 +1025,15 @@ void RenderText::position(InlineBox* box + if (!s->m_len) { + // We want the box to be destroyed. + s->remove(); ++ if (m_firstTextBox == s) ++ m_firstTextBox = s->nextTextBox(); ++ else ++ s->prevTextBox()->setNextLineBox(s->nextTextBox()); ++ if (m_lastTextBox == s) ++ m_lastTextBox = s->prevTextBox(); ++ else ++ s->nextTextBox()->setPreviousLineBox(s->prevTextBox()); + s->destroy(renderArena()); +- m_firstTextBox = m_lastTextBox = 0; + return; + } + +@@ -1203,7 +1210,7 @@ void RenderText::checkConsistency() cons + #ifdef CHECK_CONSISTENCY + const InlineTextBox* prev = 0; + for (const InlineTextBox* child = m_firstTextBox; child != 0; child = child->nextTextBox()) { +- ASSERT(child->object() == this); ++ ASSERT(child->renderer() == this); + ASSERT(child->prevTextBox() == prev); + prev = child; + } diff --git a/qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch b/qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch new file mode 100644 index 0000000..12251e2 --- /dev/null +++ b/qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch @@ -0,0 +1,13 @@ +diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp.cve-2010-0050-crash-misnested-style-tags qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp +--- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp.cve-2010-0050-crash-misnested-style-tags 2009-09-29 13:01:36.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp 2010-02-04 15:54:25.399651321 +0100 +@@ -1208,7 +1208,8 @@ void HTMLParser::handleResidualStyleClos + prevMaxElem->next = elem; + ASSERT(newNodePtr); + prevMaxElem->node = newNodePtr; +- prevMaxElem->didRefNode = false; ++ newNodePtr->ref(); ++ prevMaxElem->didRefNode = true; + } else + delete elem; + } diff --git a/qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch b/qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch new file mode 100644 index 0000000..0b20a85 --- /dev/null +++ b/qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch @@ -0,0 +1,21 @@ +diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp.cve-2010-0052-destroyed-input-cached qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp +--- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp.cve-2010-0052-destroyed-input-cached 2009-09-29 13:01:36.000000000 +0200 ++++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp 2010-02-04 17:50:07.931656712 +0100 +@@ -616,12 +616,15 @@ void HTMLInputElement::parseMappedAttrib + m_autocomplete = Off; + registerForActivationCallbackIfNeeded(); + } else { +- if (m_autocomplete == Off) +- unregisterForActivationCallbackIfNeeded(); ++ bool needsToUnregister = m_autocomplete == Off; ++ + if (attr->isEmpty()) + m_autocomplete = Uninitialized; + else + m_autocomplete = On; ++ ++ if (needsToUnregister) ++ unregisterForActivationCallbackIfNeeded(); + } + } else if (attr->name() == typeAttr) { + setInputType(attr->value()); diff --git a/qt.spec b/qt.spec index b09a629..5c33627 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 7%{?dist} +Release: 8%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -60,6 +60,12 @@ Patch54: qt-x11-opensource-src-4.5.1-mysql_config.patch Patch55: qt-everywhere-opensource-src-4.6.2-cups.patch # security patches +Patch100: qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch +Patch101: qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch +Patch102: qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch +Patch103: qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch +Patch104: qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch +Patch105: qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch # kde-qt git patches Patch201: 0001-This-patch-uses-object-name-as-a-fallback-for-window.patch @@ -410,6 +416,12 @@ Qt libraries used for drawing widgets and OpenGL items. %patch55 -p1 -b .cups-1 # security fixes +%patch100 -p1 -b .cve-2010-0046-css-format-mem-corruption +%patch101 -p1 -b .cve-2010-0049-freed-line-boxes-ltr-rtl +%patch102 -p1 -b .cve-2010-0050-crash-misnested-style-tags +%patch103 -p1 -b .cve-2010-0052-destroyed-input-cached +%patch104 -p1 -b .cve-2010-0051-lax-css-parsing-cross-domain-theft +%patch105 -p1 -b .cve-2010-0054-image-element-pointer-name-getter # kde-qt branch %patch201 -p1 -b .kde-qt-0001 @@ -1015,6 +1027,11 @@ fi %changelog +* Wed Mar 17 2010 Jaroslav Reznik - 4.6.2-8 +- WebKit security update: + CVE-2010-0046, CVE-2010-0049, CVE-2010-0050, CVE-2010-0051, + CVE-2010-0052, CVE-2010-0054 + * Sat Mar 13 2010 Kevin Kofler - 4.6.2-7 - BR alsa-lib-devel (for QtMultimedia) From 520181c4ff97a1c64796c83b6c652c236886a26c Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 22 Mar 2010 10:46:22 +0000 Subject: [PATCH 24/41] - backport patch to fix ix a crash when reparenting an item in QGraphicsView, QTBUG-6932 - drop dangling reference(s) to %%buildroot in *.pc --- ...here-opensource-src-4.6.2-QTBUG-6932.patch | 22 +++++++++++++++++++ qt.spec | 13 ++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch diff --git a/qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch b/qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch new file mode 100644 index 0000000..bd64d1f --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch @@ -0,0 +1,22 @@ +diff -up qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp.orig qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp +--- qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp.orig 2010-02-11 16:55:22.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp 2010-03-22 11:26:50.291692144 +0100 +@@ -1125,6 +1125,9 @@ void QGraphicsItemPrivate::setParentItem + } + } + ++ // Resolve depth. ++ invalidateDepthRecursively(); ++ + if ((parent = newParent)) { + if (parent->d_func()->scene && parent->d_func()->scene != scene) { + // Move this item to its new parent's scene +@@ -1175,8 +1178,6 @@ void QGraphicsItemPrivate::setParentItem + } + } + +- // Resolve depth. +- invalidateDepthRecursively(); + dirtySceneTransform = 1; + + // Restore the sub focus chain. diff --git a/qt.spec b/qt.spec index 5c33627..da10fa5 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 8%{?dist} +Release: 9%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -79,6 +79,9 @@ Patch208: 0008-This-patch-makes-the-raster-graphics-system-use-shar.patch Patch209: 0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch Patch212: 0012-Add-context-to-tr-calls-in-QShortcut.patch Patch213: qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch +# backport from 4.7 to fix a crash when reparenting an item in QGraphicsView +# it should be included in 4.6.3 +Patch214: qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg Source11: hi16-phonon-gstreamer.png @@ -433,6 +436,7 @@ Qt libraries used for drawing widgets and OpenGL items. %patch207 -p1 -b .kde-qt-0007 %patch212 -p1 -b .kde-qt-0012 %patch213 -p1 -b .tablet-wacom-QTBUG-8599 +%patch214 -p1 -b .QTBUG-6932 # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -586,6 +590,8 @@ done # nuke dangling reference(s) to %buildroot sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" %{buildroot}%{_qt4_libdir}/*.prl +sed -i -e "s|-L%{_builddir}/qt-everywhere-opensource-src-%{version}/lib||g" \ + %{buildroot}%{_qt4_libdir}/pkgconfig/*.pc # nuke QMAKE_PRL_LIBS, seems similar to static linking and .la files (#520323) sed -i -e "s|^QMAKE_PRL_LIBS|#QMAKE_PRL_LIBS|" %{buildroot}%{_qt4_libdir}/*.prl @@ -1027,6 +1033,11 @@ fi %changelog +* Mon Mar 22 2010 Than Ngo - 4.6.2-9 +- backport patch to fix ix a crash when reparenting an item + in QGraphicsView, QTBUG-6932 +- drop dangling reference(s) to %%buildroot in *.pc + * Wed Mar 17 2010 Jaroslav Reznik - 4.6.2-8 - WebKit security update: CVE-2010-0046, CVE-2010-0049, CVE-2010-0050, CVE-2010-0051, From ec11cb103159899b7494cea953354292c3420671 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 23 Mar 2010 14:57:24 +0000 Subject: [PATCH 25/41] fix type cast in webkit bundled copy for sparc64 --- ...-opensource-src-4.6.2-sparc64-webkit-fix.patch | 15 +++++++++++++++ qt.spec | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 qt-everywhere-opensource-src-4.6.2-sparc64-webkit-fix.patch 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 new file mode 100644 index 0000000..48ffa74 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-sparc64-webkit-fix.patch @@ -0,0 +1,15 @@ +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 da10fa5..db58456 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 9%{?dist} +Release: 10%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -58,6 +58,8 @@ Patch53: qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch 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 webkit to build for sparc64 +Patch56: qt-everywhere-opensource-src-4.6.2-sparc64-webkit-fix.patch # security patches Patch100: qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch @@ -417,6 +419,7 @@ Qt libraries used for drawing widgets and OpenGL items. ## TODO: upstream me %patch54 -p1 -b .mysql_config %patch55 -p1 -b .cups-1 +%patch56 -p1 -b .sparc64 # security fixes %patch100 -p1 -b .cve-2010-0046-css-format-mem-corruption @@ -1033,6 +1036,9 @@ fi %changelog +* Tue Mar 23 2010 Tom "spot" Callaway - 4.6.2-10 +- fix sparc64 webkit bits + * Mon Mar 22 2010 Than Ngo - 4.6.2-9 - backport patch to fix ix a crash when reparenting an item in QGraphicsView, QTBUG-6932 From bf821bf62c34bdafc814483b9b0d05ecbfb1de7b Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Thu, 25 Mar 2010 10:56:38 +0000 Subject: [PATCH 26/41] - fix type cast issue on sparc64 - fix type cast issue on s390x - drop "recreate .qm file", it's not needed anymore --- ...re-opensource-src-4.6.2-webkit-s390x.patch | 48 +++++++++++++++++++ ...-opensource-src-4.6.2-webkit-sparc64.patch | 16 +++++++ qt.spec | 24 ++++++---- 3 files changed, 78 insertions(+), 10 deletions(-) create mode 100644 qt-everywhere-opensource-src-4.6.2-webkit-s390x.patch create mode 100644 qt-everywhere-opensource-src-4.6.2-webkit-sparc64.patch diff --git a/qt-everywhere-opensource-src-4.6.2-webkit-s390x.patch b/qt-everywhere-opensource-src-4.6.2-webkit-s390x.patch new file mode 100644 index 0000000..37e8abb --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-webkit-s390x.patch @@ -0,0 +1,48 @@ +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.than qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.than 2010-02-11 16:55:20.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2010-03-23 14:29:41.000000000 +0100 +@@ -345,6 +345,11 @@ + #define WTF_PLATFORM_BIG_ENDIAN 1 + #endif + ++/* PLATFORM(S390X) */ ++#if defined(__s390x__) || defined(__s390x) ++#define WTF_PLATFORM_S390X 1 ++#endif ++ + /* PLATFORM(IA64) */ + /* a.k.a. Itanium Processor Family, IPF */ + #if defined(__ia64) || defined(__ia64__) || defined(_M_IA64) +@@ -730,6 +735,8 @@ + /* Using JSVALUE32_64 causes padding/alignement issues for JITStubArg + on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ + #define WTF_USE_JSVALUE32 1 ++#elif PLATFORM(S390X) ++#define WTF_USE_JSVALUE64 1 + #else + #define WTF_USE_JSVALUE32_64 1 + #endif +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.than 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.than 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2010-03-23 14:19:00.000000000 +0100 +@@ -362,6 +362,11 @@ + #define WTF_PLATFORM_IA64 1 + #endif + ++/* PLATFORM(S390X) */ ++#if defined(__s390x__) || defined(__s390x) ++#define WTF_PLATFORM_S390X 1 ++#endif ++ + /* PLATFORM(ALPHA) */ + #if defined(__alpha__) + #define WTF_PLATFORM_ALPHA 1 +@@ -729,7 +734,7 @@ + #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(S390X) + #define WTF_USE_JSVALUE64 1 + #elif PLATFORM(ARM) || PLATFORM(PPC64) + #define WTF_USE_JSVALUE32 1 diff --git a/qt-everywhere-opensource-src-4.6.2-webkit-sparc64.patch b/qt-everywhere-opensource-src-4.6.2-webkit-sparc64.patch new file mode 100644 index 0000000..09a5860 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-webkit-sparc64.patch @@ -0,0 +1,16 @@ +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:45:57.076490991 -0400 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2010-03-23 10:47:37.044618125 -0400 +@@ -734,7 +734,11 @@ + #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) || PLATFORM(S390X) ++#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) \ ++ || PLATFORM(IA64) \ ++ || PLATFORM(ALPHA) \ ++ || PLATFORM(SPARC64) \ ++ || PLATFORM(S390X) + #define WTF_USE_JSVALUE64 1 + #elif PLATFORM(ARM) || PLATFORM(PPC64) + #define WTF_USE_JSVALUE32 1 diff --git a/qt.spec b/qt.spec index db58456..2a6e876 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 10%{?dist} +Release: 11%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -58,8 +58,10 @@ Patch53: qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch 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 webkit to build for sparc64 -Patch56: qt-everywhere-opensource-src-4.6.2-sparc64-webkit-fix.patch +# fix type cast issue on s390x +Patch56: qt-everywhere-opensource-src-4.6.2-webkit-s390x.patch +# fix type cast issue on sparc64 +Patch57: qt-everywhere-opensource-src-4.6.2-webkit-sparc64.patch # security patches Patch100: qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch @@ -419,7 +421,8 @@ Qt libraries used for drawing widgets and OpenGL items. ## TODO: upstream me %patch54 -p1 -b .mysql_config %patch55 -p1 -b .cups-1 -%patch56 -p1 -b .sparc64 +%patch56 -p1 -b .typecast_s390x +%patch57 -p1 -b .typecast_sparc64 # security fixes %patch100 -p1 -b .cve-2010-0046-css-format-mem-corruption @@ -554,9 +557,6 @@ done make %{?_smp_mflags} -# recreate .qm files -LD_LIBRARY_PATH=`pwd`/lib bin/lrelease translations/*.ts - %install rm -rf %{buildroot} @@ -1036,11 +1036,15 @@ fi %changelog -* Tue Mar 23 2010 Tom "spot" Callaway - 4.6.2-10 -- fix sparc64 webkit bits +* Tue Mar 23 2010 Tom "spot" Callaway - 4.6.2-11 +- fix type cast issue on sparc64 +- drop "recreate .qm file", it's not needed anymore + +* Tue Mar 23 2010 Than Ngo - 4.6.2-10 +- fix type cast issue on s390x * Mon Mar 22 2010 Than Ngo - 4.6.2-9 -- backport patch to fix ix a crash when reparenting an item +- backport patch to fix a crash when reparenting an item in QGraphicsView, QTBUG-6932 - drop dangling reference(s) to %%buildroot in *.pc From c0a03f9a24b8857d9e205a58b2badfaec1b56d35 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 2 Apr 2010 16:37:57 +0000 Subject: [PATCH 27/41] - Associate text/vnd.trolltech.linguist with linguist (#579082) --- linguist.desktop | 2 +- qt.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/linguist.desktop b/linguist.desktop index 2236a72..61036b3 100644 --- a/linguist.desktop +++ b/linguist.desktop @@ -3,7 +3,7 @@ Name=Qt4 Linguist Comment=Add translations to Qt4 applications Exec=linguist-qt4 Icon=linguist -MimeType=application/x-linguist; +MimeType=text/vnd.trolltech.linguist;application/x-linguist; Terminal=false Encoding=UTF-8 Type=Application diff --git a/qt.spec b/qt.spec index 2a6e876..1d46929 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 11%{?dist} +Release: 12%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -1036,6 +1036,9 @@ fi %changelog +* Fri Apr 02 2010 Rex Dieter - 4.6.2-12 +- Associate text/vnd.trolltech.linguist with linguist (#579082) + * Tue Mar 23 2010 Tom "spot" Callaway - 4.6.2-11 - fix type cast issue on sparc64 - drop "recreate .qm file", it's not needed anymore From c5e74df90d32cded6a2d7f694db1b42201191630 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Tue, 6 Apr 2010 14:56:40 +0000 Subject: [PATCH 28/41] backport from 4.7 branch to fix s390(x) atomic ops crashes --- ...ere-opensource-src-4.6.2-atomic-s390.patch | 43 +++++++++++++++++++ qt.spec | 7 ++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 qt-everywhere-opensource-src-4.6.2-atomic-s390.patch diff --git a/qt-everywhere-opensource-src-4.6.2-atomic-s390.patch b/qt-everywhere-opensource-src-4.6.2-atomic-s390.patch new file mode 100644 index 0000000..e9e55c8 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-atomic-s390.patch @@ -0,0 +1,43 @@ +diff -up qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h.than qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h +--- qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h.than 2010-03-29 15:44:24.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h 2010-03-29 15:48:23.000000000 +0200 +@@ -366,11 +366,9 @@ template + Q_INLINE_TEMPLATE T* QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) + { + #ifndef __s390x__ +- return (T*)__CS_OLD_LOOP(reinterpret_cast(_q_value), (int)newValue, "lr", +- "", "bcr 15,0\n"); ++ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "", ""); + #else +- return (T*)__CSG_OLD_LOOP(reinterpret_cast(_q_value), (long)newValue, "lgr", +- "", "bcr 15,0\n"); ++ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "", ""); + #endif + } + +@@ -378,9 +376,9 @@ template + Q_INLINE_TEMPLATE T* QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) + { + #ifndef __s390x__ +- return (T*)__CS_OLD_LOOP(reinterpret_cast(_q_value), (int)newValue, "lr", "", ""); ++ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "", "bcr 15,0 \n"); + #else +- return (T*)__CSG_OLD_LOOP(reinterpret_cast(_q_value), (long)newValue, "lgr", "", ""); ++ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "", "bcr 15,0 \n"); + #endif + } + +@@ -388,11 +386,9 @@ template + Q_INLINE_TEMPLATE T* QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) + { + #ifndef __s390x__ +- return (T*)__CS_OLD_LOOP(reinterpret_cast(_q_value), (int)newValue, "lr", +- "bcr 15,0 \n", ""); ++ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "bcr 15,0 \n", ""); + #else +- return (T*)__CSG_OLD_LOOP(reinterpret_cast(_q_value), (long)newValue, "lgr", +- "bcr 15,0\n", ""); ++ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "bcr 15,0\n", ""); + #endif + } + diff --git a/qt.spec b/qt.spec index 1d46929..1539afe 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 12%{?dist} +Release: 13%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -86,6 +86,7 @@ Patch213: qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch # backport from 4.7 to fix a crash when reparenting an item in QGraphicsView # 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 Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg Source11: hi16-phonon-gstreamer.png @@ -443,6 +444,7 @@ Qt libraries used for drawing widgets and OpenGL items. %patch212 -p1 -b .kde-qt-0012 %patch213 -p1 -b .tablet-wacom-QTBUG-8599 %patch214 -p1 -b .QTBUG-6932 +%patch215 -p1 -b .atomic-s390 # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -1036,6 +1038,9 @@ fi %changelog +* Tue Apr 06 2010 Than Ngo - 4.6.2-13 +- backport from 4.7 branch to fix s390(x) atomic ops crashes + * Fri Apr 02 2010 Rex Dieter - 4.6.2-12 - Associate text/vnd.trolltech.linguist with linguist (#579082) From c8bc3519acee2e79f91f47c66ea4addf741fad91 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 15 Apr 2010 16:12:10 +0000 Subject: [PATCH 29/41] - 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 --- ...opensource-src-4.6.2-cups-QTBUG-6471.patch | 68 +++++++++++++++++++ ...nsource-src-4.6.2-sparc64-webkit-fix.patch | 15 ---- qt.spec | 12 ++-- 3 files changed, 76 insertions(+), 19 deletions(-) create mode 100644 qt-everywhere-opensource-src-4.6.2-cups-QTBUG-6471.patch delete mode 100644 qt-everywhere-opensource-src-4.6.2-sparc64-webkit-fix.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 From 7b2dc6e532d51666f0d74034a3974c5254b890af Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 29 Apr 2010 07:50:21 +0000 Subject: [PATCH 30/41] Sync from F-13: Thu Apr 29 2010 Kevin Kofler - 4.6.2-16 - restore qt-everywhere-opensource-src-4.6.2-cups.patch (#586725) Wed Apr 28 2010 Rex Dieter - 4.6.2-15 - own %%{_qt4_plugindir}/crypto --- qt.spec | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/qt.spec b/qt.spec index 90b9aad..d1759ec 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 14%{?dist} +Release: 16%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -56,6 +56,8 @@ 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 @@ -420,6 +422,7 @@ 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 @@ -723,10 +726,10 @@ cat >%{buildroot}%{_sysconfdir}/rpm/macros.qt4< - 4.6.2-16 +- restore qt-everywhere-opensource-src-4.6.2-cups.patch (#586725) + +* Wed Apr 28 2010 Rex Dieter - 4.6.2-15 +- own %%{_qt4_plugindir}/crypto + * 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 From b5bf5ad14d24727198373e425186518eaa894f62 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Thu, 6 May 2010 16:02:46 +0000 Subject: [PATCH 31/41] - bz#589169, fix multiple flaws in webkit CVE-2010-0047, CVE-2010-0648, CVE-2010-0656 --- ...e-opensource-src-4.6.2-cve-2010-0047.patch | 18 + ...e-opensource-src-4.6.2-cve-2010-0648.patch | 782 ++++++++++++++++++ ...e-opensource-src-4.6.2-cve-2010-0656.patch | 25 + qt.spec | 12 +- 4 files changed, 836 insertions(+), 1 deletion(-) create mode 100644 qt-everywhere-opensource-src-4.6.2-cve-2010-0047.patch create mode 100644 qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch create mode 100644 qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch diff --git a/qt-everywhere-opensource-src-4.6.2-cve-2010-0047.patch b/qt-everywhere-opensource-src-4.6.2-cve-2010-0047.patch new file mode 100644 index 0000000..e39290c --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-cve-2010-0047.patch @@ -0,0 +1,18 @@ +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp.cve-2010-0047-call-after-free qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp.cve-2010-0047-call-after-free 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp 2010-05-06 12:21:13.852469331 +0200 +@@ -1260,9 +1260,11 @@ bool FrameLoader::requestObject(RenderPa + + ASSERT(renderer->node()->hasTagName(objectTag) || renderer->node()->hasTagName(embedTag)); + HTMLPlugInElement* element = static_cast(renderer->node()); +- +- // FIXME: OK to always make a new frame? When does the old frame get removed? +- return loadSubframe(element, completedURL, frameName, m_outgoingReferrer); ++ ++ // If the plug-in element already contains a subframe, requestFrame will re-use it. Otherwise, ++ // it will create a new frame and set it as the RenderPart's widget, causing what was previously ++ // in the widget to be torn down. ++ return requestFrame(element, completedURL, frameName); + } + + bool FrameLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback) diff --git a/qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch b/qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch new file mode 100644 index 0000000..495759d --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch @@ -0,0 +1,782 @@ +diff -U0 qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog 2010-05-03 15:55:37.703101680 +0200 +@@ -0,0 +1,90 @@ ++2010-01-20 Adam Barth ++ ++ Reviewed by Darin Adler. ++ ++ Stylesheet href property shows redirected URL unlike other browsers ++ https://bugs.webkit.org/show_bug.cgi?id=33683 ++ ++ Teach StyleSheet the difference between original and final URLs in ++ redirect chains. Unfortunately, StyleSheet needs to know both of these ++ URLs. The original URL is needed for the href property and the final ++ URL is needed as the baseURL. ++ ++ This change required touching a lot of lines of code because we need to ++ plumb this information to the StyleSheet object. I audited all ++ existing clients of href() and setHref() to see whether they wanted the ++ original or final URLs. I then updated the clients (except the JS ++ bindings themselves) to use the correct accessor. ++ ++ Test: http/tests/security/stylesheet-href-redirect.html ++ ++ * css/CSSImportRule.cpp: ++ (WebCore::CSSImportRule::setCSSStyleSheet): ++ (WebCore::CSSImportRule::insertedIntoParent): ++ * css/CSSImportRule.h: ++ * css/CSSStyleSheet.cpp: ++ (WebCore::CSSStyleSheet::CSSStyleSheet): ++ * css/CSSStyleSheet.h: ++ (WebCore::CSSStyleSheet::create): ++ (WebCore::CSSStyleSheet::createInline): Added a new constructor to deal ++ with "inline" style sheets that don't have a distinct original and ++ final URL. ++ * css/StyleBase.cpp: ++ (WebCore::StyleBase::baseURL): This code wants to use the final URL, ++ not the original URL. Updated it to grab the baseURL directly. ++ * css/StyleSheet.cpp: ++ (WebCore::StyleSheet::StyleSheet): ++ * css/StyleSheet.h: ++ (WebCore::StyleSheet::href): ++ (WebCore::StyleSheet::setBaseURL): This function really just updates ++ the base URL of the style sheet, so I made it more explicit. ++ (WebCore::StyleSheet::putativeBaseURL): We need an accessor for the ++ base URL, but baseURL is already taken. ++ * dom/Document.cpp: ++ (WebCore::Document::updateBaseURL): ++ (WebCore::Document::pageUserSheet): ++ (WebCore::Document::pageGroupUserSheets): ++ (WebCore::Document::elementSheet): ++ (WebCore::Document::mappedElementSheet): ++ * dom/ProcessingInstruction.cpp: ++ (WebCore::ProcessingInstruction::checkStyleSheet): ++ (WebCore::ProcessingInstruction::setCSSStyleSheet): ++ (WebCore::ProcessingInstruction::setXSLStyleSheet): ++ * dom/ProcessingInstruction.h: ++ * dom/StyleElement.cpp: ++ (WebCore::StyleElement::createSheet): ++ * html/HTMLLinkElement.cpp: ++ (WebCore::HTMLLinkElement::setCSSStyleSheet): ++ * html/HTMLLinkElement.h: ++ * loader/CachedCSSStyleSheet.cpp: ++ (WebCore::CachedCSSStyleSheet::didAddClient): ++ (WebCore::CachedCSSStyleSheet::checkNotify): This code now passes both ++ the original and final URL into setCSSStyleSheet so that the style ++ sheet can have both. ++ * loader/CachedResourceClient.h: ++ (WebCore::CachedResourceClient::setCSSStyleSheet): ++ (WebCore::CachedResourceClient::setXSLStyleSheet): ++ * loader/CachedXSLStyleSheet.cpp: ++ (WebCore::CachedXSLStyleSheet::didAddClient): ++ (WebCore::CachedXSLStyleSheet::checkNotify): I don't have any direct ++ evidence that we need to change the XSLStyleSheet behavior, which is ++ why I wasn't able to add a test for the behavior. However, the objects ++ are parallel enough that it seemed like the right thing to do. ++ * xml/XSLImportRule.cpp: ++ (WebCore::XSLImportRule::setXSLStyleSheet): ++ (WebCore::XSLImportRule::loadSheet): ++ * xml/XSLImportRule.h: ++ * xml/XSLStyleSheet.h: ++ (WebCore::XSLStyleSheet::create): ++ (WebCore::XSLStyleSheet::createEmbedded): ++ * xml/XSLStyleSheetLibxslt.cpp: ++ (WebCore::XSLStyleSheet::XSLStyleSheet): ++ (WebCore::XSLStyleSheet::parseString): ++ (WebCore::XSLStyleSheet::loadChildSheets): ++ * xml/XSLStyleSheetQt.cpp: ++ (WebCore::XSLStyleSheet::XSLStyleSheet): ++ * xml/XSLTProcessorLibxslt.cpp: ++ (WebCore::xsltStylesheetPointer): ++ * xml/XSLTProcessorQt.cpp: ++ (WebCore::XSLTProcessor::transformToString): ++ +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.652102626 +0200 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp 2010-05-03 16:49:14.631038884 +0200 +@@ -55,11 +55,11 @@ CSSImportRule::~CSSImportRule() + m_cachedSheet->removeClient(this); + } + +-void CSSImportRule::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet) ++void CSSImportRule::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet) + { + if (m_styleSheet) + m_styleSheet->setParent(0); +- m_styleSheet = CSSStyleSheet::create(this, url, charset); ++ m_styleSheet = CSSStyleSheet::create(this, href, baseURL, charset); + + bool crossOriginCSS = false; + bool validMIMEType = false; +@@ -70,17 +70,17 @@ void CSSImportRule::setCSSStyleSheet(con + String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType); + m_styleSheet->parseString(sheetText, strict); + +- if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(KURL(ParsedURLString, url))) ++ if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(baseURL)) + crossOriginCSS = true; + + if (crossOriginCSS && !validMIMEType && !m_styleSheet->hasSyntacticallyValidCSSHeader()) +- m_styleSheet = CSSStyleSheet::create(this, url, charset); ++ m_styleSheet = CSSStyleSheet::create(this, href, baseURL, charset); + + if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) { + // Work around . + DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css")); + DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n")); +- if (url.endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) { ++ if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) { + ASSERT(m_styleSheet->length() == 1); + ExceptionCode ec; + m_styleSheet->deleteRule(0, ec); +@@ -109,15 +109,16 @@ void CSSImportRule::insertedIntoParent() + return; + + String absHref = m_strHref; +- if (!parentSheet->href().isNull()) ++ if (!parentSheet->putativeBaseURL().isNull()) + // use parent styleheet's URL as the base URL +- absHref = KURL(KURL(ParsedURLString, parentSheet->href()), m_strHref).string(); ++ absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string(); + + // Check for a cycle in our import chain. If we encounter a stylesheet + // in our parent chain with the same URL, then just bail. + StyleBase* root = this; + for (StyleBase* curr = parent(); curr; curr = curr->parent()) { +- if (curr->isCSSStyleSheet() && absHref == static_cast(curr)->href()) ++ // FIXME: This is wrong if the putativeBaseURL was updated via document::updateBaseURL. ++ if (curr->isCSSStyleSheet() && absHref == static_cast(curr)->putativeBaseURL().string()) + return; + root = curr; + } +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h 2010-05-03 15:55:37.740976769 +0200 +@@ -63,7 +63,7 @@ private: + virtual unsigned short type() const { return IMPORT_RULE; } + + // from CachedResourceClient +- virtual void setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet*); ++ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*); + + String m_strHref; + RefPtr m_lstMedia; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.660977242 +0200 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp 2010-05-03 15:55:37.740976769 +0200 +@@ -33,8 +33,8 @@ + + namespace WebCore { + +-CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const String& charset) +- : StyleSheet(parentSheet, href) ++CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const KURL& baseURL, const String& charset) ++ : StyleSheet(parentSheet, href, baseURL) + , m_doc(parentSheet ? parentSheet->doc() : 0) + , m_namespaces(0) + , m_charset(charset) +@@ -45,8 +45,8 @@ CSSStyleSheet::CSSStyleSheet(CSSStyleShe + { + } + +-CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const String& charset) +- : StyleSheet(parentNode, href) ++CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, const String& charset) ++ : StyleSheet(parentNode, href, baseURL) + , m_doc(parentNode->document()) + , m_namespaces(0) + , m_charset(charset) +@@ -57,8 +57,8 @@ CSSStyleSheet::CSSStyleSheet(Node* paren + { + } + +-CSSStyleSheet::CSSStyleSheet(CSSRule* ownerRule, const String& href, const String& charset) +- : StyleSheet(ownerRule, href) ++CSSStyleSheet::CSSStyleSheet(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset) ++ : StyleSheet(ownerRule, href, baseURL) + , m_namespaces(0) + , m_charset(charset) + , m_loadCompleted(false) +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.660977242 +0200 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h 2010-05-03 15:55:37.745101706 +0200 +@@ -38,27 +38,31 @@ class CSSStyleSheet : public StyleSheet + public: + static PassRefPtr create() + { +- return adoptRef(new CSSStyleSheet(static_cast(0), String(), String())); ++ return adoptRef(new CSSStyleSheet(static_cast(0), String(), KURL(), String())); + } + static PassRefPtr create(Node* ownerNode) + { +- return adoptRef(new CSSStyleSheet(ownerNode, String(), String())); ++ return adoptRef(new CSSStyleSheet(ownerNode, String(), KURL(), String())); + } +- static PassRefPtr create(Node* ownerNode, const String& href) ++ static PassRefPtr create(Node* ownerNode, const String& href, const KURL& baseURL) + { +- return adoptRef(new CSSStyleSheet(ownerNode, href, String())); ++ return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, String())); + } +- static PassRefPtr create(Node* ownerNode, const String& href, const String& charset) ++ static PassRefPtr create(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset) + { +- return adoptRef(new CSSStyleSheet(ownerNode, href, charset)); ++ return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, charset)); + } +- static PassRefPtr create(CSSRule* ownerRule, const String& href, const String& charset) ++ static PassRefPtr create(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset) + { +- return adoptRef(new CSSStyleSheet(ownerRule, href, charset)); ++ return adoptRef(new CSSStyleSheet(ownerRule, href, baseURL, charset)); ++ } ++ static PassRefPtr createInline(Node* ownerNode, const KURL& baseURL) ++ { ++ return adoptRef(new CSSStyleSheet(ownerNode, baseURL.string(), baseURL, String())); + } + + virtual ~CSSStyleSheet(); +- ++ + CSSRule* ownerRule() const; + PassRefPtr cssRules(bool omitCharsetRules = false); + unsigned insertRule(const String& rule, unsigned index, ExceptionCode&); +@@ -72,7 +76,7 @@ public: + + void addNamespace(CSSParser*, const AtomicString& prefix, const AtomicString& uri); + const AtomicString& determineNamespace(const AtomicString& prefix); +- ++ + virtual void styleSheetChanged(); + + virtual bool parseString(const String&, bool strict = true); +@@ -99,10 +103,10 @@ public: + bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; } + + private: +- CSSStyleSheet(Node* ownerNode, const String& href, const String& charset); +- CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const String& charset); +- CSSStyleSheet(CSSRule* ownerRule, const String& href, const String& charset); +- ++ CSSStyleSheet(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset); ++ CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const KURL& baseURL, const String& charset); ++ CSSStyleSheet(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset); ++ + virtual bool isCSSStyleSheet() const { return true; } + virtual String type() const { return "text/css"; } + +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:20.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp 2010-05-03 15:55:37.757976382 +0200 +@@ -56,9 +56,9 @@ KURL StyleBase::baseURL() const + StyleSheet* sheet = const_cast(this)->stylesheet(); + if (!sheet) + return KURL(); +- if (!sheet->href().isNull()) +- return KURL(ParsedURLString, sheet->href()); +- if (sheet->parent()) ++ if (!sheet->putativeBaseURL().isNull()) ++ return sheet->putativeBaseURL(); ++ if (sheet->parent()) + return sheet->parent()->baseURL(); + if (!sheet->ownerNode()) + return KURL(); +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp 2010-05-03 15:55:37.758976847 +0200 +@@ -26,27 +26,30 @@ + + namespace WebCore { + +-StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& href) ++StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL) + : StyleList(parentSheet) + , m_parentNode(0) +- , m_strHref(href) ++ , m_href(href) ++ , m_baseURL(baseURL) + , m_disabled(false) + { + } + + +-StyleSheet::StyleSheet(Node* parentNode, const String& href) ++StyleSheet::StyleSheet(Node* parentNode, const String& href, const KURL& baseURL) + : StyleList(0) + , m_parentNode(parentNode) +- , m_strHref(href) ++ , m_href(href) ++ , m_baseURL(baseURL) + , m_disabled(false) + { + } + +-StyleSheet::StyleSheet(StyleBase* owner, const String& href) ++StyleSheet::StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL) + : StyleList(owner) + , m_parentNode(0) +- , m_strHref(href) ++ , m_href(href) ++ , m_baseURL(baseURL) + , m_disabled(false) + { + } +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h 2010-05-03 15:55:37.758976847 +0200 +@@ -41,8 +41,18 @@ public: + + Node* ownerNode() const { return m_parentNode; } + StyleSheet *parentStyleSheet() const; +- const String& href() const { return m_strHref; } +- void setHref(const String& href) { m_strHref = href; } ++ ++ // Note that href is the URL that started the redirect chain that led to ++ // this style sheet. This property probably isn't useful for much except ++ // the JavaScript binding (which needs to use this value for security). ++ const String& href() const { return m_href; } ++ ++ void setBaseURL(const KURL& baseURL) { m_baseURL = baseURL; } ++ ++ // Notice that this object inherits a baseURL function from StyleBase that ++ // crawls the parent() relation looking for a non-0 putativeBaseURL. ++ const KURL& putativeBaseURL() const { return m_baseURL; } ++ + const String& title() const { return m_strTitle; } + void setTitle(const String& s) { m_strTitle = s; } + MediaList* media() const { return m_media.get(); } +@@ -58,15 +68,16 @@ public: + virtual bool parseString(const String&, bool strict = true) = 0; + + protected: +- StyleSheet(Node* ownerNode, const String& href); +- StyleSheet(StyleSheet* parentSheet, const String& href); +- StyleSheet(StyleBase* owner, const String& href); ++ StyleSheet(Node* ownerNode, const String& href, const KURL& baseURL); ++ StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL); ++ StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL); + + private: + virtual bool isStyleSheet() const { return true; } + + Node* m_parentNode; +- String m_strHref; ++ String m_href; ++ KURL m_baseURL; + String m_strTitle; + RefPtr m_media; + bool m_disabled; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp 2010-05-03 15:55:37.760977901 +0200 +@@ -1920,9 +1920,9 @@ void Document::updateBaseURL() + m_baseURL = KURL(); + + if (m_elemSheet) +- m_elemSheet->setHref(m_baseURL.string()); ++ m_elemSheet->setBaseURL(m_baseURL); + if (m_mappedElementSheet) +- m_mappedElementSheet->setHref(m_baseURL.string()); ++ m_mappedElementSheet->setBaseURL(m_baseURL); + } + + String Document::userAgent(const KURL& url) const +@@ -1944,7 +1944,7 @@ CSSStyleSheet* Document::pageUserSheet() + return 0; + + // Parse the sheet and cache it. +- m_pageUserSheet = CSSStyleSheet::create(this, settings()->userStyleSheetLocation()); ++ m_pageUserSheet = CSSStyleSheet::createInline(this, settings()->userStyleSheetLocation()); + m_pageUserSheet->setIsUserStyleSheet(true); + m_pageUserSheet->parseString(userSheetText, !inCompatMode()); + return m_pageUserSheet.get(); +@@ -1979,7 +1979,7 @@ const Vector >* Do + const UserStyleSheet* sheet = sheets->at(i).get(); + if (!UserContentURLPattern::matchesPatterns(url(), sheet->whitelist(), sheet->blacklist())) + continue; +- RefPtr parsedSheet = CSSStyleSheet::create(const_cast(this), sheet->url()); ++ RefPtr parsedSheet = CSSStyleSheet::createInline(const_cast(this), sheet->url()); + parsedSheet->setIsUserStyleSheet(true); + parsedSheet->parseString(sheet->source(), !inCompatMode()); + if (!m_pageGroupUserSheets) +@@ -2001,14 +2001,14 @@ void Document::clearPageGroupUserSheets( + CSSStyleSheet* Document::elementSheet() + { + if (!m_elemSheet) +- m_elemSheet = CSSStyleSheet::create(this, m_baseURL.string()); ++ m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL); + return m_elemSheet.get(); + } + + CSSStyleSheet* Document::mappedElementSheet() + { + if (!m_mappedElementSheet) +- m_mappedElementSheet = CSSStyleSheet::create(this, m_baseURL.string()); ++ m_mappedElementSheet = CSSStyleSheet::createInline(this, m_baseURL); + return m_mappedElementSheet.get(); + } + +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.661976647 +0200 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp 2010-05-03 15:55:37.761977599 +0200 +@@ -138,7 +138,8 @@ void ProcessingInstruction::checkStyleSh + // We need to make a synthetic XSLStyleSheet that is embedded. It needs to be able + // to kick off import/include loads that can hang off some parent sheet. + if (m_isXSL) { +- m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref); ++ KURL baseURL = KURL(ParsedURLString, m_localHref); ++ m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref, baseURL); + m_loading = false; + } + #endif +@@ -196,12 +197,12 @@ bool ProcessingInstruction::sheetLoaded( + return false; + } + +-void ProcessingInstruction::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet) ++void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet) + { + #if ENABLE(XSLT) + ASSERT(!m_isXSL); + #endif +- RefPtr newSheet = CSSStyleSheet::create(this, url, charset); ++ RefPtr newSheet = CSSStyleSheet::create(this, href, baseURL, charset); + m_sheet = newSheet; + // We don't need the cross-origin security check here because we are + // getting the sheet text in "strict" mode. This enforces a valid CSS MIME +@@ -213,10 +214,10 @@ void ProcessingInstruction::setCSSStyleS + } + + #if ENABLE(XSLT) +-void ProcessingInstruction::setXSLStyleSheet(const String& url, const String& sheet) ++void ProcessingInstruction::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet) + { + ASSERT(m_isXSL); +- m_sheet = XSLStyleSheet::create(this, url); ++ m_sheet = XSLStyleSheet::create(this, href, baseURL); + parseStyleSheet(sheet); + } + #endif +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h 2010-05-03 15:55:37.761977599 +0200 +@@ -68,9 +68,9 @@ private: + virtual void removedFromDocument(); + + void checkStyleSheet(); +- virtual void setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet*); ++ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*); + #if ENABLE(XSLT) +- virtual void setXSLStyleSheet(const String& url, const String& sheet); ++ virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet); + #endif + + bool isLoading() const; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp 2010-05-03 15:55:37.762976937 +0200 +@@ -103,7 +103,7 @@ void StyleElement::createSheet(Element* + if (screenEval.eval(mediaList.get()) || printEval.eval(mediaList.get())) { + document->addPendingSheet(); + setLoading(true); +- m_sheet = CSSStyleSheet::create(e, String(), document->inputEncoding()); ++ m_sheet = CSSStyleSheet::create(e, String(), KURL(), document->inputEncoding()); + m_sheet->parseString(text, !document->inCompatMode()); + m_sheet->setMedia(mediaList.get()); + m_sheet->setTitle(e->title()); +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.661976647 +0200 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp 2010-05-03 17:02:45.528101154 +0200 +@@ -253,9 +253,9 @@ void HTMLLinkElement::finishParsingChild + HTMLElement::finishParsingChildren(); + } + +-void HTMLLinkElement::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet) ++void HTMLLinkElement::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet) + { +- m_sheet = CSSStyleSheet::create(this, url, charset); ++ m_sheet = CSSStyleSheet::create(this, href, baseURL, charset); + + bool strictParsing = !document()->inCompatMode(); + bool enforceMIMEType = strictParsing; +@@ -275,11 +275,11 @@ void HTMLLinkElement::setCSSStyleSheet(c + // valid CSS rule. + // This prevents an attacker playing games by injecting CSS strings into + // HTML, XML, JSON, etc. etc. +- if (!document()->securityOrigin()->canRequest(KURL(ParsedURLString, url))) ++ if (!document()->securityOrigin()->canRequest(baseURL)) + crossOriginCSS = true; + + if (crossOriginCSS && !validMIMEType && !m_sheet->hasSyntacticallyValidCSSHeader()) +- m_sheet = CSSStyleSheet::create(this, url, charset); ++ m_sheet = CSSStyleSheet::create(this, href, baseURL, charset); + + if (strictParsing && document()->settings() && document()->settings()->needsSiteSpecificQuirks()) { + // Work around . +@@ -287,7 +287,7 @@ void HTMLLinkElement::setCSSStyleSheet(c + DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n")); + // There are two variants of KHTMLFixes.css. One is equal to mediaWikiKHTMLFixesStyleSheet, + // while the other lacks the second trailing newline. +- if (url.endsWith(slashKHTMLFixesDotCss) && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText) ++ if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText) + && sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.length() - 1) { + ASSERT(m_sheet->length() == 1); + ExceptionCode ec; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h 2010-05-03 15:55:37.773083096 +0200 +@@ -79,7 +79,7 @@ public: + virtual void removedFromDocument(); + + // from CachedResourceClient +- virtual void setCSSStyleSheet(const String &url, const String& charset, const CachedCSSStyleSheet* sheet); ++ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet); + bool isLoading() const; + virtual bool sheetLoaded(); + +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.661976647 +0200 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp 2010-05-03 15:55:37.774976529 +0200 +@@ -52,9 +52,9 @@ CachedCSSStyleSheet::~CachedCSSStyleShee + void CachedCSSStyleSheet::didAddClient(CachedResourceClient *c) + { + if (!m_loading) +- c->setCSSStyleSheet(m_url, m_decoder->encoding().name(), this); ++ c->setCSSStyleSheet(m_url, m_response.url(), m_decoder->encoding().name(), this); + } +- ++ + void CachedCSSStyleSheet::allClientsRemoved() + { + if (isSafeToMakePurgeable()) +@@ -112,7 +112,7 @@ void CachedCSSStyleSheet::checkNotify() + + CachedResourceClientWalker w(m_clients); + while (CachedResourceClient *c = w.next()) +- c->setCSSStyleSheet(m_response.url().string(), m_decoder->encoding().name(), this); ++ c->setCSSStyleSheet(m_url, m_response.url(), m_decoder->encoding().name(), this); + } + + void CachedCSSStyleSheet::error() +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h 2010-05-03 15:55:37.775976911 +0200 +@@ -42,6 +42,7 @@ namespace WebCore { + class String; + class Image; + class IntRect; ++ class KURL; + + /** + * @internal +@@ -65,8 +66,8 @@ namespace WebCore { + // e.g., in the b/f cache or in a background tab). + virtual bool willRenderImage(CachedImage*) { return false; } + +- virtual void setCSSStyleSheet(const String& /*URL*/, const String& /*charset*/, const CachedCSSStyleSheet*) { } +- virtual void setXSLStyleSheet(const String& /*URL*/, const String& /*sheet*/) { } ++ virtual void setCSSStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* charset */, const CachedCSSStyleSheet*) { } ++ virtual void setXSLStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* sheet */) { } + + virtual void fontLoaded(CachedFont*) {}; + +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp 2010-05-03 15:55:37.789038977 +0200 +@@ -48,7 +48,7 @@ CachedXSLStyleSheet::CachedXSLStyleSheet + void CachedXSLStyleSheet::didAddClient(CachedResourceClient* c) + { + if (!m_loading) +- c->setXSLStyleSheet(m_url, m_sheet); ++ c->setXSLStyleSheet(m_url, m_response.url(), m_sheet); + } + + void CachedXSLStyleSheet::setEncoding(const String& chs) +@@ -83,10 +83,9 @@ void CachedXSLStyleSheet::checkNotify() + + CachedResourceClientWalker w(m_clients); + while (CachedResourceClient *c = w.next()) +- c->setXSLStyleSheet(m_url, m_sheet); ++ c->setXSLStyleSheet(m_url, m_response.url(), m_sheet); + } + +- + void CachedXSLStyleSheet::error() + { + m_loading = false; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp 2010-05-03 15:55:37.789038977 +0200 +@@ -52,13 +52,13 @@ XSLStyleSheet* XSLImportRule::parentStyl + return (parent() && parent()->isXSLStyleSheet()) ? static_cast(parent()) : 0; + } + +-void XSLImportRule::setXSLStyleSheet(const String& url, const String& sheet) ++void XSLImportRule::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet) + { + if (m_styleSheet) + m_styleSheet->setParent(0); +- +- m_styleSheet = XSLStyleSheet::create(this, url); +- ++ ++ m_styleSheet = XSLStyleSheet::create(this, href, baseURL); ++ + XSLStyleSheet* parent = parentStyleSheet(); + if (parent) + m_styleSheet->setParentStyleSheet(parent); +@@ -87,14 +87,14 @@ void XSLImportRule::loadSheet() + + String absHref = m_strHref; + XSLStyleSheet* parentSheet = parentStyleSheet(); +- if (!parentSheet->href().isNull()) ++ if (!parentSheet->putativeBaseURL().isNull()) + // use parent styleheet's URL as the base URL +- absHref = KURL(KURL(ParsedURLString, parentSheet->href()), m_strHref).string(); ++ absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string(); + + // Check for a cycle in our import chain. If we encounter a stylesheet + // in our parent chain with the same URL, then just bail. + for (parent = this->parent(); parent; parent = parent->parent()) { +- if (parent->isXSLStyleSheet() && absHref == static_cast(parent)->href()) ++ if (parent->isXSLStyleSheet() && absHref == static_cast(parent)->putativeBaseURL().string()) + return; + } + +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h 2010-05-03 15:55:37.789981560 +0200 +@@ -57,7 +57,7 @@ private: + virtual bool isImportRule() { return true; } + + // from CachedResourceClient +- virtual void setXSLStyleSheet(const String& url, const String& sheet); ++ virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet); + + String m_strHref; + RefPtr m_styleSheet; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h 2010-05-03 15:55:37.827976887 +0200 +@@ -43,18 +43,18 @@ class XSLImportRule; + class XSLStyleSheet : public StyleSheet { + public: + #if !USE(QXMLQUERY) +- static PassRefPtr create(XSLImportRule* parentImport, const String& href) ++ static PassRefPtr create(XSLImportRule* parentImport, const String& href, const KURL& baseURL) + { +- return adoptRef(new XSLStyleSheet(parentImport, href)); ++ return adoptRef(new XSLStyleSheet(parentImport, href, baseURL)); + } + #endif +- static PassRefPtr create(Node* parentNode, const String& href) ++ static PassRefPtr create(Node* parentNode, const String& href, const KURL& baseURL) + { +- return adoptRef(new XSLStyleSheet(parentNode, href, false)); ++ return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, false)); + } +- static PassRefPtr createEmbedded(Node* parentNode, const String& href) ++ static PassRefPtr createEmbedded(Node* parentNode, const String& href, const KURL& baseURL) + { +- return adoptRef(new XSLStyleSheet(parentNode, href, true)); ++ return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, true)); + } + + virtual ~XSLStyleSheet(); +@@ -90,9 +90,9 @@ public: + bool processed() const { return m_processed; } + + private: +- XSLStyleSheet(Node* parentNode, const String& href, bool embedded); ++ XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded); + #if !USE(QXMLQUERY) +- XSLStyleSheet(XSLImportRule* parentImport, const String& href); ++ XSLStyleSheet(XSLImportRule* parentImport, const String& href, const KURL& baseURL); + #endif + + Document* m_ownerDocument; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp 2010-05-03 15:55:37.837079694 +0200 +@@ -55,8 +55,8 @@ SOFT_LINK(libxslt, xsltLoadStylesheetPI, + + namespace WebCore { + +-XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href) +- : StyleSheet(parentRule, href) ++XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href, const KURL& baseURL) ++ : StyleSheet(parentRule, href, baseURL) + , m_ownerDocument(0) + , m_embedded(false) + , m_processed(false) // Child sheets get marked as processed when the libxslt engine has finally seen them. +@@ -66,8 +66,8 @@ XSLStyleSheet::XSLStyleSheet(XSLImportRu + { + } + +-XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded) +- : StyleSheet(parentNode, href) ++XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded) ++ : StyleSheet(parentNode, href, baseURL) + , m_ownerDocument(parentNode->document()) + , m_embedded(embedded) + , m_processed(true) // The root sheet starts off processed. +@@ -168,7 +168,7 @@ bool XSLStyleSheet::parseString(const St + } + + m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size, +- href().utf8().data(), ++ putativeBaseURL().string().utf8().data(), + BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE", + XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA); + xmlFreeParserCtxt(ctxt); +@@ -192,7 +192,7 @@ void XSLStyleSheet::loadChildSheets() + if (m_embedded) { + // We have to locate (by ID) the appropriate embedded stylesheet element, so that we can walk the + // import/include list. +- xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(href().utf8().data())); ++ xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(putativeBaseURL().string().utf8().data())); + if (!idNode) + return; + stylesheetRoot = idNode->parent; +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp 2010-05-03 15:55:37.837977083 +0200 +@@ -33,8 +33,8 @@ + + namespace WebCore { + +-XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded) +- : StyleSheet(parentNode, href) ++XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded) ++ : StyleSheet(parentNode, href, baseURL) + , m_ownerDocument(parentNode->document()) + , m_embedded(embedded) + { +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp 2010-05-03 15:55:37.837977083 +0200 +@@ -226,7 +226,8 @@ static xsltStylesheetPtr xsltStylesheetP + { + if (!cachedStylesheet && stylesheetRootNode) { + cachedStylesheet = XSLStyleSheet::create(stylesheetRootNode->parent() ? stylesheetRootNode->parent() : stylesheetRootNode, +- stylesheetRootNode->document()->url().string()); ++ stylesheetRootNode->document()->url().string(), ++ stylesheetRootNode->document()->url()); // FIXME: Should we use baseURL here? + cachedStylesheet->parseString(createMarkup(stylesheetRootNode)); + } + +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp 2010-05-03 15:55:37.915979873 +0200 +@@ -120,7 +120,9 @@ bool XSLTProcessor::transformToString(No + RefPtr stylesheet = m_stylesheet; + if (!stylesheet && m_stylesheetRootNode) { + Node* node = m_stylesheetRootNode.get(); +- stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node, node->document()->url().string()); ++ stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node, ++ node->document()->url().string(), ++ node->document()->url()); // FIXME: Should we use baseURL here? + stylesheet->parseString(createMarkup(node)); + } + diff --git a/qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch b/qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch new file mode 100644 index 0000000..b94c380 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch @@ -0,0 +1,25 @@ +diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp.me qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp +--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp.me 2010-05-06 11:29:24.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp 2010-05-06 11:43:29.000000000 +0200 +@@ -112,7 +112,11 @@ SecurityOrigin::SecurityOrigin(const KUR + + // By default, only local SecurityOrigins can load local resources. + m_canLoadLocalResources = isLocal(); +- ++ if (m_canLoadLocalResources) { ++ // Directories should never be readable. ++ if (!url.hasPath() || url.path().endsWith("/")) ++ m_noAccess = true; ++ } + if (isDefaultPortForProtocol(m_port, m_protocol)) + m_port = 0; + } +@@ -207,6 +211,8 @@ bool SecurityOrigin::canRequest(const KU + return false; + + RefPtr targetOrigin = SecurityOrigin::create(url); ++ if (targetOrigin->m_noAccess) ++ return false; + + // We call isSameSchemeHostPort here instead of canAccess because we want + // to ignore document.domain effects. diff --git a/qt.spec b/qt.spec index d1759ec..7382552 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 16%{?dist} +Release: 17%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -70,6 +70,9 @@ Patch102: qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.p Patch103: qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch Patch104: qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch Patch105: qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch +Patch106: qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch +Patch107: qt-everywhere-opensource-src-4.6.2-cve-2010-0047.patch +Patch108: qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch # kde-qt git patches Patch201: 0001-This-patch-uses-object-name-as-a-fallback-for-window.patch @@ -433,6 +436,9 @@ Qt libraries used for drawing widgets and OpenGL items. %patch103 -p1 -b .cve-2010-0052-destroyed-input-cached %patch104 -p1 -b .cve-2010-0051-lax-css-parsing-cross-domain-theft %patch105 -p1 -b .cve-2010-0054-image-element-pointer-name-getter +%patch106 -p1 -b .cve-2010-0656 +%patch107 -p1 -b .cve-2010-0047 +%patch108 -p1 -b .cve-2010-0648 # kde-qt branch %patch201 -p1 -b .kde-qt-0001 @@ -1042,6 +1048,10 @@ fi %changelog +* Thu May 06 2010 Than Ngo - 4.6.2-17 +- bz#589169, fix multiple flaws in webkit + CVE-2010-0047, CVE-2010-0648, CVE-2010-0656 + * Thu Apr 29 2010 Kevin Kofler - 4.6.2-16 - restore qt-everywhere-opensource-src-4.6.2-cups.patch (#586725) From 26835b2d19c74c6763ec88c6579ae562ab67e196 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 7 May 2010 03:58:45 +0000 Subject: [PATCH 32/41] - +Provides: qt4-webkit(-devel) --- qt.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qt.spec b/qt.spec index 7382552..ab0e745 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 17%{?dist} +Release: 18%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -278,6 +278,8 @@ Provides: phonon-devel = %{phonon_version}-%{phonon_release} %if 0%{?webkit:1} Obsoletes: WebKit-qt-devel < 1.0.0-1 Provides: WebKit-qt-devel = 1.0.0-1 +Provides: qt4-webkit-devel = %{version}-%{release} +Provides: qt4-webkit-devel%{?_isa} = %{version}-%{release} %endif Obsoletes: qt4-designer < %{version}-%{release} Provides: qt4-designer = %{version}-%{release} @@ -385,6 +387,8 @@ Provides: qt4-phonon = %{version}-%{release} %if 0%{?webkit:1} Obsoletes: WebKit-qt < 1.0.0-1 Provides: WebKit-qt = 1.0.0-1 +Provides: qt4-webkit = %{version}-%{release} +Provides: qt4-webkit%{?_isa} = %{version}-%{release} %endif %if 0%{?sqlite:1} Requires: %{name}-sqlite%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} @@ -1048,6 +1052,9 @@ fi %changelog +* Thu May 06 2010 Rex Dieter - 4.6.2-18 +- +Provides: qt4-webkit(-devel) + * Thu May 06 2010 Than Ngo - 4.6.2-17 - bz#589169, fix multiple flaws in webkit CVE-2010-0047, CVE-2010-0648, CVE-2010-0656 From 04ae9da23b0f97a2e900b9fd42cfdee86e4df2de Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 21 May 2010 12:13:53 +0000 Subject: [PATCH 33/41] - support QT_GRAPHICSSYSTEM env --- ...01d93f8257b5927660290fc1ead0b2b74ec9.patch | 28 +++++++++++++++++++ qt.spec | 7 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 55ef01d93f8257b5927660290fc1ead0b2b74ec9.patch diff --git a/55ef01d93f8257b5927660290fc1ead0b2b74ec9.patch b/55ef01d93f8257b5927660290fc1ead0b2b74ec9.patch new file mode 100644 index 0000000..db936ac --- /dev/null +++ b/55ef01d93f8257b5927660290fc1ead0b2b74ec9.patch @@ -0,0 +1,28 @@ +From 55ef01d93f8257b5927660290fc1ead0b2b74ec9 Mon Sep 17 00:00:00 2001 +From: Andreas Hartmetz +Date: Thu, 18 Mar 2010 02:41:14 +0100 +Subject: [PATCH] Add environment variable switch for graphicssystem so distros and + non-developers can more easily pick a different default. + +--- + src/gui/kernel/qapplication.cpp | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp +index 49713cf..af83047 100644 +--- a/src/gui/kernel/qapplication.cpp ++++ b/src/gui/kernel/qapplication.cpp +@@ -763,6 +763,10 @@ void QApplicationPrivate::construct( + + qt_is_gui_used = (qt_appType != QApplication::Tty); + process_cmdline(); ++ // the environment variable has the lowest precedence of runtime graphicssystem switches ++ if (graphics_system_name.isEmpty()) { ++ graphics_system_name = QString::fromLocal8Bit(qgetenv("QT_GRAPHICSSYSTEM")); ++ } + // Must be called before initialize() + qt_init(this, qt_appType + #ifdef Q_WS_X11 +-- +1.6.1 + diff --git a/qt.spec b/qt.spec index ab0e745..278c20e 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 18%{?dist} +Release: 19%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -91,6 +91,7 @@ Patch213: qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch 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 +Patch217: http://qt.gitorious.org/+kde-developers/qt/kde-qt/commit/55ef01d93f8257b5927660290fc1ead0b2b74ec9.patch Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg Source11: hi16-phonon-gstreamer.png @@ -457,6 +458,7 @@ Qt libraries used for drawing widgets and OpenGL items. %patch214 -p1 -b .QTBUG-6932 %patch215 -p1 -b .atomic-s390 %patch216 -p1 -b .cups-QTBUG-6471 +%patch217 -p1 -b .QT_GRAPHICSSYSTEM # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -1052,6 +1054,9 @@ fi %changelog +* Mon May 17 2010 Rex Dieter - 4.6.2-19 +- support QT_GRAPHICSSYSTEM env + * Thu May 06 2010 Rex Dieter - 4.6.2-18 - +Provides: qt4-webkit(-devel) From d69903646d411dff63cf2a14988b679b81075fbb Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 7 Jun 2010 13:40:38 +0000 Subject: [PATCH 34/41] Unsafe use of rand() in X11 (QTBUG-9793) --- ...9783d8ca0c4b27208bbc002c53c52c19ab4c.patch | 44 +++++++++++++++++++ qt.spec | 8 +++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c.patch diff --git a/0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c.patch b/0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c.patch new file mode 100644 index 0000000..c995519 --- /dev/null +++ b/0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c.patch @@ -0,0 +1,44 @@ +From 0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c Mon Sep 17 00:00:00 2001 +From: Bradley T. Hughes +Date: Tue, 4 May 2010 16:25:18 +0200 +Subject: [PATCH] Use qrand() instead of rand() + +This only affects X11 code, and are the only 2 places in Qt where rand() is +used instead of qrand(). + +Task-number: QTBUG-9793 +Reviewed-by: TrustMe +--- + src/gui/kernel/qwidget_x11.cpp | 2 +- + src/gui/painting/qpaintengine_x11.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp +index 37ac6bf..43f510c 100644 +--- a/src/gui/kernel/qwidget_x11.cpp ++++ b/src/gui/kernel/qwidget_x11.cpp +@@ -3000,7 +3000,7 @@ Picture QX11Data::getSolidFill(int screen, const QColor &c) + return X11->solid_fills[i].picture; + } + // none found, replace one +- int i = rand() % 16; ++ int i = qrand() % 16; + + if (X11->solid_fills[i].screen != screen && X11->solid_fills[i].picture) { + XRenderFreePicture (X11->display, X11->solid_fills[i].picture); +diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp +index da48fcb..aef8b80 100644 +--- a/src/gui/painting/qpaintengine_x11.cpp ++++ b/src/gui/painting/qpaintengine_x11.cpp +@@ -315,7 +315,7 @@ static Picture getPatternFill(int screen, const QBrush &b) + return X11->pattern_fills[i].picture; + } + // none found, replace one +- int i = rand() % 16; ++ int i = qrand() % 16; + + if (X11->pattern_fills[i].screen != screen && X11->pattern_fills[i].picture) { + XRenderFreePicture (X11->display, X11->pattern_fills[i].picture); +-- +1.6.1 + diff --git a/qt.spec b/qt.spec index 278c20e..c8e0048 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.2 -Release: 19%{?dist} +Release: 20%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -92,6 +92,8 @@ 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 Patch217: http://qt.gitorious.org/+kde-developers/qt/kde-qt/commit/55ef01d93f8257b5927660290fc1ead0b2b74ec9.patch +# QTBUG-9793 +Patch218: http://qt.gitorious.org/qt/qt/commit/0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c.patch Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg Source11: hi16-phonon-gstreamer.png @@ -459,6 +461,7 @@ Qt libraries used for drawing widgets and OpenGL items. %patch215 -p1 -b .atomic-s390 %patch216 -p1 -b .cups-QTBUG-6471 %patch217 -p1 -b .QT_GRAPHICSSYSTEM +%patch218 -p1 -b .QTBUG-9793 # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -1054,6 +1057,9 @@ fi %changelog +* Thu May 27 2010 Rex Dieter - 4.6.2-20 +- Unsafe use of rand() in X11 (QTBUG-9793) + * Mon May 17 2010 Rex Dieter - 4.6.2-19 - support QT_GRAPHICSSYSTEM env From c84063a22db36d15261c399171518e15c33a93f0 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Wed, 9 Jun 2010 13:57:41 +0000 Subject: [PATCH 35/41] 4.6.3 --- ...here-opensource-src-4.6.2-QTBUG-6932.patch | 22 ----- ...ere-opensource-src-4.6.2-atomic-s390.patch | 43 ---------- ...opensource-src-4.6.2-cups-QTBUG-6471.patch | 68 --------------- ...e-opensource-src-4.6.2-cve-2010-0047.patch | 18 ---- ...54-image-element-pointer-name-getter.patch | 85 ------------------- ...-2010-0046-css-format-mem-corruption.patch | 25 ------ ...e-2010-0049-freed-line-boxes-ltr-rtl.patch | 29 ------- ...2010-0050-crash-misnested-style-tags.patch | 13 --- ...cve-2010-0052-destroyed-input-cached.patch | 21 ----- ...ce-src-4.6.2-tablet-wacom-QTBUG-8599.patch | 69 --------------- qt.spec | 35 ++------ sources | 2 +- 12 files changed, 6 insertions(+), 424 deletions(-) delete mode 100644 qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch delete mode 100644 qt-everywhere-opensource-src-4.6.2-atomic-s390.patch delete mode 100644 qt-everywhere-opensource-src-4.6.2-cups-QTBUG-6471.patch delete mode 100644 qt-everywhere-opensource-src-4.6.2-cve-2010-0047.patch delete mode 100644 qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch delete mode 100644 qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch delete mode 100644 qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch delete mode 100644 qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch delete mode 100644 qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch delete mode 100644 qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch diff --git a/qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch b/qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch deleted file mode 100644 index bd64d1f..0000000 --- a/qt-everywhere-opensource-src-4.6.2-QTBUG-6932.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp.orig qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp ---- qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp.orig 2010-02-11 16:55:22.000000000 +0100 -+++ qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp 2010-03-22 11:26:50.291692144 +0100 -@@ -1125,6 +1125,9 @@ void QGraphicsItemPrivate::setParentItem - } - } - -+ // Resolve depth. -+ invalidateDepthRecursively(); -+ - if ((parent = newParent)) { - if (parent->d_func()->scene && parent->d_func()->scene != scene) { - // Move this item to its new parent's scene -@@ -1175,8 +1178,6 @@ void QGraphicsItemPrivate::setParentItem - } - } - -- // Resolve depth. -- invalidateDepthRecursively(); - dirtySceneTransform = 1; - - // Restore the sub focus chain. diff --git a/qt-everywhere-opensource-src-4.6.2-atomic-s390.patch b/qt-everywhere-opensource-src-4.6.2-atomic-s390.patch deleted file mode 100644 index e9e55c8..0000000 --- a/qt-everywhere-opensource-src-4.6.2-atomic-s390.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h.than qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h ---- qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h.than 2010-03-29 15:44:24.000000000 +0200 -+++ qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h 2010-03-29 15:48:23.000000000 +0200 -@@ -366,11 +366,9 @@ template - Q_INLINE_TEMPLATE T* QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) - { - #ifndef __s390x__ -- return (T*)__CS_OLD_LOOP(reinterpret_cast(_q_value), (int)newValue, "lr", -- "", "bcr 15,0\n"); -+ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "", ""); - #else -- return (T*)__CSG_OLD_LOOP(reinterpret_cast(_q_value), (long)newValue, "lgr", -- "", "bcr 15,0\n"); -+ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "", ""); - #endif - } - -@@ -378,9 +376,9 @@ template - Q_INLINE_TEMPLATE T* QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) - { - #ifndef __s390x__ -- return (T*)__CS_OLD_LOOP(reinterpret_cast(_q_value), (int)newValue, "lr", "", ""); -+ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "", "bcr 15,0 \n"); - #else -- return (T*)__CSG_OLD_LOOP(reinterpret_cast(_q_value), (long)newValue, "lgr", "", ""); -+ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "", "bcr 15,0 \n"); - #endif - } - -@@ -388,11 +386,9 @@ template - Q_INLINE_TEMPLATE T* QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) - { - #ifndef __s390x__ -- return (T*)__CS_OLD_LOOP(reinterpret_cast(_q_value), (int)newValue, "lr", -- "bcr 15,0 \n", ""); -+ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "bcr 15,0 \n", ""); - #else -- return (T*)__CSG_OLD_LOOP(reinterpret_cast(_q_value), (long)newValue, "lgr", -- "bcr 15,0\n", ""); -+ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "bcr 15,0\n", ""); - #endif - } - 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 deleted file mode 100644 index 82e894d..0000000 --- a/qt-everywhere-opensource-src-4.6.2-cups-QTBUG-6471.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- 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-cve-2010-0047.patch b/qt-everywhere-opensource-src-4.6.2-cve-2010-0047.patch deleted file mode 100644 index e39290c..0000000 --- a/qt-everywhere-opensource-src-4.6.2-cve-2010-0047.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp.cve-2010-0047-call-after-free qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp ---- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp.cve-2010-0047-call-after-free 2010-02-11 16:55:19.000000000 +0100 -+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp 2010-05-06 12:21:13.852469331 +0200 -@@ -1260,9 +1260,11 @@ bool FrameLoader::requestObject(RenderPa - - ASSERT(renderer->node()->hasTagName(objectTag) || renderer->node()->hasTagName(embedTag)); - HTMLPlugInElement* element = static_cast(renderer->node()); -- -- // FIXME: OK to always make a new frame? When does the old frame get removed? -- return loadSubframe(element, completedURL, frameName, m_outgoingReferrer); -+ -+ // If the plug-in element already contains a subframe, requestFrame will re-use it. Otherwise, -+ // it will create a new frame and set it as the RenderPart's widget, causing what was previously -+ // in the widget to be torn down. -+ return requestFrame(element, completedURL, frameName); - } - - bool FrameLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback) diff --git a/qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch b/qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch deleted file mode 100644 index f9ce041..0000000 --- a/qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp.cve-2010-0054-image-element-pointer-name-getter qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp ---- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp.cve-2010-0054-image-element-pointer-name-getter 2010-02-11 16:55:17.000000000 +0100 -+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp 2010-02-25 15:50:05.987741463 +0100 -@@ -515,11 +515,13 @@ bool HTMLFormElement::isURLAttribute(Att - - void HTMLFormElement::registerImgElement(HTMLImageElement* e) - { -+ ASSERT(imgElements.find(e) == notFound); - imgElements.append(e); - } - - void HTMLFormElement::removeImgElement(HTMLImageElement* e) - { -+ ASSERT(imgElements.find(e) == notFound); - removeFromVector(imgElements, e); - } - -diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp.cve-2010-0054-image-element-pointer-name-getter qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp ---- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp.cve-2010-0054-image-element-pointer-name-getter 2010-02-11 16:55:17.000000000 +0100 -+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp 2010-02-25 15:43:45.016742027 +0100 -@@ -209,6 +209,40 @@ void HTMLImageElement::removedFromDocume - HTMLElement::removedFromDocument(); - } - -+void HTMLImageElement::insertedIntoTree(bool deep) -+{ -+ if (m_form) { -+ // m_form was set by constructor. In debug builds, check that it's an ancestor indeed. -+#ifndef NDEBUG -+ for (Node* ancestor = parentNode(); /* no end condition - there must be a form ancestor */; ancestor = ancestor->parentNode()) { -+ ASSERT(ancestor); -+ if (ancestor->hasTagName(formTag)) { -+ ASSERT(m_form == static_cast(ancestor)); -+ break; -+ } -+ } -+#endif -+ } else { -+ for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) { -+ if (ancestor->hasTagName(formTag)) { -+ m_form = static_cast(ancestor); -+ m_form->registerImgElement(this); -+ break; -+ } -+ } -+ } -+ -+ HTMLElement::insertedIntoTree(deep); -+} -+ -+void HTMLImageElement::removedFromTree(bool deep) -+{ -+ if (m_form) -+ m_form->removeImgElement(this); -+ m_form = 0; -+ HTMLElement::removedFromTree(deep); -+} -+ - int HTMLImageElement::width(bool ignorePendingStylesheets) const - { - if (!renderer()) { -diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h.cve-2010-0054-image-element-pointer-name-getter qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h ---- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h.cve-2010-0054-image-element-pointer-name-getter 2010-02-11 16:55:17.000000000 +0100 -+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h 2010-02-25 15:41:18.340929598 +0100 -@@ -45,8 +45,6 @@ public: - - virtual void attach(); - virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); -- virtual void insertedIntoDocument(); -- virtual void removedFromDocument(); - - virtual bool canStartSelection() const { return false; } - -@@ -105,6 +103,11 @@ public: - virtual void addSubresourceAttributeURLs(ListHashSet&) const; - - private: -+ virtual void insertedIntoDocument(); -+ virtual void removedFromDocument(); -+ virtual void insertedIntoTree(bool deep); -+ virtual void removedFromTree(bool deep); -+ - HTMLImageLoader m_imageLoader; - String usemap; - bool ismap; diff --git a/qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch b/qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch deleted file mode 100644 index c5755a4..0000000 --- a/qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0046-css-format-mem-corruption qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/css/CSSParser.cpp ---- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0046-css-format-mem-corruption 2009-09-29 13:01:35.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/css/CSSParser.cpp 2010-02-04 15:00:24.778776273 +0100 -@@ -3085,6 +3085,12 @@ bool CSSParser::parseFontWeight(bool imp - return false; - } - -+static bool isValidFormatFunction(CSSParserValue* val) -+{ -+ CSSParserValueList* args = val->function->args; -+ return equalIgnoringCase(val->function->name, "format(") && (args->current()->unit == CSSPrimitiveValue::CSS_STRING || args->current()->unit == CSSPrimitiveValue::CSS_IDENT); -+} -+ - bool CSSParser::parseFontFaceSrc() - { - RefPtr values(CSSValueList::createCommaSeparated()); -@@ -3111,7 +3117,7 @@ bool CSSParser::parseFontFaceSrc() - CSSParserValue* a = args->current(); - uriValue.clear(); - parsedValue = CSSFontFaceSrcValue::createLocal(a->string); -- } else if (equalIgnoringCase(val->function->name, "format(") && allowFormat && uriValue) { -+ } else if (allowFormat && uriValue && isValidFormatFunction(val)) { - expectComma = true; - allowFormat = false; - uriValue->setFormat(args->current()->string); diff --git a/qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch b/qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch deleted file mode 100644 index 6739bc4..0000000 --- a/qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp.cve-2010-0049-freed-line-boxes-ltr-rtl qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp ---- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp.cve-2010-0049-freed-line-boxes-ltr-rtl 2009-09-29 13:01:36.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp 2010-02-04 15:43:15.707711730 +0100 -@@ -1025,8 +1025,15 @@ void RenderText::position(InlineBox* box - if (!s->m_len) { - // We want the box to be destroyed. - s->remove(); -+ if (m_firstTextBox == s) -+ m_firstTextBox = s->nextTextBox(); -+ else -+ s->prevTextBox()->setNextLineBox(s->nextTextBox()); -+ if (m_lastTextBox == s) -+ m_lastTextBox = s->prevTextBox(); -+ else -+ s->nextTextBox()->setPreviousLineBox(s->prevTextBox()); - s->destroy(renderArena()); -- m_firstTextBox = m_lastTextBox = 0; - return; - } - -@@ -1203,7 +1210,7 @@ void RenderText::checkConsistency() cons - #ifdef CHECK_CONSISTENCY - const InlineTextBox* prev = 0; - for (const InlineTextBox* child = m_firstTextBox; child != 0; child = child->nextTextBox()) { -- ASSERT(child->object() == this); -+ ASSERT(child->renderer() == this); - ASSERT(child->prevTextBox() == prev); - prev = child; - } diff --git a/qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch b/qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch deleted file mode 100644 index 12251e2..0000000 --- a/qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp.cve-2010-0050-crash-misnested-style-tags qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp ---- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp.cve-2010-0050-crash-misnested-style-tags 2009-09-29 13:01:36.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp 2010-02-04 15:54:25.399651321 +0100 -@@ -1208,7 +1208,8 @@ void HTMLParser::handleResidualStyleClos - prevMaxElem->next = elem; - ASSERT(newNodePtr); - prevMaxElem->node = newNodePtr; -- prevMaxElem->didRefNode = false; -+ newNodePtr->ref(); -+ prevMaxElem->didRefNode = true; - } else - delete elem; - } diff --git a/qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch b/qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch deleted file mode 100644 index 0b20a85..0000000 --- a/qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp.cve-2010-0052-destroyed-input-cached qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp ---- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp.cve-2010-0052-destroyed-input-cached 2009-09-29 13:01:36.000000000 +0200 -+++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp 2010-02-04 17:50:07.931656712 +0100 -@@ -616,12 +616,15 @@ void HTMLInputElement::parseMappedAttrib - m_autocomplete = Off; - registerForActivationCallbackIfNeeded(); - } else { -- if (m_autocomplete == Off) -- unregisterForActivationCallbackIfNeeded(); -+ bool needsToUnregister = m_autocomplete == Off; -+ - if (attr->isEmpty()) - m_autocomplete = Uninitialized; - else - m_autocomplete = On; -+ -+ if (needsToUnregister) -+ unregisterForActivationCallbackIfNeeded(); - } - } else if (attr->name() == typeAttr) { - setInputType(attr->value()); diff --git a/qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch b/qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch deleted file mode 100644 index ad8450c..0000000 --- a/qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch +++ /dev/null @@ -1,69 +0,0 @@ -From f1e39e7dea8634695263435f0bf912ce19c43195 Mon Sep 17 00:00:00 2001 -From: Thomas Zander -Date: Thu, 4 Mar 2010 13:16:09 +0100 -Subject: [PATCH] Make tablet detection work with new wacom drivers - -wacom driver fixed a bug in assigning atom names where it messed -up the device names. Their solution apparently renamed the atoms -The type names used now are "STYLUS", "CURSOR", "ERASER", "PAD" -and "TOUCH" for each respective device. This change detects -those as our tablet input devices. - -Reviewed-by: Benjamin Poulain -Task-number: QTBUG-8599 ---- - src/gui/kernel/qapplication_x11.cpp | 9 +++++++-- - src/gui/kernel/qt_x11_p.h | 3 +++ - 2 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp -index 121e9ec..25a7750 100644 ---- a/src/gui/kernel/qapplication_x11.cpp -+++ b/src/gui/kernel/qapplication_x11.cpp -@@ -320,9 +320,14 @@ static const char * x11_atomnames = { - "_XEMBED\0" - "_XEMBED_INFO\0" - -+ // Wacom old. (before version 0.10) - "Wacom Stylus\0" - "Wacom Cursor\0" - "Wacom Eraser\0" -+ -+ // Tablet -+ "STYLUS\0" -+ "ERASER\0" - }; - - Q_GUI_EXPORT QX11Data *qt_x11Data = 0; -@@ -2366,12 +2371,12 @@ void qt_init(QApplicationPrivate *priv, int, - gotStylus = true; - } - #else -- if (devs->type == ATOM(XWacomStylus)) { -+ if (devs->type == ATOM(XWacomStylus) || devs->type == ATOM(XTabletStylus)) { - deviceType = QTabletEvent::Stylus; - if (wacomDeviceName()->isEmpty()) - wacomDeviceName()->append(devs->name); - gotStylus = true; -- } else if (devs->type == ATOM(XWacomEraser)) { -+ } else if (devs->type == ATOM(XWacomEraser) || devs->type == ATOM(XTabletEraser)) { - deviceType = QTabletEvent::XFreeEraser; - gotEraser = true; - } -diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h -index d110084..14e04bb 100644 ---- a/src/gui/kernel/qt_x11_p.h -+++ b/src/gui/kernel/qt_x11_p.h -@@ -675,6 +675,9 @@ struct QX11Data - XWacomCursor, - XWacomEraser, - -+ XTabletStylus, -+ XTabletEraser, -+ - NPredefinedAtoms, - - _QT_SETTINGS_TIMESTAMP = NPredefinedAtoms, --- -1.6.1 - diff --git a/qt.spec b/qt.spec index c8e0048..3a4ef56 100644 --- a/qt.spec +++ b/qt.spec @@ -12,8 +12,8 @@ Summary: Qt toolkit Name: qt Epoch: 1 -Version: 4.6.2 -Release: 20%{?dist} +Version: 4.6.3 +Release: 1%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -64,14 +64,8 @@ Patch56: qt-everywhere-opensource-src-4.6.2-webkit-s390x.patch Patch57: qt-everywhere-opensource-src-4.6.2-webkit-sparc64.patch # security patches -Patch100: qt-x11-opensource-src-4.5.3-cve-2010-0046-css-format-mem-corruption.patch -Patch101: qt-x11-opensource-src-4.5.3-cve-2010-0049-freed-line-boxes-ltr-rtl.patch -Patch102: qt-x11-opensource-src-4.5.3-cve-2010-0050-crash-misnested-style-tags.patch -Patch103: qt-x11-opensource-src-4.5.3-cve-2010-0052-destroyed-input-cached.patch Patch104: qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch -Patch105: qt-everywhere-opensource-src-4.6.2-cve-2010-0054-image-element-pointer-name-getter.patch Patch106: qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch -Patch107: qt-everywhere-opensource-src-4.6.2-cve-2010-0047.patch Patch108: qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch # kde-qt git patches @@ -85,12 +79,6 @@ Patch207: 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-ge.patch Patch208: 0008-This-patch-makes-the-raster-graphics-system-use-shar.patch Patch209: 0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch Patch212: 0012-Add-context-to-tr-calls-in-QShortcut.patch -Patch213: qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch -# backport from 4.7 to fix a crash when reparenting an item in QGraphicsView -# 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 Patch217: http://qt.gitorious.org/+kde-developers/qt/kde-qt/commit/55ef01d93f8257b5927660290fc1ead0b2b74ec9.patch # QTBUG-9793 Patch218: http://qt.gitorious.org/qt/qt/commit/0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c.patch @@ -437,14 +425,8 @@ Qt libraries used for drawing widgets and OpenGL items. %patch57 -p1 -b .typecast_sparc64 # security fixes -%patch100 -p1 -b .cve-2010-0046-css-format-mem-corruption -%patch101 -p1 -b .cve-2010-0049-freed-line-boxes-ltr-rtl -%patch102 -p1 -b .cve-2010-0050-crash-misnested-style-tags -%patch103 -p1 -b .cve-2010-0052-destroyed-input-cached %patch104 -p1 -b .cve-2010-0051-lax-css-parsing-cross-domain-theft -%patch105 -p1 -b .cve-2010-0054-image-element-pointer-name-getter %patch106 -p1 -b .cve-2010-0656 -%patch107 -p1 -b .cve-2010-0047 %patch108 -p1 -b .cve-2010-0648 # kde-qt branch @@ -456,10 +438,6 @@ Qt libraries used for drawing widgets and OpenGL items. %patch206 -p1 -b .kde-qt-0006 %patch207 -p1 -b .kde-qt-0007 %patch212 -p1 -b .kde-qt-0012 -%patch213 -p1 -b .tablet-wacom-QTBUG-8599 -%patch214 -p1 -b .QTBUG-6932 -%patch215 -p1 -b .atomic-s390 -%patch216 -p1 -b .cups-QTBUG-6471 %patch217 -p1 -b .QT_GRAPHICSSYSTEM %patch218 -p1 -b .QTBUG-9793 @@ -505,12 +483,6 @@ if [ "%{_lib}" == "lib64" ] ; then sed -i -e "s,/lib /usr/lib,/%{_lib} /usr/%{_lib},g" config.tests/{unix,x11}/*.test fi -# let makefile create missing .qm files, the .qm files should be included in qt upstream -for f in translations/*.ts ; do - touch ${f%.ts}.qm -done - - %build # build shared, threaded (default) libraries @@ -1057,6 +1029,9 @@ fi %changelog +* Tue Jun 08 2010 Than Ngo - 4.6.3-1 +- 4.6.3 + * Thu May 27 2010 Rex Dieter - 4.6.2-20 - Unsafe use of rand() in X11 (QTBUG-9793) diff --git a/sources b/sources index 1a97e63..b8d4ee3 100644 --- a/sources +++ b/sources @@ -7,4 +7,4 @@ d9f511e4b51983b4e10eb58b320416d5 hi128-app-qt4-logo.png 12db12c009b722a6dc141f78feb7e330 hi32-phonon-gstreamer.png 86c34a1b81d44980b1381f94ed6b7a23 hi48-phonon-gstreamer.png 153505c71ec021b0a3bd4b74f2492e93 hi64-phonon-gstreamer.png -eb651ee4b157c01696aa56777fc6e0e5 qt-everywhere-opensource-src-4.6.2.tar.gz +5c69f16d452b0bb3d44bc3c10556c072 qt-everywhere-opensource-src-4.6.3.tar.gz From 3675bc4f5ae1bc65993d6add950ca9c391490e1c Mon Sep 17 00:00:00 2001 From: Jaroslav Reznik Date: Tue, 15 Jun 2010 15:42:06 +0000 Subject: [PATCH 36/41] sync to F13 - security patches --- ...e-opensource-src-4.6.3-CVE-2010-1119.patch | 15 + ...nsource-src-4.6.3-CVE-2010-1303_1304.patch | 1416 +++++++++++++++++ ...e-opensource-src-4.6.3-CVE-2010-1392.patch | 12 + ...e-opensource-src-4.6.3-CVE-2010-1396.patch | 56 + ...e-opensource-src-4.6.3-CVE-2010-1397.patch | 53 + ...e-opensource-src-4.6.3-CVE-2010-1398.patch | 244 +++ ...e-opensource-src-4.6.3-CVE-2010-1400.patch | 32 + ...e-opensource-src-4.6.3-CVE-2010-1412.patch | 45 + ...e-opensource-src-4.6.3-CVE-2010-1770.patch | 33 + ...e-opensource-src-4.6.3-CVE-2010-1773.patch | 16 + ...e-opensource-src-4.6.3-CVE-2010-1774.patch | 13 + ...e-opensource-src-4.6.3-CVE-2010-1778.patch | 29 + qt.spec | 37 +- 13 files changed, 2000 insertions(+), 1 deletion(-) create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1119.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1303_1304.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1392.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1396.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1397.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1398.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1400.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1412.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1770.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1773.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1774.patch create mode 100644 qt-everywhere-opensource-src-4.6.3-CVE-2010-1778.patch diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1119.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1119.patch new file mode 100644 index 0000000..368ff16 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1119.patch @@ -0,0 +1,15 @@ +diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp.CVE-2010-1119 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp.CVE-2010-1119 2010-06-02 04:03:12.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp 2010-06-15 13:11:55.974470742 +0200 +@@ -910,7 +910,10 @@ void Node::notifyLocalNodeListsAttribute + if (!data->nodeLists()) + return; + +- data->nodeLists()->invalidateCachesThatDependOnAttributes(); ++ if (!isAttributeNode()) ++ data->nodeLists()->invalidateCachesThatDependOnAttributes(); ++ else ++ data->nodeLists()->invalidateCaches(); + + if (data->nodeLists()->isEmpty()) { + data->clearNodeLists(); diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1303_1304.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1303_1304.patch new file mode 100644 index 0000000..ff8059e --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1303_1304.patch @@ -0,0 +1,1416 @@ +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp 2010-06-11 15:29:14.567278020 +0200 +@@ -0,0 +1,101 @@ ++/* ++ Copyright (C) Research In Motion Limited 2010. All rights reserved. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public License ++ aint with this library; see the file COPYING.LIB. If not, write to ++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++ Boston, MA 02110-1301, USA. ++*/ ++ ++#include "config.h" ++ ++#if ENABLE(SVG) ++#include "RenderSVGShadowTreeRootContainer.h" ++ ++#include "MouseEvent.h" ++#include "SVGShadowTreeElements.h" ++#include "SVGUseElement.h" ++ ++namespace WebCore { ++ ++RenderSVGShadowTreeRootContainer::RenderSVGShadowTreeRootContainer(SVGUseElement* node) ++ : RenderSVGTransformableContainer(node) ++ , m_recreateTree(false) ++{ ++} ++ ++RenderSVGShadowTreeRootContainer::~RenderSVGShadowTreeRootContainer() ++{ ++ if (m_shadowRoot && m_shadowRoot->attached()) ++ m_shadowRoot->detach(); ++} ++ ++void RenderSVGShadowTreeRootContainer::updateStyle(Node::StyleChange change) ++{ ++ if (m_shadowRoot && m_shadowRoot->attached()) ++ m_shadowRoot->recalcStyle(change); ++} ++ ++void RenderSVGShadowTreeRootContainer::updateFromElement() ++{ ++ bool hadExistingTree = m_shadowRoot; ++ ++ SVGUseElement* useElement = static_cast(node()); ++ if (!m_shadowRoot) { ++ ASSERT(!m_recreateTree); ++ m_shadowRoot = new SVGShadowTreeRootElement(document(), useElement); ++ useElement->buildPendingResource(); ++ } ++ ++ ASSERT(m_shadowRoot->shadowParentNode() == useElement); ++ ++ bool shouldRecreateTree = m_recreateTree; ++ if (m_recreateTree) { ++ ASSERT(hadExistingTree); ++ ++ if (m_shadowRoot->attached()) ++ m_shadowRoot->detach(); ++ ++ m_shadowRoot->removeAllChildren(); ++ m_recreateTree = false; ++ } ++ ++ // Only rebuild the shadow tree, if we a) never had a tree or b) we were specifically asked to do so ++ // If the use element is a pending resource, and a) or b) is true, do nothing, and wait for the use ++ // element to be asked to buildPendingResource(), this will call us again, with m_recreateTrue=true. ++ if ((shouldRecreateTree || !hadExistingTree) && !useElement->isPendingResource()) { ++ useElement->buildShadowAndInstanceTree(m_shadowRoot.get()); ++ ++ // Attach shadow root element ++ m_shadowRoot->attachElement(style(), renderArena()); ++ ++ // Attach subtree, as if it was a regular non-shadow tree ++ for (Node* child = m_shadowRoot->firstChild(); child; child = child->nextSibling()) ++ child->attach(); ++ } ++ ++ ASSERT(!m_recreateTree); ++ RenderSVGTransformableContainer::updateFromElement(); ++} ++ ++void RenderSVGShadowTreeRootContainer::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) ++{ ++ RenderSVGTransformableContainer::styleDidChange(diff, oldStyle); ++ ++ if (RenderObject* shadowRootRenderer = m_shadowRoot ? m_shadowRoot->renderer() : 0) ++ shadowRootRenderer->setStyle(style()); ++} ++ ++} ++ ++#endif +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.h qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.h +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.h 1970-01-01 01:00:00.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.h 2010-06-11 15:29:14.568278907 +0200 +@@ -0,0 +1,50 @@ ++/* ++ Copyright (C) Research In Motion Limited 2010. All rights reserved. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public License ++ aint with this library; see the file COPYING.LIB. If not, write to ++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++ Boston, MA 02110-1301, USA. ++*/ ++ ++#ifndef RenderSVGShadowTreeRootContainer_h ++#define RenderSVGShadowTreeRootContainer_h ++ ++#if ENABLE(SVG) ++#include "RenderSVGTransformableContainer.h" ++ ++namespace WebCore { ++ ++class SVGUseElement; ++class SVGShadowTreeRootElement; ++ ++class RenderSVGShadowTreeRootContainer : public RenderSVGTransformableContainer { ++public: ++ RenderSVGShadowTreeRootContainer(SVGUseElement*); ++ virtual ~RenderSVGShadowTreeRootContainer(); ++ ++ void markShadowTreeForRecreation() { m_recreateTree = true; } ++ void updateStyle(Node::StyleChange); ++ virtual void updateFromElement(); ++ ++private: ++ virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); ++ ++ bool m_recreateTree; ++ RefPtr m_shadowRoot; ++}; ++ ++} ++ ++#endif ++#endif +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderSVGTransformableContainer.cpp qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/RenderSVGTransformableContainer.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderSVGTransformableContainer.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/RenderSVGTransformableContainer.cpp 2010-06-11 15:29:14.568278907 +0200 +@@ -1,5 +1,5 @@ + /* +- Copyright (C) 2004, 2005 Nikolas Zimmermann ++ Copyright (C) 2004, 2005 Nikolas Zimmermann + 2004, 2005, 2006 Rob Buis + 2009 Google, Inc. + +@@ -20,12 +20,12 @@ + */ + + #include "config.h" +-#if ENABLE(SVG) + ++#if ENABLE(SVG) + #include "RenderSVGTransformableContainer.h" + ++#include "SVGShadowTreeElements.h" + #include "SVGStyledTransformableElement.h" +-#include "SVGTransformList.h" + + namespace WebCore { + +@@ -47,6 +47,14 @@ + void RenderSVGTransformableContainer::calculateLocalTransform() + { + m_localTransform = static_cast(node())->animatedLocalTransform(); ++ if (!node()->hasTagName(SVGNames::gTag) || !static_cast(node())->isShadowTreeContainerElement()) ++ return; ++ ++ FloatSize translation = static_cast(node())->containerTranslation(); ++ if (translation.width() == 0 && translation.height() == 0) ++ return; ++ ++ m_localTransform.translateRight(translation.width(), translation.height()); + } + + } +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.cpp qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.cpp 2010-06-11 15:29:14.567278020 +0200 +@@ -0,0 +1,80 @@ ++/* ++ Copyright (C) Research In Motion Limited 2010. All rights reserved. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public License ++ aint with this library; see the file COPYING.LIB. If not, write to ++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++ Boston, MA 02110-1301, USA. ++*/ ++ ++#include "config.h" ++ ++#if ENABLE(SVG) ++#include "SVGShadowTreeElements.h" ++ ++#include "Document.h" ++#include "FloatSize.h" ++#include "RenderObject.h" ++#include "SVGNames.h" ++ ++namespace WebCore { ++ ++// SVGShadowTreeContainerElement ++SVGShadowTreeContainerElement::SVGShadowTreeContainerElement(Document* document) ++ : SVGGElement(SVGNames::gTag, document) ++{ ++} ++ ++SVGShadowTreeContainerElement::~SVGShadowTreeContainerElement() ++{ ++} ++ ++FloatSize SVGShadowTreeContainerElement::containerTranslation() const ++{ ++ return FloatSize(m_xOffset.value(this), m_yOffset.value(this)); ++} ++ ++// SVGShadowTreeRootElement ++SVGShadowTreeRootElement::SVGShadowTreeRootElement(Document* document, Node* shadowParent) ++ : SVGShadowTreeContainerElement(document) ++ , m_shadowParent(shadowParent) ++{ ++ setInDocument(true); ++} ++ ++SVGShadowTreeRootElement::~SVGShadowTreeRootElement() ++{ ++} ++ ++void SVGShadowTreeRootElement::attachElement(PassRefPtr style, RenderArena* arena) ++{ ++ ASSERT(m_shadowParent); ++ ++ // Create the renderer with the specified style ++ RenderObject* renderer = createRenderer(arena, style.get()); ++ if (renderer) { ++ setRenderer(renderer); ++ renderer->setStyle(style); ++ } ++ ++ // Set these explicitly since this normally happens during an attach() ++ setAttached(); ++ ++ // Add the renderer to the render tree ++ if (renderer) ++ m_shadowParent->renderer()->addChild(renderer); ++} ++ ++} ++ ++#endif +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.h qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.h +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.h 1970-01-01 01:00:00.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.h 2010-06-11 15:29:14.568278907 +0200 +@@ -0,0 +1,67 @@ ++/* ++ Copyright (C) Research In Motion Limited 2010. All rights reserved. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public License ++ aint with this library; see the file COPYING.LIB. If not, write to ++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++ Boston, MA 02110-1301, USA. ++*/ ++ ++#ifndef SVGShadowTreeElements_h ++#define SVGShadowTreeElements_h ++ ++#if ENABLE(SVG) ++#include "SVGGElement.h" ++#include "SVGLength.h" ++ ++namespace WebCore { ++ ++class FloatSize; ++ ++class SVGShadowTreeContainerElement : public SVGGElement { ++public: ++ SVGShadowTreeContainerElement(Document*); ++ virtual ~SVGShadowTreeContainerElement(); ++ ++ virtual bool isShadowTreeContainerElement() const { return true; } ++ ++ FloatSize containerTranslation() const; ++ void setContainerOffset(const SVGLength& x, const SVGLength& y) ++ { ++ m_xOffset = x; ++ m_yOffset = y; ++ } ++ ++private: ++ SVGLength m_xOffset; ++ SVGLength m_yOffset; ++}; ++ ++class SVGShadowTreeRootElement : public SVGShadowTreeContainerElement { ++public: ++ SVGShadowTreeRootElement(Document*, Node* shadowParent); ++ virtual ~SVGShadowTreeRootElement(); ++ ++ virtual bool isShadowNode() const { return m_shadowParent; } ++ virtual Node* shadowParentNode() { return m_shadowParent; } ++ ++ void attachElement(PassRefPtr, RenderArena*); ++ ++private: ++ Node* m_shadowParent; ++}; ++ ++} ++ ++#endif ++#endif +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp 2010-06-02 04:03:10.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp 2010-06-11 15:29:14.559280466 +0200 +@@ -54,7 +54,6 @@ + + SVGElement::SVGElement(const QualifiedName& tagName, Document* document) + : StyledElement(tagName, document, CreateElementZeroRefCount) +- , m_shadowParent(0) + , m_cursorElement(0) + , m_cursorImageValue(0) + { +@@ -285,7 +284,11 @@ + + ContainerNode* SVGElement::eventParentNode() + { +- return m_shadowParent ? m_shadowParent : StyledElement::eventParentNode(); ++ if (Node* shadowParent = shadowParentNode()) { ++ ASSERT(shadowParent->isContainerNode()); ++ return static_cast(shadowParent); ++ } ++ return StyledElement::eventParentNode(); + } + + } +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGElement.h qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGElement.h +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGElement.h 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGElement.h 2010-06-11 15:29:14.564280678 +0200 +@@ -60,8 +60,6 @@ + virtual bool isGradientStop() const { return false; } + virtual bool isTextContent() const { return false; } + +- void setShadowParentNode(ContainerNode* node) { m_shadowParent = node; } +- + // For SVGTests + virtual bool isValid() const { return true; } + +@@ -95,13 +93,9 @@ + friend class SVGElementInstance; + + virtual bool isSVGElement() const { return true; } +- + virtual bool isSupported(StringImpl* feature, StringImpl* version) const; +- +- virtual bool isShadowNode() const { return m_shadowParent; } +- virtual Node* shadowParentNode() { return m_shadowParent; } +- virtual ContainerNode* eventParentNode(); + ++ virtual ContainerNode* eventParentNode(); + virtual void buildPendingResource() { } + + void mapInstanceToElement(SVGElementInstance*); +@@ -109,7 +103,6 @@ + + virtual bool haveLoadedRequiredResources(); + +- ContainerNode* m_shadowParent; + mutable SynchronizablePropertyController m_propertyController; + + SVGCursorElement* m_cursorElement; +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.cpp qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.cpp 2010-06-02 04:03:10.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.cpp 2010-06-11 15:29:14.560280508 +0200 +@@ -33,10 +33,6 @@ + + #include + +-#if USE(JSC) +-#include "GCController.h" +-#endif +- + namespace WebCore { + + #ifndef NDEBUG +@@ -51,8 +47,7 @@ + } + + SVGElementInstance::SVGElementInstance(SVGUseElement* useElement, PassRefPtr originalElement) +- : m_needsUpdate(false) +- , m_useElement(useElement) ++ : m_useElement(useElement) + , m_element(originalElement) + , m_previousSibling(0) + , m_nextSibling(0) +@@ -93,20 +88,6 @@ + m_shadowTreeElement = element; + } + +-void SVGElementInstance::forgetWrapper() +-{ +-#if USE(JSC) +- // FIXME: This is fragile, as discussed with Sam. Need to find a better solution. +- // Think about the case where JS explicitely holds "var root = useElement.instanceRoot;". +- // We still have to recreate this wrapper somehow. The gc collection below, won't catch it. +- +- // If the use shadow tree has been rebuilt, just the JSSVGElementInstance objects +- // are still holding RefPtrs of SVGElementInstance objects, which prevent us to +- // be deleted (and the shadow tree is not destructed as well). Force JS GC. +- gcController().garbageCollectNow(); +-#endif +-} +- + void SVGElementInstance::appendChild(PassRefPtr child) + { + appendChildToContainer(child.get(), this); +@@ -114,27 +95,24 @@ + + void SVGElementInstance::invalidateAllInstancesOfElement(SVGElement* element) + { +- if (!element) ++ if (!element || !element->isStyled()) ++ return; ++ ++ if (static_cast(element)->instanceUpdatesBlocked()) + return; + + HashSet set = element->instancesForElement(); + if (set.isEmpty()) + return; + +- // Find all use elements referencing the instances - ask them _once_ to rebuild. ++ // Mark all use elements referencing 'element' for rebuilding + HashSet::const_iterator it = set.begin(); + const HashSet::const_iterator end = set.end(); + +- for (; it != end; ++it) +- (*it)->setNeedsUpdate(true); +-} +- +-void SVGElementInstance::setNeedsUpdate(bool value) +-{ +- m_needsUpdate = value; +- +- if (m_needsUpdate) +- correspondingUseElement()->setNeedsStyleRecalc(); ++ for (; it != end; ++it) { ++ ASSERT((*it)->correspondingElement() == element); ++ (*it)->correspondingUseElement()->invalidateShadowTree(); ++ } + } + + ScriptExecutionContext* SVGElementInstance::scriptExecutionContext() const +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h 2010-06-11 15:29:14.556183347 +0200 +@@ -46,9 +46,6 @@ + + virtual ~SVGElementInstance(); + +- bool needsUpdate() const { return m_needsUpdate; } +- void setNeedsUpdate(bool); +- + virtual ScriptExecutionContext* scriptExecutionContext() const; + + virtual bool addEventListener(const AtomicString& eventType, PassRefPtr, bool useCapture); +@@ -129,7 +126,6 @@ + + void appendChild(PassRefPtr child); + void setShadowTreeElement(SVGElement*); +- void forgetWrapper(); + + template + friend void appendChildToContainer(GenericNode* child, GenericNodeContainer* container); +@@ -153,8 +149,6 @@ + virtual EventTargetData* eventTargetData(); + virtual EventTargetData* ensureEventTargetData(); + +- bool m_needsUpdate : 1; +- + SVGUseElement* m_useElement; + RefPtr m_element; + RefPtr m_shadowTreeElement; +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGGElement.h qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGGElement.h +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGGElement.h 2010-06-02 04:03:10.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGGElement.h 2010-06-11 15:29:14.564280678 +0200 +@@ -37,6 +37,7 @@ + SVGGElement(const QualifiedName&, Document*); + virtual ~SVGGElement(); + ++ virtual bool isShadowTreeContainerElement() const { return false; } + virtual bool isValid() const { return SVGTests::isValid(); } + + virtual void parseMappedAttribute(MappedAttribute*); +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGStyledElement.cpp qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGStyledElement.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGStyledElement.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGStyledElement.cpp 2010-06-11 15:29:14.562280735 +0200 +@@ -45,11 +45,11 @@ + using namespace SVGNames; + + char SVGStyledElementIdentifier[] = "SVGStyledElement"; +-static HashSet* gElementsWithInstanceUpdatesBlocked = 0; + + SVGStyledElement::SVGStyledElement(const QualifiedName& tagName, Document* doc) + : SVGElement(tagName, doc) + , m_className(this, HTMLNames::classAttr) ++ , m_instanceUpdatesBlocked(false) + { + } + +@@ -270,19 +270,6 @@ + SVGResource::removeClient(this); + SVGElement::detach(); + } +- +-void SVGStyledElement::setInstanceUpdatesBlocked(bool blockUpdates) +-{ +- if (blockUpdates) { +- if (!gElementsWithInstanceUpdatesBlocked) +- gElementsWithInstanceUpdatesBlocked = new HashSet; +- gElementsWithInstanceUpdatesBlocked->add(this); +- } else { +- ASSERT(gElementsWithInstanceUpdatesBlocked); +- ASSERT(gElementsWithInstanceUpdatesBlocked->contains(this)); +- gElementsWithInstanceUpdatesBlocked->remove(this); +- } +-} + + } + +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGStyledElement.h qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGStyledElement.h +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGStyledElement.h 2010-06-02 04:03:10.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGStyledElement.h 2010-06-11 15:29:14.554166596 +0200 +@@ -49,10 +49,9 @@ + + virtual bool rendererIsNeeded(RenderStyle*); + virtual SVGResource* canvasResource() { return 0; } +- ++ + virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const; + virtual void parseMappedAttribute(MappedAttribute*); +- + virtual void svgAttributeChanged(const QualifiedName&); + + virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); +@@ -62,8 +61,9 @@ + + void invalidateResourcesInAncestorChain() const; + virtual void detach(); +- +- void setInstanceUpdatesBlocked(bool); ++ ++ bool instanceUpdatesBlocked() const { return m_instanceUpdatesBlocked; } ++ void setInstanceUpdatesBlocked(bool value) { m_instanceUpdatesBlocked = value; } + + protected: + virtual bool hasRelativeValues() const { return true; } +@@ -72,6 +72,7 @@ + + private: + ANIMATED_PROPERTY_DECLARATIONS(SVGStyledElement, SVGStyledElementIdentifier, HTMLNames::classAttrString, String, ClassName, className) ++ bool m_instanceUpdatesBlocked; + }; + + } // namespace WebCore +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp 2010-06-02 04:03:10.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp 2010-06-11 15:43:17.347280236 +0200 +@@ -1,7 +1,7 @@ + /* + Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann + 2004, 2005, 2006, 2007 Rob Buis +- Copyright (C) Research In Motion Limited 2009. All rights reserved. ++ Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. + + This file is part of the KDE project + +@@ -35,12 +35,13 @@ + #include "MappedAttribute.h" + #include "NodeRenderStyle.h" + #include "RegisteredEventListener.h" +-#include "RenderSVGTransformableContainer.h" ++#include "RenderSVGShadowTreeRootContainer.h" + #include "SVGElementInstance.h" + #include "SVGElementInstanceList.h" + #include "SVGGElement.h" + #include "SVGLength.h" + #include "SVGPreserveAspectRatio.h" ++#include "SVGShadowTreeElements.h" + #include "SVGSMILElement.h" + #include "SVGSVGElement.h" + #include "SVGSymbolElement.h" +@@ -67,6 +68,8 @@ + , m_height(this, SVGNames::heightAttr, LengthModeHeight) + , m_href(this, XLinkNames::hrefAttr) + , m_externalResourcesRequired(this, SVGNames::externalResourcesRequiredAttr, false) ++ , m_isPendingResource(false) ++ , m_needsShadowTreeRecreation(false) + { + } + +@@ -76,6 +79,16 @@ + + SVGElementInstance* SVGUseElement::instanceRoot() const + { ++ // If there is no element instance tree, force immediate SVGElementInstance tree ++ // creation, as we can't wait for the lazy creation to happen if ie. JS wants to ++ // access the instanceRoot object right after creating the element on-the-fly ++ if (!m_targetElementInstance) { ++ if (RenderSVGShadowTreeRootContainer* shadowRoot = static_cast(renderer())) { ++ shadowRoot->markShadowTreeForRecreation(); ++ shadowRoot->updateFromElement(); ++ } ++ } ++ + return m_targetElementInstance.get(); + } + +@@ -114,14 +127,15 @@ + + void SVGUseElement::insertedIntoDocument() + { ++ // This functions exists to assure assumptions made in the code regarding SVGElementInstance creation/destruction are satisfied. + SVGElement::insertedIntoDocument(); +- buildPendingResource(); ++ ASSERT(!m_targetElementInstance); ++ ASSERT(!m_isPendingResource); + } + + void SVGUseElement::removedFromDocument() + { + m_targetElementInstance = 0; +- m_shadowTreeRootElement = 0; + SVGElement::removedFromDocument(); + } + +@@ -129,87 +143,120 @@ + { + SVGStyledTransformableElement::svgAttributeChanged(attrName); + +- if (!attached()) ++ if (!renderer()) + return; + +- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || +- attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr || +- SVGTests::isKnownAttribute(attrName) || +- SVGLangSpace::isKnownAttribute(attrName) || +- SVGExternalResourcesRequired::isKnownAttribute(attrName) || +- SVGURIReference::isKnownAttribute(attrName) || +- SVGStyledTransformableElement::isKnownAttribute(attrName)) { +- buildPendingResource(); ++ if (SVGURIReference::isKnownAttribute(attrName)) { ++ if (m_isPendingResource) { ++ document()->accessSVGExtensions()->removePendingResource(m_resourceId); ++ m_resourceId = String(); ++ m_isPendingResource = false; ++ } + +- if (m_shadowTreeRootElement) +- m_shadowTreeRootElement->setNeedsStyleRecalc(); ++ invalidateShadowTree(); ++ return; ++ } ++ ++ if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) { ++ updateContainerOffsets(); ++ return; ++ } ++ ++ // Be very careful here, if svgAttributeChanged() has been called because a SVG CSS property changed, we do NOT want to reclone the tree! ++ if (SVGStyledElement::isKnownAttribute(attrName)) { ++ setNeedsStyleRecalc(); ++ return; ++ } ++ ++ // TODO: We should be able to remove the need for width/height to require a reclone, similar to the x/y logic. ++ if (attrName == SVGNames::widthAttr ++ || attrName == SVGNames::heightAttr ++ || SVGTests::isKnownAttribute(attrName) ++ || SVGLangSpace::isKnownAttribute(attrName) ++ || SVGExternalResourcesRequired::isKnownAttribute(attrName) ++ || SVGStyledTransformableElement::isKnownAttribute(attrName)) { ++ invalidateShadowTree(); + } + } + +-void SVGUseElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) ++static void updateContainerOffset(SVGElementInstance* targetInstance) + { +- SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); ++ // Depth-first used to write the method in early exit style, no particular other reason. ++ for (SVGElementInstance* instance = targetInstance->firstChild(); instance; instance = instance->nextSibling()) ++ updateContainerOffset(instance); + +- if (!attached()) ++ SVGElement* correspondingElement = targetInstance->correspondingElement(); ++ ASSERT(correspondingElement); ++ ++ if (!correspondingElement->hasTagName(SVGNames::useTag)) + return; + +- buildPendingResource(); ++ SVGElement* shadowTreeElement = targetInstance->shadowTreeElement(); ++ ASSERT(shadowTreeElement); ++ ASSERT(shadowTreeElement->hasTagName(SVGNames::gTag)); ++ ++ if (!static_cast(shadowTreeElement)->isShadowTreeContainerElement()) ++ return; + +- if (m_shadowTreeRootElement) +- m_shadowTreeRootElement->setNeedsStyleRecalc(); ++ // Spec: An additional transformation translate(x,y) is appended to the end ++ // (i.e., right-side) of the transform attribute on the generated 'g', where x ++ // and y represent the values of the x and y attributes on the 'use' element. ++ SVGUseElement* useElement = static_cast(correspondingElement); ++ SVGShadowTreeContainerElement* containerElement = static_cast(shadowTreeElement); ++ containerElement->setContainerOffset(useElement->x(), useElement->y()); + } +- +-static bool shadowTreeContainsChangedNodes(SVGElementInstance* target) ++ ++void SVGUseElement::updateContainerOffsets() + { +- if (!target) // when use is referencing an non-existing element, there will be no Instance tree built +- return false; ++ if (!m_targetElementInstance) ++ return; + +- if (target->needsUpdate()) +- return true; ++ // Update root container offset (not reachable through instance tree) ++ SVGElement* shadowRoot = m_targetElementInstance->shadowTreeElement(); ++ ASSERT(shadowRoot); + +- for (SVGElementInstance* instance = target->firstChild(); instance; instance = instance->nextSibling()) +- if (shadowTreeContainsChangedNodes(instance)) +- return true; ++ Node* parentNode = shadowRoot->parentNode(); ++ ASSERT(parentNode); ++ ASSERT(parentNode->isSVGElement()); ++ ASSERT(parentNode->hasTagName(SVGNames::gTag)); ++ ASSERT(static_cast(parentNode)->isShadowTreeContainerElement()); + +- return false; ++ SVGShadowTreeContainerElement* containerElement = static_cast(parentNode); ++ containerElement->setContainerOffset(x(), y()); ++ ++ // Update whole subtree, scanning for shadow container elements, marking a cloned use subtree ++ updateContainerOffset(m_targetElementInstance.get()); ++ ++ if (renderer()) ++ renderer()->setNeedsLayout(true); + } + + void SVGUseElement::recalcStyle(StyleChange change) + { +- if (attached() && needsStyleRecalc() && shadowTreeContainsChangedNodes(m_targetElementInstance.get())) { +- buildPendingResource(); +- +- if (m_shadowTreeRootElement) +- m_shadowTreeRootElement->setNeedsStyleRecalc(); ++ // Eventually mark shadow root element needing style recalc ++ if (needsStyleRecalc() && m_targetElementInstance) { ++ if (SVGElement* shadowRoot = m_targetElementInstance->shadowTreeElement()) ++ shadowRoot->setNeedsStyleRecalc(); + } + +- SVGStyledElement::recalcStyle(change); ++ SVGStyledTransformableElement::recalcStyle(change); + +- // The shadow tree root element is NOT a direct child element of us. +- // So we have to take care it receives style updates, manually. +- if (!m_shadowTreeRootElement || !m_shadowTreeRootElement->attached()) +- return; +- +- // Mimic Element::recalcStyle(). The main difference is that we don't call attach() on the +- // shadow tree root element, but call attachShadowTree() here. Calling attach() will crash +- // as the shadow tree root element has no (direct) parent node. Yes, shadow trees are tricky. +- if (change >= Inherit || m_shadowTreeRootElement->needsStyleRecalc()) { +- RefPtr newStyle = document()->styleSelector()->styleForElement(m_shadowTreeRootElement.get()); +- StyleChange ch = Node::diff(m_shadowTreeRootElement->renderStyle(), newStyle.get()); +- if (ch == Detach) { +- ASSERT(m_shadowTreeRootElement->attached()); +- m_shadowTreeRootElement->detach(); +- attachShadowTree(); +- +- // attach recalulates the style for all children. No need to do it twice. +- m_shadowTreeRootElement->setNeedsStyleRecalc(NoStyleChange); +- m_shadowTreeRootElement->setChildNeedsStyleRecalc(false); +- return; +- } ++ bool needsStyleUpdate = !m_needsShadowTreeRecreation; ++ if (m_needsShadowTreeRecreation) { ++ static_cast(renderer())->markShadowTreeForRecreation(); ++ m_needsShadowTreeRecreation = false; + } + +- // Only change==Detach needs special treatment, for anything else recalcStyle() works. +- m_shadowTreeRootElement->recalcStyle(change); ++ RenderSVGShadowTreeRootContainer* shadowRoot = static_cast(renderer()); ++ if (!shadowRoot) ++ return; ++ ++ shadowRoot->updateFromElement(); ++ ++ if (!needsStyleUpdate) ++ return; ++ ++ shadowRoot->updateStyle(change); + } + + #ifdef DUMP_INSTANCE_TREE +@@ -218,17 +265,21 @@ + SVGElement* element = targetInstance->correspondingElement(); + ASSERT(element); + ++ SVGElement* shadowTreeElement = targetInstance->shadowTreeElement(); ++ ASSERT(shadowTreeElement); ++ + String elementId = element->getIDAttribute(); + String elementNodeName = element->nodeName(); ++ String shadowTreeElementNodeName = shadowTreeElement->nodeName(); + String parentNodeName = element->parentNode() ? element->parentNode()->nodeName() : "null"; + String firstChildNodeName = element->firstChild() ? element->firstChild()->nodeName() : "null"; + + for (unsigned int i = 0; i < depth; ++i) + text += " "; + +- text += String::format("SVGElementInstance this=%p, (parentNode=%s, firstChild=%s, correspondingElement=%s (%p), shadowTreeElement=%p, id=%s)\n", +- targetInstance, parentNodeName.latin1().data(), firstChildNodeName.latin1().data(), elementNodeName.latin1().data(), +- element, targetInstance->shadowTreeElement(), elementId.latin1().data()); ++ text += String::format("SVGElementInstance this=%p, (parentNode=%s (%p), firstChild=%s (%p), correspondingElement=%s (%p), shadowTreeElement=%s (%p), id=%s)\n", ++ targetInstance, parentNodeName.latin1().data(), element->parentNode(), firstChildNodeName.latin1().data(), element->firstChild(), ++ elementNodeName.latin1().data(), element, shadowTreeElementNodeName.latin1().data(), shadowTreeElement, elementId.latin1().data()); + + for (unsigned int i = 0; i < depth; ++i) + text += " "; +@@ -284,16 +335,36 @@ + + void SVGUseElement::buildPendingResource() + { ++ // If we're called the first time (during shadow tree root creation from RenderSVGShadowTreeRootContainer) ++ // we either determine that our target is available or not - then we add ourselves to the pending resource list ++ // Once the pending resource appears, it will call buildPendingResource(), so we're called a second time. + String id = SVGURIReference::getTarget(href()); + Element* targetElement = document()->getElementById(id); ++ ASSERT(!m_targetElementInstance); + + if (!targetElement) { +- // TODO: We want to deregister as pending resource, if our href() changed! +- // TODO: Move to svgAttributeChanged, once we're fixing use & the new dynamic update concept. ++ if (m_isPendingResource) ++ return; ++ ++ m_isPendingResource = true; ++ m_resourceId = id; + document()->accessSVGExtensions()->addPendingResource(id, this); + return; + } + ++ if (m_isPendingResource) { ++ ASSERT(!m_targetElementInstance); ++ m_isPendingResource = false; ++ invalidateShadowTree(); ++ } ++} ++ ++void SVGUseElement::buildShadowAndInstanceTree(SVGShadowTreeRootElement* shadowRoot) ++{ ++ String id = SVGURIReference::getTarget(href()); ++ Element* targetElement = document()->getElementById(id); ++ ASSERT(targetElement); ++ + // Do not build the shadow/instance tree for elements living in a shadow tree. + // The will be expanded soon anyway - see expandUseElementsInShadowTree(). + Node* parent = parentNode(); +@@ -308,17 +379,13 @@ + if (targetElement && targetElement->isSVGElement()) + target = static_cast(targetElement); + +- if (m_targetElementInstance) { +- m_targetElementInstance->forgetWrapper(); ++ if (m_targetElementInstance) + m_targetElementInstance = 0; +- } + + // Do not allow self-referencing. + // 'target' may be null, if it's a non SVG namespaced element. +- if (!target || target == this) { +- m_shadowTreeRootElement = 0; ++ if (!target || target == this) + return; +- } + + // Why a seperated instance/shadow tree? SVG demands it: + // The instance tree is accesable from JavaScript, and has to +@@ -340,45 +407,45 @@ + // Non-appearing content is easier to debug, then half-appearing content. + if (foundProblem) { + m_targetElementInstance = 0; +- m_shadowTreeRootElement = 0; + return; + } + + // Assure instance tree building was successfull + ASSERT(m_targetElementInstance); ++ ASSERT(!m_targetElementInstance->shadowTreeElement()); + ASSERT(m_targetElementInstance->correspondingUseElement() == this); + +- // Setup shadow tree root node +- m_shadowTreeRootElement = new SVGGElement(SVGNames::gTag, document()); +- m_shadowTreeRootElement->setInDocument(); +- m_shadowTreeRootElement->setShadowParentNode(this); +- +- // Spec: An additional transformation translate(x,y) is appended to the end +- // (i.e., right-side) of the transform attribute on the generated 'g', where x +- // and y represent the values of the x and y attributes on the 'use' element. +- if (x().value(this) != 0.0 || y().value(this) != 0.0) { +- String transformString = String::format("translate(%f, %f)", x().value(this), y().value(this)); +- m_shadowTreeRootElement->setAttribute(SVGNames::transformAttr, transformString); +- } ++ ASSERT(m_targetElementInstance->correspondingElement() == target); + + // Build shadow tree from instance tree + // This also handles the special cases: on , on . +- buildShadowTree(target, m_targetElementInstance.get()); ++ buildShadowTree(shadowRoot, target, m_targetElementInstance.get()); + + #if ENABLE(SVG) && ENABLE(SVG_USE) + // Expand all elements in the shadow tree. + // Expand means: replace the actual element by what it references. +- expandUseElementsInShadowTree(m_shadowTreeRootElement.get()); ++ expandUseElementsInShadowTree(shadowRoot, shadowRoot); + + // Expand all elements in the shadow tree. + // Expand means: replace the actual element by the element. +- expandSymbolElementsInShadowTree(m_shadowTreeRootElement.get()); +- ++ expandSymbolElementsInShadowTree(shadowRoot, shadowRoot); + #endif + + // Now that the shadow tree is completly expanded, we can associate + // shadow tree elements <-> instances in the instance tree. +- associateInstancesWithShadowTreeElements(m_shadowTreeRootElement->firstChild(), m_targetElementInstance.get()); ++ associateInstancesWithShadowTreeElements(shadowRoot->firstChild(), m_targetElementInstance.get()); ++ ++ // If no shadow tree element is present, this means that the reference root ++ // element was removed, as it is disallowed (ie. on ) ++ // Do NOT leave an inconsistent instance tree around, instead destruct it. ++ if (!m_targetElementInstance->shadowTreeElement()) { ++ shadowRoot->removeAllChildren(); ++ m_targetElementInstance = 0; ++ return; ++ } ++ ++ // Consistency checks - this is assumed in updateContainerOffset(). ++ ASSERT(m_targetElementInstance->shadowTreeElement()->parentNode() == shadowRoot); + + // Eventually dump instance tree + #ifdef DUMP_INSTANCE_TREE +@@ -395,8 +462,8 @@ + + PassRefPtr serializer = XMLSerializer::create(); + +- String markup = serializer->serializeToString(m_shadowTreeRootElement.get(), ec); +- ASSERT(ec == 0); ++ String markup = serializer->serializeToString(shadowRoot, ec); ++ ASSERT(!ec); + + fprintf(stderr, "Dumping shadow tree markup:\n%s\n", markup.latin1().data()); + #endif +@@ -404,30 +471,33 @@ + // Transfer event listeners assigned to the referenced element to our shadow tree elements. + transferEventListenersToShadowTree(m_targetElementInstance.get()); + +- // The DOM side is setup properly. Now we have to attach the root shadow +- // tree element manually - using attach() won't work for "shadow nodes". +- attachShadowTree(); ++ // Update container translation offsets ++ updateContainerOffsets(); + } + + RenderObject* SVGUseElement::createRenderer(RenderArena* arena, RenderStyle*) + { +- return new (arena) RenderSVGTransformableContainer(this); ++ return new (arena) RenderSVGShadowTreeRootContainer(this); ++} ++ ++static void updateFromElementCallback(Node* node) ++{ ++ if (RenderObject* renderer = node->renderer()) ++ renderer->updateFromElement(); + } + + void SVGUseElement::attach() + { + SVGStyledTransformableElement::attach(); + +- // If we're a pending resource, this doesn't have any effect. +- attachShadowTree(); ++ if (renderer()) ++ queuePostAttachCallback(updateFromElementCallback, this); + } + + void SVGUseElement::detach() + { + SVGStyledTransformableElement::detach(); +- +- if (m_shadowTreeRootElement) +- m_shadowTreeRootElement->detach(); ++ m_targetElementInstance = 0; + } + + static bool isDirectReference(Node* n) +@@ -443,10 +513,10 @@ + + Path SVGUseElement::toClipPath() const + { +- if (!m_shadowTreeRootElement) +- const_cast(this)->buildPendingResource(); ++ Node* n = m_targetElementInstance ? m_targetElementInstance->shadowTreeElement() : 0; ++ if (!n) ++ return Path(); + +- Node* n = m_shadowTreeRootElement->firstChild(); + if (n->isSVGElement() && static_cast(n)->isStyledTransformable()) { + if (!isDirectReference(n)) + // Spec: Indirect references are an error (14.3.5) +@@ -480,11 +550,12 @@ + continue; + + // Create SVGElementInstance object, for both container/non-container nodes. +- RefPtr instancePtr = SVGElementInstance::create(this, element); +- targetInstance->appendChild(instancePtr.get()); ++ RefPtr instance = SVGElementInstance::create(this, element); ++ SVGElementInstance* instancePtr = instance.get(); ++ targetInstance->appendChild(instance.release()); + + // Enter recursion, appending new instance tree nodes to the "instance" object. +- buildInstanceTree(element, instancePtr.get(), foundProblem); ++ buildInstanceTree(element, instancePtr, foundProblem); + } + + // Spec: If the referenced object is itself a 'use', or if there are 'use' subelements within the referenced +@@ -525,10 +596,11 @@ + + // Create an instance object, even if we're dealing with a cycle + RefPtr newInstance = SVGElementInstance::create(this, target); +- targetInstance->appendChild(newInstance); ++ SVGElementInstance* newInstancePtr = newInstance.get(); ++ targetInstance->appendChild(newInstance.release()); + + // Eventually enter recursion to build SVGElementInstance objects for the sub-tree children +- buildInstanceTree(target, newInstance.get(), foundProblem); ++ buildInstanceTree(target, newInstancePtr, foundProblem); + } + + void SVGUseElement::alterShadowTreeForSVGTag(SVGElement* target) +@@ -559,7 +631,7 @@ + } + } + +-void SVGUseElement::buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance) ++void SVGUseElement::buildShadowTree(SVGShadowTreeRootElement* shadowRoot, SVGElement* target, SVGElementInstance* targetInstance) + { + // For instance on (direct case). + if (isDisallowedElement(target)) +@@ -581,8 +653,8 @@ + ASSERT(newChildPtr); + + ExceptionCode ec = 0; +- m_shadowTreeRootElement->appendChild(newChild.release(), ec); +- ASSERT(ec == 0); ++ shadowRoot->appendChild(newChild.release(), ec); ++ ASSERT(!ec); + + // Handle use referencing special case + if (target->hasTagName(SVGNames::svgTag)) +@@ -590,7 +662,7 @@ + } + + #if ENABLE(SVG) && ENABLE(SVG_USE) +-void SVGUseElement::expandUseElementsInShadowTree(Node* element) ++void SVGUseElement::expandUseElementsInShadowTree(SVGShadowTreeRootElement* shadowRoot, Node* element) + { + // Why expand the elements in the shadow tree here, and not just + // do this directly in buildShadowTree, if we encounter a element? +@@ -611,28 +683,14 @@ + // Don't ASSERT(target) here, it may be "pending", too. + if (target) { + // Setup sub-shadow tree root node +- RefPtr cloneParent = new SVGGElement(SVGNames::gTag, document()); ++ RefPtr cloneParent = new SVGShadowTreeContainerElement(document()); + + // Spec: In the generated content, the 'use' will be replaced by 'g', where all attributes from the + // 'use' element except for x, y, width, height and xlink:href are transferred to the generated 'g' element. + transferUseAttributesToReplacedElement(use, cloneParent.get()); + +- // Spec: An additional transformation translate(x,y) is appended to the end +- // (i.e., right-side) of the transform attribute on the generated 'g', where x +- // and y represent the values of the x and y attributes on the 'use' element. +- if (use->x().value(this) != 0.0 || use->y().value(this) != 0.0) { +- if (!cloneParent->hasAttribute(SVGNames::transformAttr)) { +- String transformString = String::format("translate(%f, %f)", use->x().value(this), use->y().value(this)); +- cloneParent->setAttribute(SVGNames::transformAttr, transformString); +- } else { +- String transformString = String::format(" translate(%f, %f)", use->x().value(this), use->y().value(this)); +- const AtomicString& transformAttribute = cloneParent->getAttribute(SVGNames::transformAttr); +- cloneParent->setAttribute(SVGNames::transformAttr, transformAttribute + transformString); +- } +- } +- + ExceptionCode ec = 0; +- ++ + // For instance on (direct case). + if (isDisallowedElement(target)) { + // We still have to setup the replacment (). Otherwhise +@@ -640,7 +698,7 @@ + // Replace with referenced content. + ASSERT(use->parentNode()); + use->parentNode()->replaceChild(cloneParent.release(), use, ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + return; + } + +@@ -660,28 +718,28 @@ + ASSERT(newChildPtr); + + cloneParent->appendChild(newChild.release(), ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + + // Replace with referenced content. + ASSERT(use->parentNode()); + use->parentNode()->replaceChild(cloneParent.release(), use, ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + + // Handle use referencing special case + if (target->hasTagName(SVGNames::svgTag)) + alterShadowTreeForSVGTag(newChildPtr); + + // Immediately stop here, and restart expanding. +- expandUseElementsInShadowTree(m_shadowTreeRootElement.get()); ++ expandUseElementsInShadowTree(shadowRoot, shadowRoot); + return; + } + } + + for (RefPtr child = element->firstChild(); child; child = child->nextSibling()) +- expandUseElementsInShadowTree(child.get()); ++ expandUseElementsInShadowTree(shadowRoot, child.get()); + } + +-void SVGUseElement::expandSymbolElementsInShadowTree(Node* element) ++void SVGUseElement::expandSymbolElementsInShadowTree(SVGShadowTreeRootElement* shadowRoot, Node* element) + { + if (element->hasTagName(SVGNames::symbolTag)) { + // Spec: The referenced 'symbol' and its contents are deep-cloned into the generated tree, +@@ -708,7 +766,7 @@ + for (Node* child = element->firstChild(); child; child = child->nextSibling()) { + RefPtr newChild = child->cloneNode(true); + svgElement->appendChild(newChild.release(), ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + } + + // We don't walk the target tree element-by-element, and clone each element, +@@ -722,43 +780,19 @@ + // Replace with . + ASSERT(element->parentNode()); + element->parentNode()->replaceChild(svgElement.release(), element, ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + + // Immediately stop here, and restart expanding. +- expandSymbolElementsInShadowTree(m_shadowTreeRootElement.get()); ++ expandSymbolElementsInShadowTree(shadowRoot, shadowRoot); + return; + } + + for (RefPtr child = element->firstChild(); child; child = child->nextSibling()) +- expandSymbolElementsInShadowTree(child.get()); ++ expandSymbolElementsInShadowTree(shadowRoot, child.get()); + } + + #endif +- +-void SVGUseElement::attachShadowTree() +-{ +- if (!m_shadowTreeRootElement || m_shadowTreeRootElement->attached() || !document()->shouldCreateRenderers() || !attached() || !renderer()) +- return; + +- // Inspired by RenderTextControl::createSubtreeIfNeeded(). +- if (renderer()->canHaveChildren() && childShouldCreateRenderer(m_shadowTreeRootElement.get())) { +- RefPtr style = m_shadowTreeRootElement->styleForRenderer(); +- +- if (m_shadowTreeRootElement->rendererIsNeeded(style.get())) { +- m_shadowTreeRootElement->setRenderer(m_shadowTreeRootElement->createRenderer(document()->renderArena(), style.get())); +- if (RenderObject* shadowRenderer = m_shadowTreeRootElement->renderer()) { +- shadowRenderer->setStyle(style.release()); +- renderer()->addChild(shadowRenderer, m_shadowTreeRootElement->nextRenderer()); +- m_shadowTreeRootElement->setAttached(); +- } +- } +- +- // This will take care of attaching all shadow tree child nodes. +- for (Node* child = m_shadowTreeRootElement->firstChild(); child; child = child->nextSibling()) +- child->attach(); +- } +-} +- + void SVGUseElement::transferEventListenersToShadowTree(SVGElementInstance* target) + { + if (!target) +@@ -846,14 +880,19 @@ + return instance; + + for (SVGElementInstance* current = instance->firstChild(); current; current = current->nextSibling()) { +- SVGElementInstance* search = instanceForShadowTreeElement(element, current); +- if (search) ++ if (SVGElementInstance* search = instanceForShadowTreeElement(element, current)) + return search; + } + + return 0; + } + ++void SVGUseElement::invalidateShadowTree() ++{ ++ m_needsShadowTreeRecreation = true; ++ setNeedsStyleRecalc(); ++} ++ + void SVGUseElement::transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to) const + { + ASSERT(from); +@@ -864,19 +903,19 @@ + ExceptionCode ec = 0; + + to->removeAttribute(SVGNames::xAttr, ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + + to->removeAttribute(SVGNames::yAttr, ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + + to->removeAttribute(SVGNames::widthAttr, ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + + to->removeAttribute(SVGNames::heightAttr, ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + + to->removeAttribute(XLinkNames::hrefAttr, ec); +- ASSERT(ec == 0); ++ ASSERT(!ec); + } + + } +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGUseElement.h qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGUseElement.h +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/svg/SVGUseElement.h 2010-06-02 04:03:10.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/svg/SVGUseElement.h 2010-06-11 15:29:14.557181915 +0200 +@@ -32,6 +32,7 @@ + + class SVGElementInstance; + class SVGLength; ++ class SVGShadowTreeRootElement; + + class SVGUseElement : public SVGStyledTransformableElement, + public SVGTests, +@@ -52,11 +53,9 @@ + virtual void buildPendingResource(); + + virtual void parseMappedAttribute(MappedAttribute*); +- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); +- + virtual void svgAttributeChanged(const QualifiedName&); +- virtual void recalcStyle(StyleChange = NoChange); + ++ virtual void recalcStyle(StyleChange = NoChange); + virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); + virtual void attach(); + virtual void detach(); +@@ -65,6 +64,12 @@ + + static void removeDisallowedElementsFromSubtree(Node* element); + SVGElementInstance* instanceForShadowTreeElement(Node* element) const; ++ void invalidateShadowTree(); ++ ++ private: ++ friend class RenderSVGShadowTreeRootContainer; ++ bool isPendingResource() const { return m_isPendingResource; } ++ void buildShadowAndInstanceTree(SVGShadowTreeRootElement*); + + private: + ANIMATED_PROPERTY_DECLARATIONS(SVGUseElement, SVGNames::useTagString, SVGNames::xAttrString, SVGLength, X, x) +@@ -86,26 +91,25 @@ + void handleDeepUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, bool& foundCycle); + + // Shadow tree handling +- PassRefPtr buildShadowTreeForSymbolTag(SVGElement* target, SVGElementInstance* targetInstance); +- void alterShadowTreeForSVGTag(SVGElement* target); +- +- void buildShadowTree(SVGElement* target, SVGElementInstance* targetInstance); ++ void alterShadowTreeForSVGTag(SVGElement*); ++ void buildShadowTree(SVGShadowTreeRootElement*, SVGElement* target, SVGElementInstance* targetInstance); + + #if ENABLE(SVG) && ENABLE(SVG_USE) +- void expandUseElementsInShadowTree(Node* element); +- void expandSymbolElementsInShadowTree(Node* element); ++ void expandUseElementsInShadowTree(SVGShadowTreeRootElement*, Node* element); ++ void expandSymbolElementsInShadowTree(SVGShadowTreeRootElement*, Node* element); + #endif + +- void attachShadowTree(); +- + // "Tree connector" + void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstance* targetInstance); + SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const; + + void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to) const; + void transferEventListenersToShadowTree(SVGElementInstance* target); ++ void updateContainerOffsets(); + +- RefPtr m_shadowTreeRootElement; ++ bool m_isPendingResource; ++ bool m_needsShadowTreeRecreation; ++ String m_resourceId; + RefPtr m_targetElementInstance; + }; + +diff -urN qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/WebCore.pro qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/WebCore.pro +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/WebCore.pro 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1303-1304/src/3rdparty/webkit/WebCore/WebCore.pro 2010-06-11 15:29:11.343280486 +0200 +@@ -2066,6 +2066,7 @@ + rendering/RenderSVGInlineText.h \ + rendering/RenderSVGModelObject.h \ + rendering/RenderSVGRoot.h \ ++ rendering/RenderSVGShadowTreeRootContainer.h \ + rendering/RenderSVGText.h \ + rendering/RenderSVGTextPath.h \ + rendering/RenderSVGTransformableContainer.h \ +@@ -2121,6 +2122,7 @@ + rendering/SVGRenderSupport.h \ + rendering/SVGRenderTreeAsText.h \ + rendering/SVGRootInlineBox.h \ ++ rendering/SVGShadowTreeElements.h \ + rendering/TextControlInnerElements.h \ + rendering/TransformState.h \ + svg/animation/SMILTimeContainer.h \ +@@ -3093,6 +3095,7 @@ + rendering/RenderSVGInlineText.cpp \ + rendering/RenderSVGModelObject.cpp \ + rendering/RenderSVGRoot.cpp \ ++ rendering/RenderSVGShadowTreeRootContainer.cpp \ + rendering/RenderSVGText.cpp \ + rendering/RenderSVGTextPath.cpp \ + rendering/RenderSVGTransformableContainer.cpp \ +@@ -3102,7 +3105,8 @@ + rendering/SVGInlineFlowBox.cpp \ + rendering/SVGInlineTextBox.cpp \ + rendering/SVGRenderSupport.cpp \ +- rendering/SVGRootInlineBox.cpp ++ rendering/SVGRootInlineBox.cpp \ ++ rendering/SVGShadowTreeElements.cpp + + + # GENERATOR 5-C: diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1392.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1392.patch new file mode 100644 index 0000000..914d4ee --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1392.patch @@ -0,0 +1,12 @@ +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1392/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1392/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp 2010-06-10 20:24:02.864193022 +0200 +@@ -4484,7 +4484,7 @@ + + // Drill into inlines looking for our first text child. + RenderObject* currChild = firstLetterBlock->firstChild(); +- while (currChild && currChild->needsLayout() && (!currChild->isReplaced() || currChild->isFloatingOrPositioned()) && !currChild->isText()) { ++ while (currChild && currChild->needsLayout() && ((!currChild->isReplaced() && !currChild->isRenderButton() && !currChild->isMenuList()) || currChild->isFloatingOrPositioned()) && !currChild->isText()) { + if (currChild->isFloatingOrPositioned()) { + if (currChild->style()->styleType() == FIRST_LETTER) + break; diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1396.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1396.patch new file mode 100644 index 0000000..b1c6488 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1396.patch @@ -0,0 +1,56 @@ +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1396/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp 2010-06-02 04:03:12.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1396/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp 2010-06-10 20:34:00.316318866 +0200 +@@ -395,33 +395,43 @@ + document()->removeFocusedNodeOfSubtree(this, true); + + forbidEventDispatch(); +- int childCountDelta = 0; ++ Vector > removedChildren; + while (RefPtr n = m_firstChild) { +- childCountDelta--; +- + Node* next = n->nextSibling(); + +- // Remove the node from the tree before calling detach or removedFromDocument (4427024, 4129744) ++ // Remove the node from the tree before calling detach or removedFromDocument (4427024, 4129744). ++ // removeChild() does this after calling detach(). There is no explanation for ++ // this discrepancy between removeChild() and its optimized version removeChildren(). + n->setPreviousSibling(0); + n->setNextSibling(0); + n->setParent(0); +- ++ + m_firstChild = next; + if (n == m_lastChild) + m_lastChild = 0; + + if (n->attached()) + n->detach(); +- +- if (n->inDocument()) +- n->removedFromDocument(); ++ ++ removedChildren.append(n.release()); + } + allowEventDispatch(); + ++ size_t removedChildrenCount = removedChildren.size(); ++ + // Dispatch a single post-removal mutation event denoting a modified subtree. +- childrenChanged(false, 0, 0, childCountDelta); ++ childrenChanged(false, 0, 0, -static_cast(removedChildrenCount)); + dispatchSubtreeModifiedEvent(); + ++ for (size_t i = 0; i < removedChildrenCount; ++i) { ++ Node* removedChild = removedChildren[i].get(); ++ if (removedChild->inDocument()) ++ removedChild->removedFromDocument(); ++ // removeChild() calls removedFromTree(true) if the child was not in the ++ // document. There is no explanation for this discrepancy between removeChild() ++ // and its optimized version removeChildren(). ++ } ++ + return true; + } + diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1397.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1397.patch new file mode 100644 index 0000000..6f7baf1 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1397.patch @@ -0,0 +1,53 @@ +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.cpp 2010-06-10 20:41:45.295318418 +0200 +@@ -552,12 +552,6 @@ + toRenderTextControl(renderer)->selectionChanged(userTriggered); + } + +-void Frame::invalidateSelection() +-{ +- selection()->setNeedsLayout(); +- selectionLayoutChanged(); +-} +- + void Frame::setCaretVisible(bool flag) + { + if (m_caretVisible == flag) +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.h qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.h +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.h 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.h 2010-06-10 20:41:45.291318453 +0200 +@@ -259,8 +259,6 @@ + void selectionLayoutChanged(); + void notifyRendererOfSelectionChange(bool userTriggered); + +- void invalidateSelection(); +- + void setCaretVisible(bool = true); + void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const; + void paintDragCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const; +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/FrameView.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/FrameView.cpp 2010-06-10 20:41:45.293318191 +0200 +@@ -642,7 +642,8 @@ + root->view()->popLayoutState(); + m_layoutRoot = 0; + +- m_frame->invalidateSelection(); ++ m_frame->selection()->setNeedsLayout(); ++ m_frame->selectionLayoutChanged(); + + m_layoutSchedulingEnabled = true; + +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-10 20:41:45.297318506 +0200 +@@ -1170,7 +1170,7 @@ + // The caret rect needs to be invalidated after scrolling + Frame* frame = renderer()->document()->frame(); + if (frame) +- frame->invalidateSelection(); ++ frame->selection()->setNeedsLayout(); + + // Just schedule a full repaint of our object. + if (repaint) diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1398.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1398.patch new file mode 100644 index 0000000..443de30 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1398.patch @@ -0,0 +1,244 @@ +diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp.CVE-2010-1398 2010-06-02 04:03:12.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp 2010-06-11 16:12:55.750525354 +0200 +@@ -35,6 +35,7 @@ + #include "ClientRect.h" + #include "ClientRectList.h" + #include "Document.h" ++#include "DocumentFragment.h" + #include "ElementRareData.h" + #include "ExceptionCode.h" + #include "FocusController.h" +@@ -42,6 +43,7 @@ + #include "FrameView.h" + #include "HTMLElement.h" + #include "HTMLNames.h" ++#include "HTMLTokenizer.h" + #include "NamedNodeMap.h" + #include "NodeList.h" + #include "NodeRenderStyle.h" +@@ -49,6 +51,7 @@ + #include "RenderView.h" + #include "TextIterator.h" + #include "XMLNames.h" ++#include "XMLTokenizer.h" + + #if ENABLE(SVG) + #include "SVGNames.h" +@@ -91,6 +94,51 @@ NodeRareData* Element::createRareData() + { + return new ElementRareData; + } ++ ++PassRefPtr Element::createContextualFragment(const String& markup) ++{ ++ RefPtr fragment = DocumentFragment::create(document()); ++ ++ if (document()->isHTMLDocument()) ++ parseHTMLDocumentFragment(markup, fragment.get()); ++ else { ++ if (!parseXMLDocumentFragment(markup, fragment.get(), this)) ++ // FIXME: We should propagate a syntax error exception out here. ++ return 0; ++ } ++ ++ // Exceptions are ignored because none ought to happen here. ++ ExceptionCode ignoredExceptionCode; ++ ++ // We need to pop and elements and remove to ++ // accommodate folks passing complete HTML documents to make the ++ // child of an element. ++ ++ RefPtr nextNode; ++ for (RefPtr node = fragment->firstChild(); node; node = nextNode) { ++ nextNode = node->nextSibling(); ++ if (node->hasTagName(htmlTag) || node->hasTagName(bodyTag)) { ++ Node* firstChild = node->firstChild(); ++ if (firstChild) ++ nextNode = firstChild; ++ RefPtr nextChild; ++ for (RefPtr child = firstChild; child; child = nextChild) { ++ nextChild = child->nextSibling(); ++ node->removeChild(child.get(), ignoredExceptionCode); ++ ASSERT(!ignoredExceptionCode); ++ fragment->insertBefore(child, node.get(), ignoredExceptionCode); ++ ASSERT(!ignoredExceptionCode); ++ } ++ fragment->removeChild(node.get(), ignoredExceptionCode); ++ ASSERT(!ignoredExceptionCode); ++ } else if (node->hasTagName(headTag)) { ++ fragment->removeChild(node.get(), ignoredExceptionCode); ++ ASSERT(!ignoredExceptionCode); ++ } ++ } ++ ++ return fragment.release(); ++} + + PassRefPtr Element::cloneNode(bool deep) + { +diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h.CVE-2010-1398 2010-06-02 04:03:12.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h 2010-06-14 16:54:57.639394749 +0200 +@@ -28,6 +28,7 @@ + #include "ContainerNode.h" + #include "QualifiedName.h" + #include "ScrollTypes.h" ++#include "DocumentFragment.h" + + namespace WebCore { + +@@ -89,6 +90,8 @@ public: + DEFINE_ATTRIBUTE_EVENT_LISTENER(search); + DEFINE_ATTRIBUTE_EVENT_LISTENER(selectstart); + ++ virtual PassRefPtr createContextualFragment(const String&); ++ + const AtomicString& getIDAttribute() const; + bool hasAttribute(const QualifiedName&) const; + const AtomicString& getAttribute(const QualifiedName&) const; +diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp.CVE-2010-1398 2010-06-02 04:03:10.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp 2010-06-11 16:12:55.752525451 +0200 +@@ -1054,11 +1054,7 @@ String createMarkup(const Range* range, + + PassRefPtr createFragmentFromMarkup(Document* document, const String& markup, const String& baseURL) + { +- ASSERT(document->documentElement()->isHTMLElement()); +- // FIXME: What if the document element is not an HTML element? +- HTMLElement *element = static_cast(document->documentElement()); +- +- RefPtr fragment = element->createContextualFragment(markup); ++ RefPtr fragment = document->documentElement()->createContextualFragment(markup); + + if (fragment && !baseURL.isEmpty() && baseURL != blankURL() && baseURL != document->baseURL()) + completeURLs(fragment.get(), baseURL); +diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp.CVE-2010-1398 2010-06-02 04:03:10.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp 2010-06-11 16:12:55.753537613 +0200 +@@ -235,9 +235,9 @@ String HTMLElement::outerHTML() const + return createMarkup(this); + } + +-PassRefPtr HTMLElement::createContextualFragment(const String &html) ++PassRefPtr HTMLElement::createContextualFragment(const String &markup) + { +- // the following is in accordance with the definition as used by IE ++ // The following is in accordance with the definition as used by IE. + if (endTagRequirement() == TagStatusForbidden) + return 0; + +@@ -245,47 +245,7 @@ PassRefPtr HTMLElement + hasLocalName(headTag) || hasLocalName(styleTag) || hasLocalName(titleTag)) + return 0; + +- RefPtr fragment = DocumentFragment::create(document()); +- +- if (document()->isHTMLDocument()) +- parseHTMLDocumentFragment(html, fragment.get()); +- else { +- if (!parseXMLDocumentFragment(html, fragment.get(), this)) +- // FIXME: We should propagate a syntax error exception out here. +- return 0; +- } +- +- // Exceptions are ignored because none ought to happen here. +- int ignoredExceptionCode; +- +- // we need to pop and elements and remove to +- // accommodate folks passing complete HTML documents to make the +- // child of an element. +- +- RefPtr nextNode; +- for (RefPtr node = fragment->firstChild(); node; node = nextNode) { +- nextNode = node->nextSibling(); +- if (node->hasTagName(htmlTag) || node->hasTagName(bodyTag)) { +- Node *firstChild = node->firstChild(); +- if (firstChild) +- nextNode = firstChild; +- RefPtr nextChild; +- for (RefPtr child = firstChild; child; child = nextChild) { +- nextChild = child->nextSibling(); +- node->removeChild(child.get(), ignoredExceptionCode); +- ASSERT(!ignoredExceptionCode); +- fragment->insertBefore(child, node.get(), ignoredExceptionCode); +- ASSERT(!ignoredExceptionCode); +- } +- fragment->removeChild(node.get(), ignoredExceptionCode); +- ASSERT(!ignoredExceptionCode); +- } else if (node->hasTagName(headTag)) { +- fragment->removeChild(node.get(), ignoredExceptionCode); +- ASSERT(!ignoredExceptionCode); +- } +- } +- +- return fragment.release(); ++ return Element::createContextualFragment(markup); + } + + static inline bool hasOneChild(ContainerNode* node) +@@ -371,7 +331,7 @@ void HTMLElement::setOuterHTML(const Str + + void HTMLElement::setInnerText(const String& text, ExceptionCode& ec) + { +- // follow the IE specs about when this is allowed ++ // Follow the IE specs about when this is allowed. + if (endTagRequirement() == TagStatusForbidden) { + ec = NO_MODIFICATION_ALLOWED_ERR; + return; +@@ -441,7 +401,7 @@ void HTMLElement::setInnerText(const Str + + void HTMLElement::setOuterText(const String &text, ExceptionCode& ec) + { +- // follow the IE specs about when this is allowed ++ // Follow the IE specs about when this is allowed. + if (endTagRequirement() == TagStatusForbidden) { + ec = NO_MODIFICATION_ALLOWED_ERR; + return; +@@ -469,7 +429,7 @@ void HTMLElement::setOuterText(const Str + if (ec) + return; + +- // is previous node a text node? if so, merge into it ++ // Is previous node a text node? If so, merge into it. + Node* prev = t->previousSibling(); + if (prev && prev->isTextNode()) { + Text* textPrev = static_cast(prev); +@@ -482,7 +442,7 @@ void HTMLElement::setOuterText(const Str + t = textPrev; + } + +- // is next node a text node? if so, merge it in ++ // Is next node a text node? If so, merge it in. + Node* next = t->nextSibling(); + if (next && next->isTextNode()) { + Text* textNext = static_cast(next); +@@ -522,7 +482,7 @@ Node* HTMLElement::insertAdjacent(const + return 0; + } + +- // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative ++ // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative. + ec = NOT_SUPPORTED_ERR; + return 0; + } +@@ -530,7 +490,7 @@ Node* HTMLElement::insertAdjacent(const + Element* HTMLElement::insertAdjacentElement(const String& where, Element* newChild, ExceptionCode& ec) + { + if (!newChild) { +- // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative ++ // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative. + ec = TYPE_MISMATCH_ERR; + return 0; + } +@@ -567,8 +527,8 @@ void HTMLElement::addHTMLAlignment(Mappe + + void HTMLElement::addHTMLAlignmentToStyledElement(StyledElement* element, MappedAttribute* attr) + { +- // vertical alignment with respect to the current baseline of the text +- // right or left means floating images ++ // Vertical alignment with respect to the current baseline of the text ++ // right or left means floating images. + int floatValue = CSSValueInvalid; + int verticalAlignValue = CSSValueInvalid; + diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1400.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1400.patch new file mode 100644 index 0000000..ac27a59 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1400.patch @@ -0,0 +1,32 @@ +diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp.CVE-2010-1400 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp.CVE-2010-1400 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp 2010-06-15 13:55:36.853463455 +0200 +@@ -1611,7 +1611,7 @@ void RenderObject::styleWillChange(Style + } + } + +-void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle*) ++void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) + { + if (s_affectsParentBlock) + handleDynamicFloatPositionChange(); +@@ -1619,9 +1619,17 @@ void RenderObject::styleDidChange(StyleD + if (!m_parent) + return; + +- if (diff == StyleDifferenceLayout) ++ if (diff == StyleDifferenceLayout) { ++ // If the object already needs layout, then setNeedsLayout won't do ++ // any work. But if the containing block has changed, then we may need ++ // to make the new containing blocks for layout. The change that can ++ // directly affect the containing block of this object is a change to ++ // the position style. ++ if (m_needsLayout && oldStyle->position() != m_style->position()) ++ markContainingBlocksForLayout(); ++ + setNeedsLayoutAndPrefWidthsRecalc(); +- else if (diff == StyleDifferenceLayoutPositionedMovementOnly) ++ } else if (diff == StyleDifferenceLayoutPositionedMovementOnly) + setNeedsPositionedMovementLayout(); + + // Don't check for repaint here; we need to wait until the layer has been diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1412.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1412.patch new file mode 100644 index 0000000..296b25e --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1412.patch @@ -0,0 +1,45 @@ +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp qt-everywhere-opensource-src-4.6.3-2010-1412/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-2010-1412/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-11 00:09:43.741191104 +0200 +@@ -3039,22 +3039,33 @@ + // Locate the common ancestor render object for the two renderers. + RenderObject* ancestor = commonAncestor(oldHoverObj, newHoverObj); + ++ Vector nodesToRemoveFromChain; ++ Vector nodesToAddToChain; ++ + if (oldHoverObj != newHoverObj) { + // The old hover path only needs to be cleared up to (and not including) the common ancestor; + for (RenderObject* curr = oldHoverObj; curr && curr != ancestor; curr = curr->hoverAncestor()) { +- if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain())) { +- curr->node()->setActive(false); +- curr->node()->setHovered(false); +- } ++ if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain())) ++ nodesToRemoveFromChain.append(curr->node()); + } + } + + // Now set the hover state for our new object up to the root. + for (RenderObject* curr = newHoverObj; curr; curr = curr->hoverAncestor()) { +- if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain())) { +- curr->node()->setActive(request.active()); +- curr->node()->setHovered(true); +- } ++ if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain())) ++ nodesToAddToChain.append(curr->node()); ++ } ++ ++ size_t removeCount = nodesToRemoveFromChain.size(); ++ for (size_t i = 0; i < removeCount; ++i) { ++ nodesToRemoveFromChain[i]->setActive(false); ++ nodesToRemoveFromChain[i]->setHovered(false); ++ } ++ ++ size_t addCount = nodesToAddToChain.size(); ++ for (size_t i = 0; i < addCount; ++i) { ++ nodesToAddToChain[i]->setActive(request.active()); ++ nodesToAddToChain[i]->setHovered(true); + } + } + diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1770.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1770.patch new file mode 100644 index 0000000..f0bafb9 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1770.patch @@ -0,0 +1,33 @@ +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp 2010-06-11 13:42:31.190174662 +0200 +@@ -207,7 +207,7 @@ + PassRefPtr RenderText::originalText() const + { + Node* e = node(); +- return e ? static_cast(e)->dataImpl() : 0; ++ return (e && e->isTextNode()) ? static_cast(e)->dataImpl() : 0; + } + + void RenderText::absoluteRects(Vector& rects, int tx, int ty) +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp 2010-06-11 13:42:31.197153658 +0200 +@@ -47,7 +47,7 @@ + PassRefPtr RenderTextFragment::originalText() const + { + Node* e = node(); +- RefPtr result = (e ? static_cast(e)->dataImpl() : contentString()); ++ RefPtr result = ((e && e->isTextNode()) ? static_cast(e)->dataImpl() : contentString()); + if (result && (start() > 0 || start() < result->length())) + result = result->substring(start(), end()); + return result.release(); +@@ -76,7 +76,7 @@ + { + if (start()) { + Node* e = node(); +- StringImpl* original = (e ? static_cast(e)->dataImpl() : contentString()); ++ StringImpl* original = ((e && e->isTextNode()) ? static_cast(e)->dataImpl() : contentString()); + if (original) + return (*original)[start() - 1]; + } diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1773.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1773.patch new file mode 100644 index 0000000..0ba3cfa --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1773.patch @@ -0,0 +1,16 @@ +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1773/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1773/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp 2010-06-10 17:33:06.092192665 +0200 +@@ -88,8 +88,10 @@ + --number; + letters[lettersSize - 1] = alphabet[number % alphabetSize]; + int length = 1; +- while ((number /= alphabetSize) > 0) +- letters[lettersSize - ++length] = alphabet[number % alphabetSize - 1]; ++ while ((number /= alphabetSize) > 0) { ++ --number; ++ letters[lettersSize - ++length] = alphabet[number % alphabetSize]; ++ } + + ASSERT(length <= lettersSize); + return String(&letters[lettersSize - length], length); diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1774.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1774.patch new file mode 100644 index 0000000..2fd7849 --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1774.patch @@ -0,0 +1,13 @@ +diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp qt-everywhere-opensource-src-4.6.3-CVE-1774/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp 2010-06-02 04:03:11.000000000 +0200 ++++ qt-everywhere-opensource-src-4.6.3-CVE-1774/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp 2010-06-11 14:45:02.625278334 +0200 +@@ -168,8 +168,7 @@ + + int usedSpan = 0; + int i = 0; +- while (usedSpan < span) { +- ASSERT(cCol + i < nEffCols); ++ while (usedSpan < span && cCol + i < nEffCols) { + int eSpan = m_table->spanOfEffCol(cCol + i); + // Only set if no col element has already set it. + if (m_width[cCol + i].isAuto() && w.type() != Auto) { diff --git a/qt-everywhere-opensource-src-4.6.3-CVE-2010-1778.patch b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1778.patch new file mode 100644 index 0000000..9da7dcf --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-CVE-2010-1778.patch @@ -0,0 +1,29 @@ +diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp.CVE-2010-1778 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp.CVE-2010-1778 2010-06-11 16:12:55.786338275 +0200 ++++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp 2010-06-15 13:23:21.114401487 +0200 +@@ -1189,14 +1189,13 @@ void FrameView::scheduleRelayoutOfSubtre + { + ASSERT(m_frame->view() == this); + +- if (!m_layoutSchedulingEnabled || (m_frame->contentRenderer() +- && m_frame->contentRenderer()->needsLayout())) { ++ if (m_frame->contentRenderer() && m_frame->contentRenderer()->needsLayout()) { + if (relayoutRoot) + relayoutRoot->markContainingBlocksForLayout(false); + return; + } + +- if (layoutPending()) { ++ if (layoutPending() || !m_layoutSchedulingEnabled) { + if (m_layoutRoot != relayoutRoot) { + if (isObjectAncestorContainerOf(m_layoutRoot, relayoutRoot)) { + // Keep the current root +@@ -1213,7 +1212,7 @@ void FrameView::scheduleRelayoutOfSubtre + relayoutRoot->markContainingBlocksForLayout(false); + } + } +- } else { ++ } else if (m_layoutSchedulingEnabled) { + int delay = m_frame->document()->minimumLayoutDelay(); + m_layoutRoot = relayoutRoot; + m_delayedLayout = delay != 0; diff --git a/qt.spec b/qt.spec index 3a4ef56..ff7cbcc 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.3 -Release: 1%{?dist} +Release: 3%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -67,6 +67,18 @@ Patch57: qt-everywhere-opensource-src-4.6.2-webkit-sparc64.patch Patch104: qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch Patch106: qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch Patch108: qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch +Patch109: qt-everywhere-opensource-src-4.6.3-CVE-2010-1303_1304.patch +Patch110: qt-everywhere-opensource-src-4.6.3-CVE-2010-1392.patch +Patch111: qt-everywhere-opensource-src-4.6.3-CVE-2010-1396.patch +Patch112: qt-everywhere-opensource-src-4.6.3-CVE-2010-1397.patch +Patch113: qt-everywhere-opensource-src-4.6.3-CVE-2010-1398.patch +Patch114: qt-everywhere-opensource-src-4.6.3-CVE-2010-1400.patch +Patch115: qt-everywhere-opensource-src-4.6.3-CVE-2010-1412.patch +Patch116: qt-everywhere-opensource-src-4.6.3-CVE-2010-1770.patch +Patch117: qt-everywhere-opensource-src-4.6.3-CVE-2010-1773.patch +Patch118: qt-everywhere-opensource-src-4.6.3-CVE-2010-1774.patch +Patch119: qt-everywhere-opensource-src-4.6.3-CVE-2010-1119.patch +Patch120: qt-everywhere-opensource-src-4.6.3-CVE-2010-1778.patch # kde-qt git patches Patch201: 0001-This-patch-uses-object-name-as-a-fallback-for-window.patch @@ -428,6 +440,19 @@ Qt libraries used for drawing widgets and OpenGL items. %patch104 -p1 -b .cve-2010-0051-lax-css-parsing-cross-domain-theft %patch106 -p1 -b .cve-2010-0656 %patch108 -p1 -b .cve-2010-0648 +%patch109 -p1 -b .CVE-2010-1303_1304 +%patch110 -p1 -b .CVE-2010-1392 +%patch111 -p1 -b .CVE-2010-1396 +%patch112 -p1 -b .CVE-2010-1397 +%patch113 -p1 -b .CVE-2010-1398 +%patch114 -p1 -b .CVE-2010-1400 +%patch115 -p1 -b .CVE-2010-1412 +%patch116 -p1 -b .CVE-2010-1770 +%patch117 -p1 -b .CVE-2010-1773 +%patch118 -p1 -b .CVE-2010-1774 +%patch119 -p1 -b .CVE-2010-1119 +%patch120 -p1 -b .CVE-2010-1778 + # kde-qt branch %patch201 -p1 -b .kde-qt-0001 @@ -1029,6 +1054,16 @@ fi %changelog +* Tue Jun 15 2010 Jaroslav Reznik - 4.6.3-3 +- WebKit security update: + CVE-2010-1119, CVE-2010-1400, CVE-2010-1778 + +* Fri Jun 11 2010 Jaroslav Reznik - 4.6.3-2 +- WebKit security update: + CVE-2010-1303_1304, CVE-2010-1392, CVE-2010-1396, CVE-2010-1397, + CVE-2010-1398, CVE-2010-1412, CVE-2010-1770, + CVE-2010-1773, CVE-2010-1774 + * Tue Jun 08 2010 Than Ngo - 4.6.3-1 - 4.6.3 From d57753c02c55302df6b0000979d78a7ade54d4b5 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 18 Jun 2010 15:57:12 +0000 Subject: [PATCH 37/41] - QtWebKit does not search correct plugin path(s) (#568860) - QtWebKit browsers crash with flash-plugin (rh#605677,webkit#40567) --- .cvsignore | 1 + ...ce-src-4.7.0-beta1-qtwebkit_gtk_init.patch | 47 +++++++++++++++++++ ...-src-4.7.0-beta1-qtwebkit_pluginpath.patch | 19 ++++++++ qt.spec | 16 ++++++- 4 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch create mode 100644 qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch diff --git a/.cvsignore b/.cvsignore index a3d4a40..22c707f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -8,3 +8,4 @@ hi32-phonon-gstreamer.png hi48-phonon-gstreamer.png hi64-phonon-gstreamer.png qt-everywhere-opensource-src-4.6.2.tar.gz +qt-everywhere-opensource-src-4.6.3.tar.gz diff --git a/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch b/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch new file mode 100644 index 0000000..42b3c54 --- /dev/null +++ b/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch @@ -0,0 +1,47 @@ +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp.gtk_init qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp +--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp.gtk_init 2010-05-03 19:43:20.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp 2010-06-18 10:11:20.738800727 -0500 +@@ -35,6 +35,8 @@ + + namespace WebCore { + ++typedef void gtkInitFunc(int *argc, char ***argv); ++ + bool PluginPackage::fetchInfo() + { + if (!load()) +@@ -110,6 +112,8 @@ bool PluginPackage::load() + NP_InitializeFuncPtr NP_Initialize; + NPError npErr; + ++ gtkInitFunc* gtkInit; ++ + NP_Initialize = (NP_InitializeFuncPtr)m_module->resolve("NP_Initialize"); + m_NPP_Shutdown = (NPP_ShutdownProcPtr)m_module->resolve("NP_Shutdown"); + +@@ -127,6 +131,25 @@ bool PluginPackage::load() + m_browserFuncs.getvalue = staticPluginQuirkRequiresGtkToolKit_NPN_GetValue; + } + ++ // WORKAROUND: Prevent gtk based plugin crashes such as BR# 40567 by ++ // explicitly forcing the initializing of Gtk, i.e. calling gtk_init, ++ // whenver the symbol is present in the plugin library loaded above. ++ // Note that this workaround is based on code from the NSPluginClass ctor ++ // in KDE's kdebase/apps/nsplugins/viewer/nsplugin.cpp file. ++ gtkInit = (gtkInitFunc*)m_module->resolve("gtk_init"); ++ if (gtkInit) { ++ // Prevent gtk_init() from replacing the X error handlers, since the Gtk ++ // handlers abort when they receive an X error, thus killing the viewer. ++#ifdef Q_WS_X11 ++ int (*old_error_handler)(Display*, XErrorEvent*) = XSetErrorHandler(0); ++ int (*old_io_error_handler)(Display*) = XSetIOErrorHandler(0); ++#endif ++ gtkInit(0, 0); ++#ifdef Q_WS_X11 ++ XSetErrorHandler(old_error_handler); ++ XSetIOErrorHandler(old_io_error_handler); ++#endif ++ } + #if defined(XP_UNIX) + npErr = NP_Initialize(&m_browserFuncs, &m_pluginFuncs); + #else diff --git a/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch b/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch new file mode 100644 index 0000000..016b3b4 --- /dev/null +++ b/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch @@ -0,0 +1,19 @@ +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp +--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath 2010-05-03 19:43:20.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp 2010-06-18 10:02:37.004788646 -0500 +@@ -345,6 +345,7 @@ Vector PluginDatabase::defaultPl + paths.append("/usr/lib/firefox/plugins"); + paths.append("/usr/lib64/browser-plugins"); + paths.append("/usr/lib/browser-plugins"); ++ paths.append("/usr/lib/mozilla/plugins-wrapped"); + paths.append("/usr/lib/mozilla/plugins"); + paths.append("/usr/local/netscape/plugins"); + paths.append("/opt/mozilla/plugins"); +@@ -355,6 +356,7 @@ Vector PluginDatabase::defaultPl + paths.append("/usr/lib/netscape/plugins-libc5"); + paths.append("/usr/lib/netscape/plugins-libc6"); + paths.append("/usr/lib64/netscape/plugins"); ++ paths.append("/usr/lib64/mozilla/plugins-wrapped"); + paths.append("/usr/lib64/mozilla/plugins"); + paths.append("/usr/lib/nsbrowser/plugins"); + paths.append("/usr/lib64/nsbrowser/plugins"); diff --git a/qt.spec b/qt.spec index ff7cbcc..e39546f 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.3 -Release: 3%{?dist} +Release: 4%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -62,8 +62,12 @@ Patch55: qt-everywhere-opensource-src-4.6.2-cups.patch Patch56: qt-everywhere-opensource-src-4.6.2-webkit-s390x.patch # fix type cast issue on sparc64 Patch57: qt-everywhere-opensource-src-4.6.2-webkit-sparc64.patch +# qtwebkit to search nspluginwrapper paths too +Patch58: qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch -# security patches +# upstream or security patches +# https://bugs.webkit.org/show_bug.cgi?id=40567 +Patch100: qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch Patch104: qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch Patch106: qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch Patch108: qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch @@ -435,6 +439,10 @@ Qt libraries used for drawing widgets and OpenGL items. %patch55 -p1 -b .cups-1 %patch56 -p1 -b .typecast_s390x %patch57 -p1 -b .typecast_sparc64 +%patch58 -p1 -b .qtwebkit_pluginpath + +# upstream patches +%patch100 -p1 -b .qtwebkit_gtk_init # security fixes %patch104 -p1 -b .cve-2010-0051-lax-css-parsing-cross-domain-theft @@ -1054,6 +1062,10 @@ fi %changelog +* Fri Jun 18 2010 Rex Dieter - 4.6.3-4 +- QtWebKit does not search correct plugin path(s) (#568860) +- QtWebKit browsers crash with flash-plugin (rh#605677,webkit#40567) + * Tue Jun 15 2010 Jaroslav Reznik - 4.6.3-3 - WebKit security update: CVE-2010-1119, CVE-2010-1400, CVE-2010-1778 From a97307be018603784227ceb113e35b5679f8c0a0 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 29 Jun 2010 22:38:45 +0000 Subject: [PATCH 38/41] - workaround glib_eventloop crasher induced by gdal/grass (bug #498111) Fri Jun 20 2010 Rex Dieter 4.6.3-5 - avoid timestamps in uic-generated files to be multilib-friendly --- ...e-src-4.6.3-glib_eventloop_nullcheck.patch | 21 +++++++++++ ...nsource-src-4.7.0-beta1-uic_multilib.patch | 36 +++++++++++++++++++ qt.spec | 15 +++++++- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch create mode 100644 qt-everywhere-opensource-src-4.7.0-beta1-uic_multilib.patch diff --git a/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch b/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch new file mode 100644 index 0000000..f0c9eaa --- /dev/null +++ b/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch @@ -0,0 +1,21 @@ +diff -up qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.glib_eventloop_nullcheck qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp +--- qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.glib_eventloop_nullcheck 2010-06-01 21:03:15.000000000 -0500 ++++ qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp 2010-06-29 14:58:12.299073784 -0500 +@@ -76,7 +76,7 @@ static gboolean x11EventSourcePrepare(GS + GX11EventSource *source = reinterpret_cast(s); + return (XEventsQueued(X11->display, QueuedAfterFlush) + || (!(source->flags & QEventLoop::ExcludeUserInputEvents) +- && !source->d->queuedUserInputEvents.isEmpty())); ++ && source->d && !source->d->queuedUserInputEvents.isEmpty())); + } + + static gboolean x11EventSourceCheck(GSource *s) +@@ -84,7 +84,7 @@ static gboolean x11EventSourceCheck(GSou + GX11EventSource *source = reinterpret_cast(s); + return (XEventsQueued(X11->display, QueuedAfterFlush) + || (!(source->flags & QEventLoop::ExcludeUserInputEvents) +- && !source->d->queuedUserInputEvents.isEmpty())); ++ && source->d && !source->d->queuedUserInputEvents.isEmpty())); + } + + static gboolean x11EventSourceDispatch(GSource *s, GSourceFunc callback, gpointer user_data) diff --git a/qt-everywhere-opensource-src-4.7.0-beta1-uic_multilib.patch b/qt-everywhere-opensource-src-4.7.0-beta1-uic_multilib.patch new file mode 100644 index 0000000..09670c1 --- /dev/null +++ b/qt-everywhere-opensource-src-4.7.0-beta1-uic_multilib.patch @@ -0,0 +1,36 @@ +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp.uic_multilib qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp +--- qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp.uic_multilib 2010-05-03 19:43:25.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp 2010-06-25 14:11:21.815474310 -0500 +@@ -152,7 +152,7 @@ void Ui3Reader::embed(const char *projec + for ( it = images.begin(); it != images.end(); ++it ) + out << "** " << *it << "\n"; + out << "**\n"; +- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n"; ++ out << "** Created: " << "\n"; + out << "** by: The User Interface Compiler for Qt version " << QT_VERSION_STR << "\n"; + out << "**\n"; + out << "** WARNING! All changes made in this file will be lost!\n"; +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp.uic_multilib qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp +--- qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp.uic_multilib 2010-05-03 19:43:25.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp 2010-06-25 14:11:32.910460623 -0500 +@@ -146,7 +146,7 @@ void Uic::writeCopyrightHeader(DomUI *ui + out << "/********************************************************************************\n"; + out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n"; + out << "**\n"; +- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n"; ++ out << "** Created: " << "\n"; + out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR)); + out << "**\n"; + out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n"; +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp.uic_multilib qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp +--- qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp.uic_multilib 2010-05-03 19:43:25.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp 2010-06-25 14:10:45.360711498 -0500 +@@ -139,7 +139,7 @@ void Uic::writeCopyrightHeader(DomUI *ui + out << "/********************************************************************************\n"; + out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n"; + out << "**\n"; +- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n"; ++ out << "** Created: " << "\n"; + out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR)); + out << "**\n"; + out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n"; diff --git a/qt.spec b/qt.spec index e39546f..45b148c 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.3 -Release: 4%{?dist} +Release: 7%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -34,6 +34,7 @@ Source5: qconfig-multilib.h # multilib hacks Patch2: qt-x11-opensource-src-4.2.2-multilib-optflags.patch Patch3: qt-x11-opensource-src-4.2.2-multilib-QMAKEPATH.patch +Patch4: qt-everywhere-opensource-src-4.7.0-beta1-uic_multilib.patch Patch5: qt-all-opensource-src-4.4.0-rc1-as_IN-437440.patch # hack around gcc/ppc crasher, http://bugzilla.redhat.com/492185 Patch13: qt-x11-opensource-src-4.5.0-gcc_hack.patch @@ -47,6 +48,9 @@ Patch21: qt-everywhere-opensource-src-4.6.0-gst-pulsaudio.patch # use system ca-bundle certs, http://bugzilla.redhat.com/521911 Patch22: qt-x11-opensource-src-4.5.3-system_ca_certificates.patch Requires: ca-certificates +# may be upstreamable, not sure yet +# workaround for gdal/grass crashers wrt glib_eventloop null deref's +Patch23: qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch ## upstreamable bits # http://bugzilla.redhat.com/485677 @@ -423,6 +427,8 @@ Qt libraries used for drawing widgets and OpenGL items. %if "%{_qt4_datadir}" != "%{_qt4_prefix}" %patch3 -p1 -b .multilib-QMAKEPATH %endif +%patch4 -p1 -b .uic_multilib + %patch5 -p1 -b .bz#437440-as_IN-437440 %patch13 -p1 -b .gcc_hack %patch15 -p1 -b .enable_ft_lcdfilter @@ -431,6 +437,7 @@ Qt libraries used for drawing widgets and OpenGL items. %patch19 -p1 -b .servicesfile %patch21 -p1 -b .gst-pulsaudio %patch22 -p1 -b .system_ca_certificates +%patch23 -p1 -b .glib_eventloop_nullcheck %patch51 -p1 -b .qdoc3 ## TODO: still worth carrying? if so, upstream it. %patch53 -p1 -b .qatomic-inline-asm @@ -1062,6 +1069,12 @@ fi %changelog +* Tue Jun 29 2010 Rex Dieter 4.6.3-5 +- avoid timestamps in uic-generated files to be multilib-friendly + * Fri Jun 18 2010 Rex Dieter - 4.6.3-4 - QtWebKit does not search correct plugin path(s) (#568860) - QtWebKit browsers crash with flash-plugin (rh#605677,webkit#40567) From c2b1db7067db2175d04afe34925f0f77591804fb Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 1 Jul 2010 14:07:35 +0000 Subject: [PATCH 39/41] - use find_lang to package the qm files (#609749) - put the qm files into the correct subpackages - remove qvfb translations, we don't ship qvfb --- qt.spec | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/qt.spec b/qt.spec index 45b148c..bb0e7f0 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.3 -Release: 7%{?dist} +Release: 8%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -790,6 +790,21 @@ rm -fv %{buildroot}%{_qt4_plugindir}/phonon_backend/*_gstreamer.so rm -fv %{buildroot}%{_datadir}/kde4/services/phononbackends/gstreamer.desktop %endif +# remove qvfb translations, we don't ship qvfb +rm -fv %{buildroot}%{_qt4_translationdir}/qvfb_*.qm + +%find_lang qt --with-qt --without-mo + +%find_lang assistant --with-qt --without-mo +%find_lang assistant_adp --with-qt --without-mo +%find_lang qt_help --with-qt --without-mo +%find_lang qtconfig --with-qt --without-mo +cat assistant.lang assistant_adp.lang qt_help.lang qtconfig.lang >qt-x11.lang + +%find_lang designer --with-qt --without-mo +%find_lang linguist --with-qt --without-mo +cat designer.lang linguist.lang >qt-devel.lang + %clean rm -rf %{buildroot} @@ -846,7 +861,7 @@ fi %{_datadir}/icons/hicolor/*/apps/phonon-gstreamer.* %endif -%files +%files -f qt.lang %defattr(-,root,root,-) %doc README LGPL_EXCEPTION.txt LICENSE.LGPL LICENSE.GPL3 %if "%{_qt4_libdir}" != "%{_libdir}" @@ -890,7 +905,7 @@ fi %dir %{_qt4_plugindir} %dir %{_qt4_plugindir}/sqldrivers/ %dir %{_qt4_plugindir}/crypto/ -%{_qt4_translationdir}/ +%dir %{_qt4_translationdir}/ %if 0%{?demos} %files demos @@ -903,7 +918,7 @@ fi %{_qt4_demosdir}/ %endif -%files devel +%files devel -f qt-devel.lang %defattr(-,root,root,-) %{_qt4_bindir}/lconvert %{_qt4_bindir}/lrelease* @@ -1029,7 +1044,7 @@ fi %{_qt4_plugindir}/sqldrivers/libqsqltds* %endif -%files x11 +%files x11 -f qt-x11.lang %defattr(-,root,root,-) %{_sysconfdir}/rpm/macros.* %if 0%{?phonon_internal} @@ -1069,10 +1084,15 @@ fi %changelog -* Tue Jun 29 2010 Rex Dieter - 4.6.3-8 +- use find_lang to package the qm files (#609749) +- put the qm files into the correct subpackages +- remove qvfb translations, we don't ship qvfb + +* Tue Jun 29 2010 Rex Dieter - 4.6.3-7 - workaround glib_eventloop crasher induced by gdal/grass (bug #498111) -* Fri Jun 20 2010 Rex Dieter 4.6.3-5 +* Fri Jun 20 2010 Rex Dieter - 4.6.3-5 - avoid timestamps in uic-generated files to be multilib-friendly * Fri Jun 18 2010 Rex Dieter - 4.6.3-4 From 1a20a3e14b2537dad7fc38bcab36391377331f98 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 11:06:39 +0000 Subject: [PATCH 40/41] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index dcbdd58..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: qt -# $Id$ -NAME := qt -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 06de2d2..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-12 From c488e08456e4ef5b3c23fac3f5ed4d39a85a1450 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 30 Sep 2010 10:05:41 -0500 Subject: [PATCH 41/41] - Wrong Cursor when widget become native on X11 (QTBUG-6185) --- ...here-opensource-src-4.7.0-QTBUG-6185.patch | 34 +++++++++++++++++++ qt.spec | 9 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch diff --git a/qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch b/qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch new file mode 100644 index 0000000..0b99d08 --- /dev/null +++ b/qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch @@ -0,0 +1,34 @@ +From 9e9a7bc29319d52c3e563bc2c5282cb7e6890eba Mon Sep 17 00:00:00 2001 +From: Denis Dzyubenko +Date: Wed, 29 Sep 2010 14:02:10 +0200 +Subject: [PATCH] Fixes cursor shape when widget becomes native on X11. + +When a native window handle is created for a widget that has override +cursor set, we should reset the cursor on the parent and set the cursor +on the new window handle. + +Task-number: QTBUG-6185 +Reviewed-by: Olivier Goffart +--- + src/gui/kernel/qwidget_x11.cpp | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp +index e01489f..8d80e10 100644 +--- a/src/gui/kernel/qwidget_x11.cpp ++++ b/src/gui/kernel/qwidget_x11.cpp +@@ -889,8 +889,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + q->setWindowOpacity(maybeTopData()->opacity/255.); + + } +- } else if (q->testAttribute(Qt::WA_SetCursor) && q->internalWinId()) { ++ } else if (q->internalWinId()) { + qt_x11_enforce_cursor(q); ++ if (QWidget *p = q->parentWidget()) // reset the cursor on the native parent ++ qt_x11_enforce_cursor(p); + } + + if (extra && !extra->mask.isEmpty() && q->internalWinId()) +-- +1.6.1 + diff --git a/qt.spec b/qt.spec index bb0e7f0..09e3ce2 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.6.3 -Release: 8%{?dist} +Release: 9%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -72,6 +72,9 @@ Patch58: qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch # upstream or security patches # https://bugs.webkit.org/show_bug.cgi?id=40567 Patch100: qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_gtk_init.patch +# http://bugreports.qt.nokia.com/browse/QTBUG-6185 +# http://qt.gitorious.org/qt/staging/commit/9e9a7bc29319d52c3e563bc2c5282cb7e6890eba +Patch101: qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch Patch104: qt-everywhere-opensource-src-4.6.2-cve-2010-0051-lax-css-parsing-cross-domain-theft.patch Patch106: qt-everywhere-opensource-src-4.6.2-cve-2010-0656.patch Patch108: qt-everywhere-opensource-src-4.6.2-cve-2010-0648.patch @@ -450,6 +453,7 @@ Qt libraries used for drawing widgets and OpenGL items. # upstream patches %patch100 -p1 -b .qtwebkit_gtk_init +%patch101 -p1 -b .QTBUG-6185 # security fixes %patch104 -p1 -b .cve-2010-0051-lax-css-parsing-cross-domain-theft @@ -1084,6 +1088,9 @@ fi %changelog +* Thu Sep 30 2010 Rex Dieter - 4.6.3-9 +- Wrong Cursor when widget become native on X11 (QTBUG-6185) + * Tue Jul 01 2010 Kevin Kofler - 4.6.3-8 - use find_lang to package the qm files (#609749) - put the qm files into the correct subpackages