summaryrefslogtreecommitdiffstats
path: root/kde/patch
diff options
context:
space:
mode:
Diffstat (limited to 'kde/patch')
-rw-r--r--kde/patch/ark.patch4
-rw-r--r--kde/patch/ark/ark-4.8.0_7zip_crash.patch24
-rw-r--r--kde/patch/calligra.patch7
-rw-r--r--kde/patch/calligra/calligra-2.3.87_gcc47.patch13
-rw-r--r--kde/patch/calligra/calligra.git.6e4d171dfa5bad07e06277ef8e36d8a6a00005db.diff.gzbin0 -> 806 bytes
-rw-r--r--kde/patch/kde-baseapps.patch12
-rw-r--r--kde/patch/kde-baseapps/dolphin-4.8.0_ctrlclick.patch25
-rw-r--r--kde/patch/kde-baseapps/dolphin.kitemlistkeyboardsearchmanager.cpp.diff31
-rw-r--r--kde/patch/kde-baseapps/konsole-4.8.2_kdebug280896.patch62
-rw-r--r--kde/patch/kde-workspace.patch7
-rw-r--r--kde/patch/kde-workspace/kde-workspace.batteryapplet.diff.gzbin0 -> 494 bytes
-rw-r--r--kde/patch/kde-workspace/kde-workspace.kdm.server.timeout.diff.gz (renamed from kde/patch/kde-workspace/kdebase-workspace.kdm.server.timeout.diff.gz)bin247 -> 247 bytes
-rw-r--r--kde/patch/kde-workspace/kde-workspace.kwin.effects.performance.diff.gz (renamed from kde/patch/kde-workspace/kdebase-workspace.kwin.effects.performance.diff.gz)bin1019 -> 1019 bytes
-rw-r--r--kde/patch/kdeedu.patch4
-rw-r--r--kde/patch/kdeedu/marble130_qt480_colorfix.diff65
-rw-r--r--kde/patch/kdeedu/marble130_qt480_qcolor.diff22
-rw-r--r--kde/patch/kdelibs.patch10
-rw-r--r--kde/patch/kdelibs/kdelibs.fstab.patch47
-rw-r--r--kde/patch/kdelibs/kdelibs.klocale.numberfix.patch130
-rw-r--r--kde/patch/kdelibs/kdelibs.upnp_conditional.patch15
-rw-r--r--kde/patch/kdepim.patch5
-rw-r--r--kde/patch/kdepim/kdepim-4.8.1_bug_258551.patch58
-rw-r--r--kde/patch/kdesdk.patch4
-rw-r--r--kde/patch/kdesdk/kdesdk-4.8.2_scriptperms.diff14
-rw-r--r--kde/patch/kgpg.patch4
-rw-r--r--kde/patch/kgpg/kgpg-4.8.0.noconfigfile.patch27
-rw-r--r--kde/patch/korundum.patch4
-rw-r--r--kde/patch/korundum/korundum_ruby19.patch31
-rw-r--r--kde/patch/ktorrent.patch4
-rw-r--r--kde/patch/ktorrent/ktorrent.taskmanager.diff174
30 files changed, 669 insertions, 134 deletions
diff --git a/kde/patch/ark.patch b/kde/patch/ark.patch
new file mode 100644
index 0000000..1397f30
--- /dev/null
+++ b/kde/patch/ark.patch
@@ -0,0 +1,4 @@
+# Fix crash whenever a 7zip archive is opened.
+# Only for KDE 4.8.0 pre-built:
+#cat $CWD/patch/ark/ark-4.8.0_7zip_crash.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/ark/ark-4.8.0_7zip_crash.patch b/kde/patch/ark/ark-4.8.0_7zip_crash.patch
new file mode 100644
index 0000000..52939e8
--- /dev/null
+++ b/kde/patch/ark/ark-4.8.0_7zip_crash.patch
@@ -0,0 +1,24 @@
+From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
+Date: Sun, 22 Jan 2012 19:03:05 +0000
+Subject: cli7zip: Completely remove RootNodeSwitch.
+X-Git-Url: http://quickgit.kde.org/?p=ark.git&amp;a=commitdiff&amp;h=0e67d6db9e7a5a0f90fcacaee11042b89b79d96b
+---
+cli7zip: Completely remove RootNodeSwitch.
+
+Follow-up to 45c6c6f5bcff6bf754fccd6377836e025a6baade, which removed the
+definition of RootNodeSwitch but did not remove the reference in
+ExtractArgs, resulting in a crash whenever a 7z archive was extracted.
+---
+
+
+--- a/plugins/cli7zplugin/cliplugin.cpp
++++ b/plugins/cli7zplugin/cliplugin.cpp
+@@ -53,7 +53,7 @@ ParameterList CliPlugin::parameterList()
+ p[ListProgram] = p[ExtractProgram] = p[DeleteProgram] = p[AddProgram] = QLatin1String( "7z" );
+
+ p[ListArgs] = QStringList() << QLatin1String( "l" ) << QLatin1String( "-slt" ) << QLatin1String( "$Archive" );
+- p[ExtractArgs] = QStringList() << QLatin1String( "$PreservePathSwitch" ) << QLatin1String( "$PasswordSwitch" ) << QLatin1String( "$RootNodeSwitch" ) << QLatin1String( "$Archive" ) << QLatin1String( "$Files" );
++ p[ExtractArgs] = QStringList() << QLatin1String( "$PreservePathSwitch" ) << QLatin1String( "$PasswordSwitch" ) << QLatin1String( "$Archive" ) << QLatin1String( "$Files" );
+ p[PreservePathSwitch] = QStringList() << QLatin1String( "x" ) << QLatin1String( "e" );
+ p[PasswordSwitch] = QStringList() << QLatin1String( "-p$Password" );
+ p[FileExistsExpression] = QLatin1String( "already exists. Overwrite with" );
diff --git a/kde/patch/calligra.patch b/kde/patch/calligra.patch
new file mode 100644
index 0000000..973a8bf
--- /dev/null
+++ b/kde/patch/calligra.patch
@@ -0,0 +1,7 @@
+# Required patch for a successful compilation with gcc 4.7:
+# (still required for calligra-2.3.92)
+cat $CWD/patch/calligra/calligra-2.3.87_gcc47.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Patch for "corrupted document", side-effect of compiling calligra-2.4.0 with gcc-4.7.0:
+zcat $CWD/patch/calligra/calligra.git.6e4d171dfa5bad07e06277ef8e36d8a6a00005db.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/calligra/calligra-2.3.87_gcc47.patch b/kde/patch/calligra/calligra-2.3.87_gcc47.patch
new file mode 100644
index 0000000..51cba63
--- /dev/null
+++ b/kde/patch/calligra/calligra-2.3.87_gcc47.patch
@@ -0,0 +1,13 @@
+diff -up calligra-2.3.87/filters/words/hancomword/pole.cpp.gcc47 calligra-2.3.87/filters/words/hancomword/pole.cpp
+--- calligra-2.3.87/filters/words/hancomword/pole.cpp.gcc47 2012-01-28 01:04:47.000000000 -0600
++++ calligra-2.3.87/filters/words/hancomword/pole.cpp 2012-01-29 17:04:11.520633241 -0600
+@@ -866,7 +866,7 @@ void StorageIO::load()
+ unsigned char* buffer2 = new unsigned char[ bbat->blockSize ];
+ unsigned k = 109;
+ unsigned mblock = header->mbat_start;
+- for (unsigned r = 0; r < header->num_mbat; r++) {
++ for (unsigned rr = 0; rr < header->num_mbat; rr++) {
+ unsigned long r = loadBigBlock(mblock, buffer2, bbat->blockSize);
+ if (r != bbat->blockSize) {
+ delete[] buffer2;
+
diff --git a/kde/patch/calligra/calligra.git.6e4d171dfa5bad07e06277ef8e36d8a6a00005db.diff.gz b/kde/patch/calligra/calligra.git.6e4d171dfa5bad07e06277ef8e36d8a6a00005db.diff.gz
new file mode 100644
index 0000000..87a730e
--- /dev/null
+++ b/kde/patch/calligra/calligra.git.6e4d171dfa5bad07e06277ef8e36d8a6a00005db.diff.gz
Binary files differ
diff --git a/kde/patch/kde-baseapps.patch b/kde/patch/kde-baseapps.patch
new file mode 100644
index 0000000..a721076
--- /dev/null
+++ b/kde/patch/kde-baseapps.patch
@@ -0,0 +1,12 @@
+# Make sure that Control+click toggles the selection state (CCBUG: 292250)
+# Only for KDE 4.8.0:
+#cat $CWD/patch/kde-baseapps/dolphin-4.8.0_ctrlclick.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix for KDE bug 280896 (font display issue in konsole due to Qt 4.8):
+# Fixed just in time for the KDE 4.8.2 source release:
+#cat $CWD/patch/kde-baseapps/konsole-4.8.2_kdebug280896.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix for KDE bug 297458 and 297488
+# Reduce the timeout in KItemListKeyboardSearchManager to 1 second
+#cat $CWD/patch/kde-baseapps/dolphin.kitemlistkeyboardsearchmanager.cpp.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kde-baseapps/dolphin-4.8.0_ctrlclick.patch b/kde/patch/kde-baseapps/dolphin-4.8.0_ctrlclick.patch
new file mode 100644
index 0000000..fa928c9
--- /dev/null
+++ b/kde/patch/kde-baseapps/dolphin-4.8.0_ctrlclick.patch
@@ -0,0 +1,25 @@
+From: Frank Reininghaus <frank78ac@googlemail.com>
+Date: Mon, 23 Jan 2012 18:28:21 +0000
+Subject: Make sure that Control+click toggles the selection state
+X-Git-Url: http://quickgit.kde.org/?p=kde-baseapps.git&amp;a=commitdiff&amp;h=e8bfc8724b441b70e440cad05983134975facc8b
+---
+Make sure that Control+click toggles the selection state
+
+This commit fixes a regression caused by the recent commit
+9f711b5f2e1d1fd856cd6b033e6adb96f9b46d8a.
+CCBUG: 292250
+(cherry picked from commit 84a9cc4bf6e9decc4c102102c4b04162369eb0fe)
+---
+
+
+--- a/dolphin/src/kitemviews/kitemlistcontroller.cpp
++++ b/dolphin/src/kitemviews/kitemlistcontroller.cpp
+@@ -471,7 +471,7 @@ bool KItemListController::mousePressEven
+ (!shiftOrControlPressed && !pressedItemAlreadySelected);
+ if (clearSelection) {
+ m_selectionManager->clearSelection();
+- } else if (pressedItemAlreadySelected && (event->buttons() & Qt::LeftButton)) {
++ } else if (pressedItemAlreadySelected && !shiftOrControlPressed && (event->buttons() & Qt::LeftButton)) {
+ // The user might want to start dragging multiple items, but if he clicks the item
+ // in order to trigger it instead, the other selected items must be deselected.
+ // However, we do not know yet what the user is going to do.
diff --git a/kde/patch/kde-baseapps/dolphin.kitemlistkeyboardsearchmanager.cpp.diff b/kde/patch/kde-baseapps/dolphin.kitemlistkeyboardsearchmanager.cpp.diff
new file mode 100644
index 0000000..45c830a
--- /dev/null
+++ b/kde/patch/kde-baseapps/dolphin.kitemlistkeyboardsearchmanager.cpp.diff
@@ -0,0 +1,31 @@
+commit d8732a59d3b1f2d0bebf43f294df7e9f333abde4
+Author: Frank Reininghaus <frank78ac@googlemail.com>
+Date: Thu Apr 5 18:59:58 2012 +0200
+
+ Reduce the timeout in KItemListKeyboardSearchManager to 1 second
+
+ It turned out that the longer timeout, introduced recently in
+ 02eab49b2de51c31fe46a0d9501327b579b3648e, not only made multi-letter
+ keyboard searches easier, but also had some unwanted side effects. I
+ hope that 1 second, which is between the previous value of 5 seconds and
+ the pre-KDE 4.8.2 value of 0.4 seconds, is a compromise which will fit
+ most users' needs.
+ We will try to improve the situation further in future releases by
+ providing visual feedback about the keyboard search, but such a change
+ would not be suitable for a bug-fix release.
+ CCBUG:297458
+ CCBUG:297488
+
+diff --git a/dolphin/src/kitemviews/kitemlistkeyboardsearchmanager.cpp b/dolphin/src/kitemviews/kitemlistkeyboardsearchmanager.cpp
+index f4dc1a5..592605a 100644
+--- a/dolphin/src/kitemviews/kitemlistkeyboardsearchmanager.cpp
++++ b/dolphin/src/kitemviews/kitemlistkeyboardsearchmanager.cpp
+@@ -29,7 +29,7 @@
+
+ KItemListKeyboardSearchManager::KItemListKeyboardSearchManager(QObject* parent) :
+ QObject(parent),
+- m_timeout(5000)
++ m_timeout(1000)
+ {
+ m_keyboardInputTime.invalidate();
+ }
diff --git a/kde/patch/kde-baseapps/konsole-4.8.2_kdebug280896.patch b/kde/patch/kde-baseapps/konsole-4.8.2_kdebug280896.patch
new file mode 100644
index 0000000..352adb2
--- /dev/null
+++ b/kde/patch/kde-baseapps/konsole-4.8.2_kdebug280896.patch
@@ -0,0 +1,62 @@
+commit bf3e57e94b54c1c4337d7960e0fda0ef98156451
+Author: Kurt Hindenburg <kurt.hindenburg@gmail.com>
+Date: Fri Mar 30 20:55:46 2012 -0400
+
+ A quick fix to get fonts to look OK w/ Qt4.8 and bidi off
+
+ Hopefully a temp fix for this issue. It would be better to find out
+ what happened with Qt4.8 font rendering.
+
+ Thanks to people on bug report for research and info.
+
+ CCBUG: 280896
+
+diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
+index 1076131..ac44da9 100644
+--- a/src/TerminalDisplay.cpp
++++ b/src/TerminalDisplay.cpp
+@@ -720,10 +720,18 @@ void TerminalDisplay::drawCharacters(QPainter& painter,
+ // Qt::LeftToRight for this widget
+ //
+ // This was discussed in: http://lists.kde.org/?t=120552223600002&r=1&w=2
+- if (_bidiEnabled)
+- painter.drawText(rect,0,text);
++ if (_bidiEnabled) {
++ painter.drawText(rect, 0, text);
++ }
+ else
+- painter.drawText(rect,0,LTR_OVERRIDE_CHAR+text);
++ {
++ // See bug 280896 for more info
++#if QT_VERSION >= 0x040800
++ painter.drawText(rect, Qt::AlignBottom, LTR_OVERRIDE_CHAR + text);
++#else
++ painter.drawText(rect, 0, LTR_OVERRIDE_CHAR + text);
++#endif
++ }
+ }
+ }
+
+diff --git a/src/TerminalDisplay.h b/src/TerminalDisplay.h
+index 97b517e..c6f993e 100644
+--- a/src/TerminalDisplay.h
++++ b/src/TerminalDisplay.h
+@@ -398,7 +398,17 @@ public:
+ * Sets the status of the BiDi rendering inside the terminal display.
+ * Defaults to disabled.
+ */
+- void setBidiEnabled(bool set) { _bidiEnabled=set; }
++ void setBidiEnabled(bool set) {
++ _bidiEnabled=set;
++ // See bug 280896 for more info
++#if QT_VERSION >= 0x040800
++ if (_bidiEnabled) {
++ setLineSpacing(0);
++ } else {
++ setLineSpacing(2);
++ }
++#endif
++ }
+ /**
+ * Returns the status of the BiDi rendering in this widget.
+ */
diff --git a/kde/patch/kde-workspace.patch b/kde/patch/kde-workspace.patch
index 3168d72..e2b5f82 100644
--- a/kde/patch/kde-workspace.patch
+++ b/kde/patch/kde-workspace.patch
@@ -1,9 +1,12 @@
# Increase the timeout to accomodate slow-to-initialize video chipset drivers:
-zcat $CWD/patch/kde-workspace/kdebase-workspace.kdm.server.timeout.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/kde-workspace/kde-workspace.kdm.server.timeout.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
## Patch for the shutdown issue with KDE 4.6.2 (in Linux, only "halt"
## understands the '-p' parameter):
#sed -i -e 's/shutdown -p now/shutdown -h -P now/' kdm/config.def
# Fix a long-standing performance issue (since 4.0) in kwin (not needed for KDE >= 4.7.2):
-#zcat $CWD/patch/kde-workspace/kdebase-workspace.kwin.effects.performance.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+#zcat $CWD/patch/kde-workspace/kde-workspace.kwin.effects.performance.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Always show 'remaining time' in the popup of the battery plasmoid:
+zcat $CWD/patch/kde-workspace/kde-workspace.batteryapplet.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/kde/patch/kde-workspace/kde-workspace.batteryapplet.diff.gz b/kde/patch/kde-workspace/kde-workspace.batteryapplet.diff.gz
new file mode 100644
index 0000000..c6226ca
--- /dev/null
+++ b/kde/patch/kde-workspace/kde-workspace.batteryapplet.diff.gz
Binary files differ
diff --git a/kde/patch/kde-workspace/kdebase-workspace.kdm.server.timeout.diff.gz b/kde/patch/kde-workspace/kde-workspace.kdm.server.timeout.diff.gz
index a9c2bae..a9c2bae 100644
--- a/kde/patch/kde-workspace/kdebase-workspace.kdm.server.timeout.diff.gz
+++ b/kde/patch/kde-workspace/kde-workspace.kdm.server.timeout.diff.gz
Binary files differ
diff --git a/kde/patch/kde-workspace/kdebase-workspace.kwin.effects.performance.diff.gz b/kde/patch/kde-workspace/kde-workspace.kwin.effects.performance.diff.gz
index 7596c2e..7596c2e 100644
--- a/kde/patch/kde-workspace/kdebase-workspace.kwin.effects.performance.diff.gz
+++ b/kde/patch/kde-workspace/kde-workspace.kwin.effects.performance.diff.gz
Binary files differ
diff --git a/kde/patch/kdeedu.patch b/kde/patch/kdeedu.patch
new file mode 100644
index 0000000..0c542d8
--- /dev/null
+++ b/kde/patch/kdeedu.patch
@@ -0,0 +1,4 @@
+# Fix some severe bugs for Marble 1.3.0 in combination with Qt 4.8.0:
+#cat $CWD/patch/kdeedu/marble130_qt480_colorfix.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+#cat $CWD/patch/kdeedu/marble130_qt480_qcolor.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kdeedu/marble130_qt480_colorfix.diff b/kde/patch/kdeedu/marble130_qt480_colorfix.diff
new file mode 100644
index 0000000..5e88fc4
--- /dev/null
+++ b/kde/patch/kdeedu/marble130_qt480_colorfix.diff
@@ -0,0 +1,65 @@
+commit 79c39f45468bace95169d1ba959884ce27087d1e
+Author: Torsten Rahn <rahn@kde.org>
+Date: Wed Feb 8 17:18:15 2012 +0100
+
+ Fixes for Marble with Qt 4.8:
+
+ - Provide proper colors for Marble's Atlas, Temperature,
+ Precipitation and Venus/Mars Topography maps.
+ ( due to introduction of QImage::fill( QColor ) overload )
+
+ - Show proper icons for MarbleLegendBrowser
+ ( due to new interpretation of the "current directory" in
+ QTextBrowser )
+
+diff --git a/src/lib/MarbleLegendBrowser.cpp b/src/lib/MarbleLegendBrowser.cpp
+index 4a25095..ffa0a23 100644
+--- a/src/lib/MarbleLegendBrowser.cpp
++++ b/src/lib/MarbleLegendBrowser.cpp
+@@ -130,26 +130,24 @@ void MarbleLegendBrowser::loadLegend()
+ t.start();
+
+ // Read the html string.
+- QString finalHtml;
++ QString legendPath;
+
+ // Check for a theme specific legend.html first
+ if ( d->m_marbleModel != 0 && d->m_marbleModel->mapTheme() != 0 )
+ {
+ GeoSceneDocument *currentMapTheme = d->m_marbleModel->mapTheme();
+
+- QString customLegendPath = MarbleDirs::path( "maps/" +
++ legendPath = MarbleDirs::path( "maps/" +
+ currentMapTheme->head()->target() + '/' +
+ currentMapTheme->head()->theme() + "/legend.html" );
+- if ( !customLegendPath.isEmpty() )
+- finalHtml = readHtml( QUrl::fromLocalFile( customLegendPath ) );
+- else
+- finalHtml.clear();
+ }
+-
+- if ( finalHtml.isEmpty() ) {
+- finalHtml = readHtml( QUrl::fromLocalFile( MarbleDirs::path( "legend.html" ) ) );
++ if ( legendPath.isEmpty() ) {
++ legendPath = MarbleDirs::path( "legend.html" );
+ }
+
++ QString finalHtml = readHtml( QUrl::fromLocalFile( legendPath ) );
++ finalHtml.replace( QString( "./" ), legendPath.section( '/', 0, -2 ) + '/' );
++
+ // Generate some parts of the html from the MapTheme <Legend> tag.
+ const QString sectionsHtml = generateSectionsHtml();
+
+diff --git a/src/lib/TextureColorizer.cpp b/src/lib/TextureColorizer.cpp
+index 4a4f8f3..d0deead 100644
+--- a/src/lib/TextureColorizer.cpp
++++ b/src/lib/TextureColorizer.cpp
+@@ -176,7 +176,7 @@ void TextureColorizer::colorize( QImage *origimg, const ViewportParams *viewport
+ m_coastImage = QImage( viewport->size(), QImage::Format_RGB32 );
+
+ // update coast image
+- m_coastImage.fill( Qt::transparent );
++ m_coastImage.fill( QColor( 0, 0, 255, 0) );
+
+ bool doClip = false; //assume false
+ switch( viewport->projection() ) {
diff --git a/kde/patch/kdeedu/marble130_qt480_qcolor.diff b/kde/patch/kdeedu/marble130_qt480_qcolor.diff
new file mode 100644
index 0000000..9febade
--- /dev/null
+++ b/kde/patch/kdeedu/marble130_qt480_qcolor.diff
@@ -0,0 +1,22 @@
+commit b89ff577fcbd085fbd180f59aa669dded1818082
+Author: Bernhard Beschow <bbeschow@cs.tu-berlin.de>
+Date: Wed Feb 8 18:14:59 2012 +0100
+
+ compile with Qt < 4.8
+
+ * take into account the comment in the API doc, which suggests to use QColor::rgb()
+ (cherry picked from commit 6eafb31f509c622e2672c31b73ebcb1b3dafb3e9)
+
+diff --git a/src/lib/TextureColorizer.cpp b/src/lib/TextureColorizer.cpp
+index d0deead..9319a89 100644
+--- a/src/lib/TextureColorizer.cpp
++++ b/src/lib/TextureColorizer.cpp
+@@ -176,7 +176,7 @@ void TextureColorizer::colorize( QImage *origimg, const ViewportParams *viewport
+ m_coastImage = QImage( viewport->size(), QImage::Format_RGB32 );
+
+ // update coast image
+- m_coastImage.fill( QColor( 0, 0, 255, 0) );
++ m_coastImage.fill( QColor( 0, 0, 255, 0).rgb() );
+
+ bool doClip = false; //assume false
+ switch( viewport->projection() ) {
diff --git a/kde/patch/kdelibs.patch b/kde/patch/kdelibs.patch
index 1b0fd96..2445d6d 100644
--- a/kde/patch/kdelibs.patch
+++ b/kde/patch/kdelibs.patch
@@ -8,6 +8,12 @@ zcat $CWD/patch/kdelibs/kdelibs.docbook.patch.gz | patch -p1 --verbose || { touc
# prevents any query which does NOT use wide unicode characters to fail:
#cat $CWD/patch/kdelibs/kdelibs.nepomuk.unicode.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
-# Fix broken number entry (fixed in KDE >= 4.7.5)
-cat $CWD/patch/kdelibs/kdelibs.klocale.numberfix.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+# Make uPnP support depend on the environment variable SOLID_UPNP,
+# e.g. by creating an /etc/profile.d/upnp.sh file with the following contents:
+# export SOLID_UPNP=1
+cat $CWD/patch/kdelibs/kdelibs.upnp_conditional.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix fstab support in solid (last-minute patch for KDE 4.8.4 which _just_
+# made it into the official tarball):
+#cat $CWD/patch/kdelibs/kdelibs.fstab.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/kde/patch/kdelibs/kdelibs.fstab.patch b/kde/patch/kdelibs/kdelibs.fstab.patch
new file mode 100644
index 0000000..a57662b
--- /dev/null
+++ b/kde/patch/kdelibs/kdelibs.fstab.patch
@@ -0,0 +1,47 @@
+From: Alex Fiestas <afiestas@kde.org>
+Date: Tue, 05 Jun 2012 16:12:28 +0000
+Subject: Emit deviceRemoved/Added with the right deviceList set
+X-Git-Url: http://quickgit.kde.org/?p=kdelibs.git&amp;a=commitdiff&amp;h=19213a6c34e1b47a100815ccbfee8b5c70c3c12a
+---
+Emit deviceRemoved/Added with the right deviceList set
+
+The problem is quite straightforward, deviceAdded is being emitted when
+the m_deviceList has the OLD list, so the new device is still NOT in it.
+If the user of the library instances a device Solid::Device(UDI) in the
+slot after that signal, the device will be null because it will not be
+found in m_deviceList.
+
+REVIEW: 105132
+---
+
+
+--- a/solid/solid/backends/fstab/fstabmanager.cpp
++++ b/solid/solid/backends/fstab/fstabmanager.cpp
+@@ -116,17 +116,19 @@ void FstabManager::_k_updateDeviceList()
+ QSet<QString> newlist = deviceList.toSet();
+ QSet<QString> oldlist = m_deviceList.toSet();
+
+- foreach(const QString &device, newlist) {
+- if ( !oldlist.contains(device) )
+- emit deviceAdded(udiPrefix() + "/" + device);
+- }
+-
+ foreach(const QString &device, oldlist) {
+- if ( !newlist.contains(device) )
++ if ( !newlist.contains(device) ) {
+ emit deviceRemoved(udiPrefix() + "/" + device);
++ }
+ }
+
+ m_deviceList = deviceList;
++
++ foreach(const QString &device, newlist) {
++ if ( !oldlist.contains(device) ) {
++ emit deviceAdded(udiPrefix() + "/" + device);
++ }
++ }
+ }
+
+ void FstabManager::onMtabChanged()
+
+
diff --git a/kde/patch/kdelibs/kdelibs.klocale.numberfix.patch b/kde/patch/kdelibs/kdelibs.klocale.numberfix.patch
deleted file mode 100644
index d27c2a3..0000000
--- a/kde/patch/kdelibs/kdelibs.klocale.numberfix.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-commit 2993b24bc21a340695ad35b4f014a684f4d0c651
-Author: John Layt <jlayt@kde.org>
-Date: Sat Dec 17 16:27:51 2011 +0000
-
- KLocale: Fix readNumber() and readMoney() for lenient group parsing
-
- Restore the old pre-4.7 behaviour of accepting as valid any numbers
- that do not contain any group separators but strictly enforce group
- rules when the number contains 1 or more group separators.
-
- Distro's will really want to backport this fix to all versions of 4.7
- as previously number entry for all KDE apps would have been seriously
- broken.
-
- I'm amazed I wasn't beaten up for this earlier!
-
- BUG: 288963
- FIXED-IN: 4.7.5
- CCMAIL: kde-packager@kde.org
-
-diff --git a/kdecore/localization/klocale_kde.cpp b/kdecore/localization/klocale_kde.cpp
-index 6cf85f9..6690f4a 100644
---- a/kdecore/localization/klocale_kde.cpp
-+++ b/kdecore/localization/klocale_kde.cpp
-@@ -1894,7 +1894,10 @@ double KLocalePrivate::readNumber(const QString &_str, bool * ok) const
-
- // Remove group separators
- bool groupOk = true;
-- str = parseDigitGroup(str, thousandsSeparator(), decimalSymbol(), numericDigitGrouping(), &groupOk);
-+ if(str.contains(thousandsSeparator())) {
-+ str = parseDigitGroup(str, thousandsSeparator(), decimalSymbol(),
-+ numericDigitGrouping(), &groupOk);
-+ }
-
- if (!groupOk) {
- if (ok) {
-@@ -2013,7 +2016,10 @@ double KLocalePrivate::readMoney(const QString &_str, bool *ok) const
-
- // Remove group separators
- bool groupOk = true;
-- str = parseDigitGroup(str, monetaryThousandsSeparator(), monetaryDecimalSymbol(), monetaryDigitGrouping(), &groupOk);
-+ if(str.contains(monetaryThousandsSeparator())) {
-+ str = parseDigitGroup(str, monetaryThousandsSeparator(), monetaryDecimalSymbol(),
-+ monetaryDigitGrouping(), &groupOk);
-+ }
-
- if (!groupOk) {
- if (ok) {
-diff --git a/kdecore/tests/klocaletest.cpp b/kdecore/tests/klocaletest.cpp
-index 97a3bce..f80de85 100644
---- a/kdecore/tests/klocaletest.cpp
-+++ b/kdecore/tests/klocaletest.cpp
-@@ -180,9 +180,13 @@ KLocaleTest::readNumber()
- QVERIFY(!ok);
- QCOMPARE(locale.readNumber(QString("123,456,789.01"), &ok), 0.0);
- QVERIFY(!ok);
-- QCOMPARE(locale.readNumber(QString("123456789"), &ok), 0.0);
-+ QCOMPARE(locale.readNumber(QString("123456789"), &ok), 123456789.0);
-+ QVERIFY(ok);
-+ QCOMPARE(locale.readNumber(QString("123456789.01"), &ok), 123456789.01);
-+ QVERIFY(ok);
-+ QCOMPARE(locale.readNumber(QString("123456,789"), &ok), 0.0);
- QVERIFY(!ok);
-- QCOMPARE(locale.readNumber(QString("123456789.01"), &ok), 0.0);
-+ QCOMPARE(locale.readNumber(QString("123456,789.01"), &ok), 0.0);
- QVERIFY(!ok);
-
- //Test it parses correctly with an empty separator.
-@@ -204,6 +208,14 @@ KLocaleTest::readNumber()
- QVERIFY(ok);
- QCOMPARE(locale.readNumber(QString("123 456 789.01"), &ok), 123456789.01);
- QVERIFY(ok);
-+ QCOMPARE(locale.readNumber(QString("123456789"), &ok), 123456789.0);
-+ QVERIFY(ok);
-+ QCOMPARE(locale.readNumber(QString("123456789.01"), &ok), 123456789.01);
-+ QVERIFY(ok);
-+ QCOMPARE(locale.readNumber(QString("123456 789"), &ok), 0.0);
-+ QVERIFY(!ok);
-+ QCOMPARE(locale.readNumber(QString("123456 789.01"), &ok), 0.0);
-+ QVERIFY(!ok);
- QCOMPARE(locale.readNumber(QString("123,456,789"), &ok), 0.0);
- QVERIFY(!ok);
- QCOMPARE(locale.readNumber(QString("123,456,789.01"), &ok), 0.0);
-@@ -479,6 +491,10 @@ void KLocaleTest::readMoney()
- QVERIFY(ok);
- QCOMPARE(locale.readMoney("$ 987,654,321.12", &ok), 987654321.12);
- QVERIFY(ok);
-+ QCOMPARE(locale.readMoney("$ 987654321.12", &ok), 987654321.12);
-+ QVERIFY(ok);
-+ QCOMPARE(locale.readMoney("$ 987654,321.12", &ok), 0.0);
-+ QVERIFY(!ok);
-
- QCOMPARE(locale.readMoney( "$ -1.12", &ok), -1.12);
- QVERIFY(ok);
-@@ -498,6 +514,10 @@ void KLocaleTest::readMoney()
- QVERIFY(ok);
- QCOMPARE(locale.readMoney("$ -987,654,321.12", &ok), -987654321.12);
- QVERIFY(ok);
-+ QCOMPARE(locale.readMoney("$ -987654321.12", &ok), -987654321.12);
-+ QVERIFY(ok);
-+ QCOMPARE(locale.readMoney("$ -987654,321.12", &ok), 0.0);
-+ QVERIFY(!ok);
-
- // Test incomplete formats
- QCOMPARE(locale.readMoney( "$ 1", &ok), 1.00);
-@@ -521,17 +541,21 @@ void KLocaleTest::readMoney()
-
- // Test Grouping
- locale.d->setMonetaryDigitGrouping(QList<int>());
-- QCOMPARE(locale.readMoney( "$ 987654321.12", &ok), 987654321.12);
-+ QCOMPARE(locale.readMoney("$ 987654321.12", &ok), 987654321.12);
- QVERIFY(ok);
- QCOMPARE(locale.readMoney("$ -987654321.12", &ok), -987654321.12);
- QVERIFY(ok);
- locale.d->setMonetaryDigitGrouping(QList<int>() << 3 << 2);
-- QCOMPARE(locale.readMoney( "$ 98,76,54,321.12", &ok), 987654321.12);
-+ QCOMPARE(locale.readMoney("$ 98,76,54,321.12", &ok), 987654321.12);
- QVERIFY(ok);
- QCOMPARE(locale.readMoney("$ -98,76,54,321.12", &ok), -987654321.12);
- QVERIFY(ok);
-+ QCOMPARE(locale.readMoney("$ 987654321.12", &ok), 987654321.12);
-+ QVERIFY(ok);
-+ QCOMPARE(locale.readMoney("$ -987654321.12", &ok), -987654321.12);
-+ QVERIFY(ok);
- locale.d->setMonetaryDigitGrouping(QList<int>() << 3 << -1);
-- QCOMPARE(locale.readMoney( "$ 987654,321.12", &ok), 987654321.12);
-+ QCOMPARE(locale.readMoney("$ 987654,321.12", &ok), 987654321.12);
- QVERIFY(ok);
- QCOMPARE(locale.readMoney("$ -987654,321.12", &ok), -987654321.12);
- QVERIFY(ok);
diff --git a/kde/patch/kdelibs/kdelibs.upnp_conditional.patch b/kde/patch/kdelibs/kdelibs.upnp_conditional.patch
new file mode 100644
index 0000000..3a19447
--- /dev/null
+++ b/kde/patch/kdelibs/kdelibs.upnp_conditional.patch
@@ -0,0 +1,15 @@
+--- kdelibs-4.8.0/solid/solid/managerbase.cpp.orig 2011-07-27 20:34:39.000000000 +0200
++++ kdelibs-4.8.0/solid/solid/managerbase.cpp 2012-01-26 09:17:49.409993419 +0100
+@@ -90,7 +90,11 @@
+ # endif
+
+ # if defined (HUPNP_FOUND)
+- m_backends << new Solid::Backends::UPnP::UPnPDeviceManager(0);
++ bool solidUpnpEnabled
++ = QString::fromLocal8Bit(qgetenv("SOLID_UPNP")).toInt()==1;
++ if (solidUpnpEnabled) {
++ m_backends << new Solid::Backends::UPnP::UPnPDeviceManager(0);
++ }
+ # endif
+ }
+ }
diff --git a/kde/patch/kdepim.patch b/kde/patch/kdepim.patch
index b36c707..1934e35 100644
--- a/kde/patch/kdepim.patch
+++ b/kde/patch/kdepim.patch
@@ -4,3 +4,8 @@ cat $CWD/patch/kdepim/kdepim-4.5.85-install-headers.patch | patch -p1 --verbose
# Fix a memleak in kdepim 4.7.1 (fixed just too late to be included in the
# 4.7.1 tarball)
#cat $CWD/patch/kdepim/kdepim-4.7.1_memleak.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix a memleak in kdepim 4.8.1
+# (it got included in the tarball _just_ before the release)
+#cat $CWD/patch/kdepim/kdepim-4.8.1_bug_258551.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kdepim/kdepim-4.8.1_bug_258551.patch b/kde/patch/kdepim/kdepim-4.8.1_bug_258551.patch
new file mode 100644
index 0000000..c94cf11
--- /dev/null
+++ b/kde/patch/kdepim/kdepim-4.8.1_bug_258551.patch
@@ -0,0 +1,58 @@
+commit 7e4953c54752dca8a10ad29adf2e225a96f8669a
+Author: Montel Laurent <montel@kde.org>
+Date: Mon Mar 5 21:59:44 2012 +0100
+
+ Fix Bug 258551 - KMailCVT leaks lots of memory when importing maildir
+
+ Akonadi::ItemCreateJob was never delete during importing so memory used increase a lot.
+ (for example during importing 2 Go it takes 2.5Go virtual memory before, after my fix it takes just 400Mo)
+ Too bad that it's will not in 4.8.1
+ FIXED-IN: 4.8.2
+ BUG: 258551
+ (cherry picked from commit eafff41025775a8a2c15cd3f26233bd8d50cb277)
+
+ If we can't update kdepim source please add this patch to your source please.
+
+ CCMAIL: kde-packager@kde.org
+
+diff --git a/kmailcvt/filters.cxx b/kmailcvt/filters.cxx
+index 8579534..7ffb005 100644
+--- a/kmailcvt/filters.cxx
++++ b/kmailcvt/filters.cxx
+@@ -169,11 +169,13 @@ bool Filter::addAkonadiMessage( FilterInfo* info, const Akonadi::Collection &col
+ }
+ item.setPayload<KMime::Message::Ptr>( message );
+ Akonadi::ItemCreateJob* job = new Akonadi::ItemCreateJob( item, collection );
++ job->setAutoDelete( false );
+ if( !job->exec() ) {
+ info->alert( i18n( "<b>Error:</b> Could not add message to folder %1. Reason: %2",
+ collection.name(), job->errorString() ) );
+ return false;
+ }
++ delete job;
+ return true;
+ }
+
+
+commit d5933dd8913e9a57ef0b6a7f732d6a10d08f82ae
+Author: Montel Laurent <montel@kde.org>
+Date: Tue Mar 6 08:42:31 2012 +0100
+
+ Fix mem leak
+
+ CCMAIL: mueller@kde.org
+ CCMAIL: kde-packager@kde.org
+ (cherry picked from commit 8de439bc0c39a511cfb69d5e5b111b2a5de72ccb)
+
+diff --git a/kmailcvt/filters.cxx b/kmailcvt/filters.cxx
+index 7ffb005..c3878da 100644
+--- a/kmailcvt/filters.cxx
++++ b/kmailcvt/filters.cxx
+@@ -173,6 +173,7 @@ bool Filter::addAkonadiMessage( FilterInfo* info, const Akonadi::Collection &col
+ if( !job->exec() ) {
+ info->alert( i18n( "<b>Error:</b> Could not add message to folder %1. Reason: %2",
+ collection.name(), job->errorString() ) );
++ delete job;
+ return false;
+ }
+ delete job;
diff --git a/kde/patch/kdesdk.patch b/kde/patch/kdesdk.patch
new file mode 100644
index 0000000..f6106af
--- /dev/null
+++ b/kde/patch/kdesdk.patch
@@ -0,0 +1,4 @@
+# Fix permissions of find-gui-text.sh script:
+# Fixed just in time before release of KDE 4.8.2:
+#cat $CWD/patch/kdesdk/kdesdk-4.8.2_scriptperms.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kdesdk/kdesdk-4.8.2_scriptperms.diff b/kde/patch/kdesdk/kdesdk-4.8.2_scriptperms.diff
new file mode 100644
index 0000000..4440f2d
--- /dev/null
+++ b/kde/patch/kdesdk/kdesdk-4.8.2_scriptperms.diff
@@ -0,0 +1,14 @@
+diff -up kdesdk-4.8.2/lokalize/scripts/CMakeLists.txt.perms kdesdk-4.8.2/lokalize/scripts/CMakeLists.txt
+--- kdesdk-4.8.2/lokalize/scripts/CMakeLists.txt.perms 2012-03-29 15:51:49.000000000 -0500
++++ kdesdk-4.8.2/lokalize/scripts/CMakeLists.txt 2012-03-30 14:19:02.860529844 -0500
+@@ -12,8 +12,7 @@ ELSE (WIN32)
+ newprojectwizard.py
+ DESTINATION ${DATA_INSTALL_DIR}/lokalize/scripts )
+
+- install( FILES find-gui-text.sh
+- PERMISSIONS WORLD_EXECUTE WORLD_READ
++ install( PROGRAMS find-gui-text.sh
+ DESTINATION ${DATA_INSTALL_DIR}/lokalize/scripts )
+
+ ENDIF (WIN32)
+
diff --git a/kde/patch/kgpg.patch b/kde/patch/kgpg.patch
new file mode 100644
index 0000000..a3ef384
--- /dev/null
+++ b/kde/patch/kgpg.patch
@@ -0,0 +1,4 @@
+# Fix startup when no config file is defined (BUG:291923)
+# Only for KDE 4.8.0 pre-built:
+#cat $CWD/patch/kgpg/kgpg-4.8.0.noconfigfile.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kgpg/kgpg-4.8.0.noconfigfile.patch b/kde/patch/kgpg/kgpg-4.8.0.noconfigfile.patch
new file mode 100644
index 0000000..89d4ee6
--- /dev/null
+++ b/kde/patch/kgpg/kgpg-4.8.0.noconfigfile.patch
@@ -0,0 +1,27 @@
+commit fa0b4565a2c4aa672dc4c285d1bd445e055da626
+Author: Patrick Spendrin <ps_ml@gmx.de>
+Date: Thu Jan 19 11:24:44 2012 +0100
+
+ fix startup when no config file is defined
+
+ BUG:291923
+
+diff --git a/gpgproc.cpp b/gpgproc.cpp
+index 49a5385..dc5ebfa 100644
+--- a/gpgproc.cpp
++++ b/gpgproc.cpp
+@@ -86,9 +86,11 @@ void GnupgBinary::setBinary(const QString &executable)
+ m_standardArguments.clear();
+ m_standardArguments << QLatin1String( "--no-secmem-warning" )
+ << QLatin1String( "--no-tty" )
+- << QLatin1String("--no-greeting")
+- << QLatin1String("--options")
+- << gpgConfigFile;
++ << QLatin1String("--no-greeting");
++
++ if (!gpgConfigFile.isEmpty())
++ m_standardArguments << QLatin1String("--options")
++ << gpgConfigFile;
+
+ QStringList debugLevelArguments(QLatin1String("--debug-level"));
+ debugLevelArguments << QLatin1String("none");
diff --git a/kde/patch/korundum.patch b/kde/patch/korundum.patch
new file mode 100644
index 0000000..7a8b7cf
--- /dev/null
+++ b/kde/patch/korundum.patch
@@ -0,0 +1,4 @@
+# Build against Ruby 1.9.3.
+# See also https://bugs.kde.org/show_bug.cgi?id=287057
+cat $CWD/patch/korundum/korundum_ruby19.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/korundum/korundum_ruby19.patch b/kde/patch/korundum/korundum_ruby19.patch
new file mode 100644
index 0000000..561d8de
--- /dev/null
+++ b/kde/patch/korundum/korundum_ruby19.patch
@@ -0,0 +1,31 @@
+diff -up korundum-4.8.0/src/krubypluginfactory.cpp.ruby19 korundum-4.8.0/src/krubypluginfactory.cpp
+--- korundum-4.8.0/src/krubypluginfactory.cpp.ruby19 2011-07-27 13:37:29.000000000 -0500
++++ korundum-4.8.0/src/krubypluginfactory.cpp 2012-02-17 08:30:38.785635819 -0600
+@@ -39,7 +39,7 @@
+ extern "C" {
+ extern VALUE rb_load_path;
+ extern VALUE qt_internal_module;
+-void Init_prelude(void);
++// void Init_prelude(void);
+ }
+
+ //
+@@ -165,7 +165,7 @@ QObject *KRubyPluginFactory::create(cons
+ #if RUBY_VERSION >= 0x10900
+ VALUE gem = rb_define_module("Gem");
+ rb_const_set(gem, rb_intern("Enable"), Qtrue);
+- Init_prelude();
++// Init_prelude();
+ #endif
+
+ ruby_incpush(QFile::encodeName(program.path()));
+@@ -342,7 +342,7 @@ int kdemain(int argc, char **argv)
+ #if RUBY_VERSION >= 0x10900
+ VALUE gem = rb_define_module("Gem");
+ rb_const_set(gem, rb_intern("Enable"), Qtrue);
+- Init_prelude();
++// Init_prelude();
+ #endif
+
+ ruby_incpush(QFile::encodeName(program.path()));
+
diff --git a/kde/patch/ktorrent.patch b/kde/patch/ktorrent.patch
new file mode 100644
index 0000000..ecd0a8b
--- /dev/null
+++ b/kde/patch/ktorrent.patch
@@ -0,0 +1,4 @@
+# Fix compilation against KDE 4.8.0
+# Only for ktorrent 4.1.3:
+#cat $CWD/patch/ktorrent/ktorrent.taskmanager.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/ktorrent/ktorrent.taskmanager.diff b/kde/patch/ktorrent/ktorrent.taskmanager.diff
new file mode 100644
index 0000000..bb7fe25
--- /dev/null
+++ b/kde/patch/ktorrent/ktorrent.taskmanager.diff
@@ -0,0 +1,174 @@
+From: Joris Guisson <joris.guisson@gmail.com>
+Date: Wed, 23 Nov 2011 19:17:08 +0000
+Subject: Use dbus to show ktorrent window from plasma applet. This removes the dependency on libtaskmanager.
+X-Git-Tag: v4.2rc1
+X-Git-Url: http://quickgit.kde.org/?p=ktorrent.git&amp;a=commitdiff&amp;h=6d4a6ae51692966862ccb20d17cb217717519d40
+---
+Use dbus to show ktorrent window from plasma applet. This removes the dependency on libtaskmanager.
+
+BUG: 287309
+---
+
+
+--- a/plasma/applet/CMakeLists.txt
++++ b/plasma/applet/CMakeLists.txt
+@@ -5,25 +5,15 @@ if(NOT QT_VERSION_OK)
+
+ else(NOT QT_VERSION_OK)
+
+- set(TASKMANAGER_FOUND FALSE)
+- FIND_PATH(TASKMANAGER_INCLUDE_DIR NAMES taskmanager.h PATHS ${KDE4_INCLUDE_DIR}/taskmanager ${INCLUDE_INSTALL_DIR}/taskmanager.h)
+- FIND_LIBRARY(TASKMANAGER_LIBRARY NAMES taskmanager PATHS ${KDE4_LIB_DIR} ${LIB_INSTALL_DIR})
+-
+- if(TASKMANAGER_INCLUDE_DIR AND TASKMANAGER_LIBRARY)
+- set(TASKMANAGER_FOUND TRUE)
+- message(STATUS "Found libtaskmanager: ${TASKMANAGER_LIBRARY} ")
+- include_directories(${TASKMANAGER_INCLUDE_DIR})
+- set(ktapplet_SRCS applet.cpp chunkbar.cpp fadingitem.cpp fadingnavigationwidget.cpp)
+-
+- kde4_add_ui_files(ktapplet_SRCS appletconfig.ui)
+-
+- kde4_add_plugin(plasma_applet_ktorrent ${ktapplet_SRCS})
+- target_link_libraries(plasma_applet_ktorrent ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS} ${TASKMANAGER_LIBRARY} ${LIBKTORRENT_LIBRARIES} ktcore)
+-
+- install(TARGETS plasma_applet_ktorrent DESTINATION ${PLUGIN_INSTALL_DIR})
+- install(FILES plasma-applet-ktorrent.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+- endif(TASKMANAGER_INCLUDE_DIR AND TASKMANAGER_LIBRARY)
+-
+- macro_log_feature(TASKMANAGER_FOUND "libtaskmanager" "libtaskmanager library and header files" "http://www.kde.org/" FALSE "" "libtaskmanager is needed for KTorrent Plasmoid")
++
++ set(ktapplet_SRCS applet.cpp chunkbar.cpp fadingitem.cpp fadingnavigationwidget.cpp)
++
++ kde4_add_ui_files(ktapplet_SRCS appletconfig.ui)
++
++ kde4_add_plugin(plasma_applet_ktorrent ${ktapplet_SRCS})
++ target_link_libraries(plasma_applet_ktorrent ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS} ${LIBKTORRENT_LIBRARIES} ktcore)
++
++ install(TARGETS plasma_applet_ktorrent DESTINATION ${PLUGIN_INSTALL_DIR})
++ install(FILES plasma-applet-ktorrent.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+
+ endif(NOT QT_VERSION_OK)
+
+--- a/plasma/applet/applet.cpp
++++ b/plasma/applet/applet.cpp
+@@ -21,6 +21,9 @@
+ #include "applet.h"
+ #include <QFile>
+ #include <QGraphicsLinearLayout>
++#include <QDBusConnection>
++#include <QDBusConnectionInterface>
++#include <QDBusMessage>
+ #include <KConfigDialog>
+ #include <KLocale>
+ #include <KRun>
+@@ -31,12 +34,11 @@
+ #include <Plasma/IconWidget>
+ #endif
+ #include <Plasma/Label>
+-#include <taskmanager/taskmanager.h>
+-#include <taskmanager/task.h>
+ #include <util/functions.h>
+ #include "chunkbar.h"
+ #include "fadingnavigationwidget.h"
+
++
+ using namespace bt;
+
+ namespace ktplasma
+@@ -174,7 +176,8 @@ namespace ktplasma
+ }
+ }
+
+- void Applet::updateNavigation() {
++ void Applet::updateNavigation()
++ {
+ navigation->setEnabled(connected_to_app && !sources.empty()
+ && (sources.count() > 1 || !sources.contains(current_source)));
+ }
+@@ -193,12 +196,14 @@ namespace ktplasma
+ }
+ }
+
+- void Applet::updateSources() {
++ void Applet::updateSources()
++ {
+ sources = engine->sources();
+ sources.removeOne("core");
+ }
+
+- void Applet::setSource(QString source) {
++ void Applet::setSource(QString source)
++ {
+ if (!current_source.isEmpty())
+ engine->disconnectSource(current_source,this);
+ clearData();
+@@ -340,20 +345,39 @@ namespace ktplasma
+
+ void Applet::iconClicked()
+ {
+- TaskManager::TaskDict tasks = TaskManager::TaskManager::self()->tasks();
+- for (TaskManager::TaskDict::iterator i = tasks.begin();i != tasks.end();i ++)
++ QDBusConnection session_bus = QDBusConnection::sessionBus();
++ QDBusConnectionInterface* dbus_service = session_bus.interface();
++ if (!session_bus.isConnected() || !dbus_service || !dbus_service->isServiceRegistered("org.ktorrent.ktorrent"))
++ {
++ // can't find the window, try launching it
++ KUrl::List empty;
++ KRun::run("ktorrent", empty, 0);
++ }
++ else
+ {
+- if (i.value()->className() == "ktorrent")
+- {
+- KWindowSystem::activateWindow(i.key());
+- return;
+- }
++ QDBusMessage msg = QDBusMessage::createMethodCall("org.ktorrent.ktorrent", "/ktorrent/MainWindow_1", "org.kde.KMainWindow", "winId");
++ QDBusPendingCall call = session_bus.asyncCall(msg, 5000);
++ QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(call ,this);
++ connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(dbusCallFinished(QDBusPendingCallWatcher*)));
+ }
+-
+- // can't find the window, try launching it
+- KUrl::List empty;
+- KRun::run("ktorrent", empty, 0);
+ }
++
++ void Applet::dbusCallFinished(QDBusPendingCallWatcher* self)
++ {
++ if (self->isError())
++ {
++ // call failed, try launching it
++ KUrl::List empty;
++ KRun::run("ktorrent", empty, 0);
++ }
++ else
++ {
++ QDBusPendingReply<qlonglong> reply = *self;
++ KWindowSystem::activateWindow(reply.value());
++ }
++ self->deleteLater();
++ }
++
+
+ void Applet::clearData()
+ {
+
+--- a/plasma/applet/applet.h
++++ b/plasma/applet/applet.h
+@@ -27,6 +27,7 @@
+ #include "fadingnavigationwidget.h"
+
+ class QGraphicsLinearLayout;
++class QDBusPendingCallWatcher;
+
+ namespace Plasma
+ {
+@@ -68,6 +69,7 @@ namespace ktplasma
+ void iconClicked();
+ void selectPrev();
+ void selectNext();
++ void dbusCallFinished(QDBusPendingCallWatcher* self);
+
+ private:
+ void updateTorrentCombo();