aboutsummaryrefslogtreecommitdiffstats
path: root/x11/kdelibs4
diff options
context:
space:
mode:
authormakc <makc@FreeBSD.org>2011-05-17 03:26:43 +0800
committermakc <makc@FreeBSD.org>2011-05-17 03:26:43 +0800
commitca56cd62ce52f8db9d2abf8fbf9a1928778bd691 (patch)
tree7e4afaa85fb220b0934fc278fee6f97fd509f930 /x11/kdelibs4
parent7e55452f2607b2b4546aaf3375bc0586130e8122 (diff)
downloadfreebsd-ports-gnome-ca56cd62ce52f8db9d2abf8fbf9a1928778bd691.tar.gz
freebsd-ports-gnome-ca56cd62ce52f8db9d2abf8fbf9a1928778bd691.tar.zst
freebsd-ports-gnome-ca56cd62ce52f8db9d2abf8fbf9a1928778bd691.zip
Update KDE Software Compilation ports to 4.6.3
Special thanks to Raphael Kubo da Costa for his work on this update.
Diffstat (limited to 'x11/kdelibs4')
-rw-r--r--x11/kdelibs4/distinfo4
-rw-r--r--x11/kdelibs4/files/patch-kdeui-icons-kiconengine.cpp99
-rw-r--r--x11/kdelibs4/files/patch-kdeui-icons-kiconengine_p.h33
3 files changed, 134 insertions, 2 deletions
diff --git a/x11/kdelibs4/distinfo b/x11/kdelibs4/distinfo
index 7057739151be..24dbde019e76 100644
--- a/x11/kdelibs4/distinfo
+++ b/x11/kdelibs4/distinfo
@@ -1,2 +1,2 @@
-SHA256 (KDE/kdelibs-4.6.2.tar.bz2) = 61d8d73d56f2e0198e590d1c6f5615dea9aa955fa69676265852744a1133b561
-SIZE (KDE/kdelibs-4.6.2.tar.bz2) = 12917847
+SHA256 (KDE/kdelibs-4.6.3.tar.bz2) = b6ea04dc9014ff3fca0242fd927faeb67dc53288779aeb873d46104aa6109e38
+SIZE (KDE/kdelibs-4.6.3.tar.bz2) = 12916816
diff --git a/x11/kdelibs4/files/patch-kdeui-icons-kiconengine.cpp b/x11/kdelibs4/files/patch-kdeui-icons-kiconengine.cpp
new file mode 100644
index 000000000000..210bd5d367e5
--- /dev/null
+++ b/x11/kdelibs4/files/patch-kdeui-icons-kiconengine.cpp
@@ -0,0 +1,99 @@
+commit e7951201a19a4439b6ad95440c6de9b6b3620e45
+Author: Aaron Seigo <aseigo@kde.org>
+Date: Fri May 6 15:19:09 2011 +0200
+
+ use a QWeakPointer on the KIconLoader passed in as there are no lifetime guarantees
+
+ usually KGlobal::iconLoader() is used, so this isn't an issue seen very often.
+ however, when a local KIconLoader is created, it is easy to get QIcons with a
+ KIconEngine that has a bad KIconLoader pointer in them. particularly as QIcon
+ is implicitly shared and easily passed around. the StatusNotifier Plasma DataEngine
+ was triggering this, though it would be trivial to run into this problem again
+ anytime a KIconLoader is created locally
+
+ thankfully, QWeakPointer does the job and is very fast and light. (confirmed
+ both with my own testing and confirmation from Thiago).
+
+ massive thanks to Michael Pyne for detecting the cause of the problem via Valgrind.
+
+ BUG:258706
+
+--- kdeui/icons/kiconengine.cpp
++++ kdeui/icons/kiconengine.cpp
+@@ -27,16 +27,16 @@
+
+
+ KIconEngine::KIconEngine(const QString& iconName, KIconLoader* iconLoader, const QStringList& overlays)
++ : mIconName(iconName),
++ mIconLoader(iconLoader),
++ mOverlays(overlays)
+ {
+- mIconName = iconName;
+- mIconLoader = iconLoader;
+- mOverlays = overlays;
+ }
+
+ KIconEngine::KIconEngine(const QString& iconName, KIconLoader* iconLoader)
++ : mIconName(iconName),
++ mIconLoader(iconLoader)
+ {
+- mIconName = iconName;
+- mIconLoader = iconLoader;
+ }
+
+ static inline int qIconModeToKIconState( QIcon::Mode mode )
+@@ -65,8 +65,12 @@ QSize KIconEngine::actualSize( const QSize & size, QIcon::Mode mode, QIcon::Stat
+ return QSize(iconSize, iconSize);
+ }
+
+-void KIconEngine::paint( QPainter * painter, const QRect & rect, QIcon::Mode mode, QIcon::State state )
++void KIconEngine::paint(QPainter * painter, const QRect & rect, QIcon::Mode mode, QIcon::State state)
+ {
++ if (!mIconLoader) {
++ return;
++ }
++
+ Q_UNUSED(state)
+
+ const int kstate = qIconModeToKIconState(mode);
+@@ -80,20 +84,27 @@ void KIconEngine::paint( QPainter * painter, const QRect & rect, QIcon::Mode mod
+ }
+
+ const int iconSize = qMin(rect.width(), rect.height());
+- const QPixmap pix = mIconLoader->loadIcon(mIconName, group, iconSize, kstate, mOverlays);
++ const QPixmap pix = mIconLoader.data()->loadIcon(mIconName, group, iconSize, kstate, mOverlays);
+ painter->drawPixmap(rect, pix);
+ }
+
+-QPixmap KIconEngine::pixmap( const QSize & size, QIcon::Mode mode, QIcon::State state )
++QPixmap KIconEngine::pixmap(const QSize & size, QIcon::Mode mode, QIcon::State state)
+ {
+ Q_UNUSED(state)
+
++ if (!mIconLoader) {
++ QPixmap pm(size);
++ pm.fill(Qt::transparent);
++ return pm;
++ }
++
+ const int kstate = qIconModeToKIconState(mode);
+ const int iconSize = qMin(size.width(), size.height());
+- QPixmap pix = mIconLoader->loadIcon(mIconName, KIconLoader::Desktop, iconSize, kstate, mOverlays);
++ QPixmap pix = mIconLoader.data()->loadIcon(mIconName, KIconLoader::Desktop, iconSize, kstate, mOverlays);
+
+- if(pix.size() == size)
++ if (pix.size() == size) {
+ return pix;
++ }
+
+ QPixmap pix2(size);
+ pix2.fill(QColor(0,0,0,0));
+@@ -111,7 +122,7 @@ QString KIconEngine::key() const
+
+ QIconEngineV2 *KIconEngine::clone() const
+ {
+- return new KIconEngine(mIconName, mIconLoader, mOverlays);
++ return new KIconEngine(mIconName, mIconLoader.data(), mOverlays);
+ }
+
+ bool KIconEngine::read(QDataStream &in)
diff --git a/x11/kdelibs4/files/patch-kdeui-icons-kiconengine_p.h b/x11/kdelibs4/files/patch-kdeui-icons-kiconengine_p.h
new file mode 100644
index 000000000000..8fd0d0d95943
--- /dev/null
+++ b/x11/kdelibs4/files/patch-kdeui-icons-kiconengine_p.h
@@ -0,0 +1,33 @@
+commit e7951201a19a4439b6ad95440c6de9b6b3620e45
+Author: Aaron Seigo <aseigo@kde.org>
+Date: Fri May 6 15:19:09 2011 +0200
+
+ use a QWeakPointer on the KIconLoader passed in as there are no lifetime guarantees
+
+ usually KGlobal::iconLoader() is used, so this isn't an issue seen very often.
+ however, when a local KIconLoader is created, it is easy to get QIcons with a
+ KIconEngine that has a bad KIconLoader pointer in them. particularly as QIcon
+ is implicitly shared and easily passed around. the StatusNotifier Plasma DataEngine
+ was triggering this, though it would be trivial to run into this problem again
+ anytime a KIconLoader is created locally
+
+ thankfully, QWeakPointer does the job and is very fast and light. (confirmed
+ both with my own testing and confirmation from Thiago).
+
+ massive thanks to Michael Pyne for detecting the cause of the problem via Valgrind.
+
+ BUG:258706
+
+diff --git a/kdeui/icons/kiconengine_p.h b/kdeui/icons/kiconengine_p.h
+index 8095d2a..9fba63c 100644
+--- kdeui/icons/kiconengine_p.h
++++ kdeui/icons/kiconengine_p.h
+@@ -75,7 +75,7 @@ class KIconEngine : public QIconEngineV2
+ private:
+ QString mIconName;
+ QStringList mOverlays;
+- KIconLoader* mIconLoader;
++ QWeakPointer<KIconLoader> mIconLoader;
+ };
+
+ inline KIconEngine::~KIconEngine()