From 30fab2d5a0f2efb38325e8ee657f4da9c1f0d6da Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 11 Mar 2011 02:41:26 +0100 Subject: [PATCH 1/3] * Fri Mar 11 2011 Kevin Kofler - 4.6.1-3 - set the plugin path in KApplication, don't rely on QT_PLUGIN_PATH being set, fixes kpackagekitsmarticon not getting themed (#682300, kde#267770) --- kdelibs-4.6.1-kde#267770.patch | 27 +++++++++++++++++++++++++++ kdelibs.spec | 10 +++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 kdelibs-4.6.1-kde#267770.patch diff --git a/kdelibs-4.6.1-kde#267770.patch b/kdelibs-4.6.1-kde#267770.patch new file mode 100644 index 0000000..8463c27 --- /dev/null +++ b/kdelibs-4.6.1-kde#267770.patch @@ -0,0 +1,27 @@ +diff -ur kdelibs-4.6.1/kdeui/kernel/kapplication.cpp kdelibs-4.6.1-kde#267770/kdeui/kernel/kapplication.cpp +--- kdelibs-4.6.1/kdeui/kernel/kapplication.cpp 2011-02-25 23:00:34.000000000 +0100 ++++ kdelibs-4.6.1-kde#267770/kdeui/kernel/kapplication.cpp 2011-03-11 02:34:26.000000000 +0100 +@@ -466,6 +466,23 @@ + + KApplication::KApp = q; + ++ // ensure the KDE Qt plugins are found ++ // (QT_PLUGIN_PATH is not set in all situations.) ++ QStringList pluginPaths = KGlobal::dirs()->resourceDirs("qtplugins"); ++ ++ // reverse plugin paths because QCoreApplication::addLibraryPath prepends ++ QStringList pluginPathsReversed: ++ foreach (const QString &pluginPath, pluginPaths) ++ pluginPathsReversed.prepend(pluginPath); ++ ++ foreach (const QString &pluginPath, pluginPathsReversed) { ++ // prevent duplicates ++ QCoreApplication::removeLibraryPath(pluginPath); ++ ++ // add the path (to the front) ++ QCoreApplication::addLibraryPath(pluginPath); ++ } ++ + // make sure the clipboard is created before setting the window icon (bug 209263) + if(GUIenabled) + (void) QApplication::clipboard(); diff --git a/kdelibs.spec b/kdelibs.spec index f6e18ef..aca0684 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -16,7 +16,7 @@ Summary: KDE Libraries Version: 4.6.1 -Release: 2%{?dist} +Release: 3%{?dist} Name: kdelibs Epoch: 6 @@ -83,6 +83,9 @@ Patch24: kdelibs-4.3.1-drkonq.patch # paths (like /usr/lib64) already! With this, we can drop # -DCMAKE_SKIP_RPATH:BOOL=ON (finally) Patch27: kdelibs-4.5.80-no_rpath.patch +# set the plugin path in KApplication, don't rely on QT_PLUGIN_PATH being set +# fixes kpackagekitsmarticon not getting themed (#682300, kde#267770) +Patch28: kdelibs-4.6.1-kde#267770.patch ## upstreamable # add gpg2 support to knewstuff, rough first try s/gpg/gpg2/ @@ -272,6 +275,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage %patch24 -p1 -b .drkonq %endif %patch27 -p1 -b .no_rpath +%patch28 -p1 -b .kde#267770 # upstreamable patches %patch50 -p1 -b .knewstuff_gpg2 @@ -533,6 +537,10 @@ rm -rf %{buildroot} %changelog +* Fri Mar 11 2011 Kevin Kofler - 4.6.1-3 +- set the plugin path in KApplication, don't rely on QT_PLUGIN_PATH being set, + fixes kpackagekitsmarticon not getting themed (#682300, kde#267770) + * Tue Mar 08 2011 Rex Dieter 4.6.1-2 - Dolphin shows no files... (kde#267709) From 314b6a4ab6554ac1cddb04ee1cb42e1e8dbdab06 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 11 Mar 2011 03:05:47 +0100 Subject: [PATCH 2/3] Fix typo in the kde#267770 patch. --- kdelibs-4.6.1-kde#267770.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kdelibs-4.6.1-kde#267770.patch b/kdelibs-4.6.1-kde#267770.patch index 8463c27..ecfc3d9 100644 --- a/kdelibs-4.6.1-kde#267770.patch +++ b/kdelibs-4.6.1-kde#267770.patch @@ -1,6 +1,6 @@ diff -ur kdelibs-4.6.1/kdeui/kernel/kapplication.cpp kdelibs-4.6.1-kde#267770/kdeui/kernel/kapplication.cpp --- kdelibs-4.6.1/kdeui/kernel/kapplication.cpp 2011-02-25 23:00:34.000000000 +0100 -+++ kdelibs-4.6.1-kde#267770/kdeui/kernel/kapplication.cpp 2011-03-11 02:34:26.000000000 +0100 ++++ kdelibs-4.6.1-kde#267770/kdeui/kernel/kapplication.cpp 2011-03-11 03:05:11.000000000 +0100 @@ -466,6 +466,23 @@ KApplication::KApp = q; @@ -10,7 +10,7 @@ diff -ur kdelibs-4.6.1/kdeui/kernel/kapplication.cpp kdelibs-4.6.1-kde#267770/kd + QStringList pluginPaths = KGlobal::dirs()->resourceDirs("qtplugins"); + + // reverse plugin paths because QCoreApplication::addLibraryPath prepends -+ QStringList pluginPathsReversed: ++ QStringList pluginPathsReversed; + foreach (const QString &pluginPath, pluginPaths) + pluginPathsReversed.prepend(pluginPath); + From 91b310e66714a66ab731e9c5bc336368a1910810 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 11 Mar 2011 21:21:46 +0100 Subject: [PATCH 3/3] * Fri Mar 11 2011 Kevin Kofler - 4.6.1-4 - use upstream patch for #682300 (kde#267770), my previous one didn't work --- kdelibs-4.6.1-kde#267770.patch | 68 +++++++++++++++++++++------------- kdelibs.spec | 13 ++++--- 2 files changed, 50 insertions(+), 31 deletions(-) diff --git a/kdelibs-4.6.1-kde#267770.patch b/kdelibs-4.6.1-kde#267770.patch index ecfc3d9..d7bbc05 100644 --- a/kdelibs-4.6.1-kde#267770.patch +++ b/kdelibs-4.6.1-kde#267770.patch @@ -1,27 +1,43 @@ -diff -ur kdelibs-4.6.1/kdeui/kernel/kapplication.cpp kdelibs-4.6.1-kde#267770/kdeui/kernel/kapplication.cpp ---- kdelibs-4.6.1/kdeui/kernel/kapplication.cpp 2011-02-25 23:00:34.000000000 +0100 -+++ kdelibs-4.6.1-kde#267770/kdeui/kernel/kapplication.cpp 2011-03-11 03:05:11.000000000 +0100 -@@ -466,6 +466,23 @@ +From 6eed9cd36808e77a18acf554bb5753978906c1aa Mon Sep 17 00:00:00 2001 +From: David Faure +Date: Fri, 11 Mar 2011 21:01:24 +0100 +Subject: [PATCH] Add paths to qt plugins (from kstandarddirs) before qapp is created. + +Necessary for apps started through d-bus activation, so that the kde widget +style is loaded. +FIXED-IN: 4.6.2 +BUG: 267770 +--- + kdecore/kernel/kcomponentdata.cpp | 2 +- + kdeui/kernel/kapplication.cpp | 2 ++ + 2 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/kdecore/kernel/kcomponentdata.cpp b/kdecore/kernel/kcomponentdata.cpp +index 38bda18..933623a 100644 +--- a/kdecore/kernel/kcomponentdata.cpp ++++ b/kdecore/kernel/kcomponentdata.cpp +@@ -144,7 +144,7 @@ void KComponentDataPrivate::lazyInit(const KComponentData &component) + } + + // the first KComponentData sets the KDE Qt plugin paths +- if (QCoreApplication::instance() && dirs && kdeLibraryPathsAdded != KdeLibraryPathsAddedDone) { ++ if (dirs && kdeLibraryPathsAdded != KdeLibraryPathsAddedDone) { + kdeLibraryPathsAdded = KdeLibraryPathsAddedDone; + const QStringList &plugins = dirs->resourceDirs("qtplugins"); + QStringList::ConstIterator it = plugins.begin(); +diff --git a/kdeui/kernel/kapplication.cpp b/kdeui/kernel/kapplication.cpp +index 1403601..8ec47ca 100644 +--- a/kdeui/kernel/kapplication.cpp ++++ b/kdeui/kernel/kapplication.cpp +@@ -407,6 +407,8 @@ KApplication::KApplication(Display *display, int& argc, char** argv, const QByte + void KApplicationPrivate::preqapplicationhack() + { + preread_app_startup_id(); ++ ++ KGlobal::config(); // initialize qt plugin path (see KComponentDataPrivate::lazyInit) + } - KApplication::KApp = q; - -+ // ensure the KDE Qt plugins are found -+ // (QT_PLUGIN_PATH is not set in all situations.) -+ QStringList pluginPaths = KGlobal::dirs()->resourceDirs("qtplugins"); -+ -+ // reverse plugin paths because QCoreApplication::addLibraryPath prepends -+ QStringList pluginPathsReversed; -+ foreach (const QString &pluginPath, pluginPaths) -+ pluginPathsReversed.prepend(pluginPath); -+ -+ foreach (const QString &pluginPath, pluginPathsReversed) { -+ // prevent duplicates -+ QCoreApplication::removeLibraryPath(pluginPath); -+ -+ // add the path (to the front) -+ QCoreApplication::addLibraryPath(pluginPath); -+ } -+ - // make sure the clipboard is created before setting the window icon (bug 209263) - if(GUIenabled) - (void) QApplication::clipboard(); + int KApplication::xioErrhandler( Display* dpy ) +-- +1.7.1 + diff --git a/kdelibs.spec b/kdelibs.spec index aca0684..d27ba27 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -16,7 +16,7 @@ Summary: KDE Libraries Version: 4.6.1 -Release: 3%{?dist} +Release: 4%{?dist} Name: kdelibs Epoch: 6 @@ -83,9 +83,6 @@ Patch24: kdelibs-4.3.1-drkonq.patch # paths (like /usr/lib64) already! With this, we can drop # -DCMAKE_SKIP_RPATH:BOOL=ON (finally) Patch27: kdelibs-4.5.80-no_rpath.patch -# set the plugin path in KApplication, don't rely on QT_PLUGIN_PATH being set -# fixes kpackagekitsmarticon not getting themed (#682300, kde#267770) -Patch28: kdelibs-4.6.1-kde#267770.patch ## upstreamable # add gpg2 support to knewstuff, rough first try s/gpg/gpg2/ @@ -96,6 +93,9 @@ Patch50: kdelibs-4.5.1-knewstuff_gpg2.patch ## upstream # https://projects.kde.org/projects/kde/kdelibs/repository/revisions/51707e7154082b549216b8a8ecde73505302fadc Patch100: kdelibs-4.6.1-dirlister.patch +# set the plugin path in kdelibs, don't rely on QT_PLUGIN_PATH being set +# fixes kpackagekitsmarticon not getting themed (#682300, kde#267770) +Patch101: kdelibs-4.6.1-kde#267770.patch ## security fix # Not Upstreamed? why not ? -- Rex @@ -275,13 +275,13 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage %patch24 -p1 -b .drkonq %endif %patch27 -p1 -b .no_rpath -%patch28 -p1 -b .kde#267770 # upstreamable patches %patch50 -p1 -b .knewstuff_gpg2 # upstream patches %patch100 -p1 -b .dirlister +%patch101 -p1 -b .kde#267770 # security fix %patch200 -p1 -b .CVE-2009-2702 @@ -537,6 +537,9 @@ rm -rf %{buildroot} %changelog +* Fri Mar 11 2011 Kevin Kofler - 4.6.1-4 +- use upstream patch for #682300 (kde#267770), my previous one didn't work + * Fri Mar 11 2011 Kevin Kofler - 4.6.1-3 - set the plugin path in KApplication, don't rely on QT_PLUGIN_PATH being set, fixes kpackagekitsmarticon not getting themed (#682300, kde#267770)