summaryrefslogtreecommitdiff
path: root/extra/ktorrent
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-11-19 02:25:52 -0800
committerroot <root@rshg054.dnsready.net>2012-11-19 02:25:52 -0800
commit705d29694fd61c47a57ccec531e73d87a2960021 (patch)
tree55e2f9c5d4ed72e92b4d249f51760cfbd53d3b80 /extra/ktorrent
parentab63d8d49f68847a68c2ba0014bf0d3338cb3df6 (diff)
Mon Nov 19 02:22:26 PST 2012
Diffstat (limited to 'extra/ktorrent')
-rw-r--r--extra/ktorrent/PKGBUILD13
-rw-r--r--extra/ktorrent/groupmiewmodel.diff87
2 files changed, 96 insertions, 4 deletions
diff --git a/extra/ktorrent/PKGBUILD b/extra/ktorrent/PKGBUILD
index 731ed23de..af3dc10ea 100644
--- a/extra/ktorrent/PKGBUILD
+++ b/extra/ktorrent/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 166483 2012-09-08 08:54:47Z ronald $
+# $Id: PKGBUILD 171523 2012-11-18 10:30:03Z ronald $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Travis Willard <travisw@wmpub.ca>
# Contributor: Georg Grabler <ggrabler@gmail.com>
pkgname=ktorrent
pkgver=4.3.0
-pkgrel=1
+pkgrel=2
pkgdesc="A powerful BitTorrent client for KDE"
arch=('i686' 'x86_64')
url='http://ktorrent.org/'
@@ -13,16 +13,21 @@ license=('GPL2')
depends=('libktorrent' 'kdebase-workspace' 'taglib')
makedepends=('automoc4' 'cmake' 'boost')
source=("http://ktorrent.org/downloads/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
- 'httpserver.patch')
+ 'httpserver.patch' 'groupmiewmodel.diff')
install=${pkgname}.install
sha1sums=('60400c6286f58934dde7ab471f56188b68d69f7b'
- 'cef22b24af540e1bfcf13da60e4846ade106c303')
+ 'cef22b24af540e1bfcf13da60e4846ade106c303'
+ '5b91b40e38afb15452bcb0644cd7ba57bc9db6eb' )
+
+options=(strip)
+
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
# build time patch
patch -p0 -i "${srcdir}/httpserver.patch"
+ patch -p0 -i "${srcdir}/groupmiewmodel.diff"
cd "${srcdir}"
mkdir build
diff --git a/extra/ktorrent/groupmiewmodel.diff b/extra/ktorrent/groupmiewmodel.diff
new file mode 100644
index 000000000..f16bdc57b
--- /dev/null
+++ b/extra/ktorrent/groupmiewmodel.diff
@@ -0,0 +1,87 @@
+commit 1009ba89b5d603ae7f1a95ef65a818c760c367cf
+Author: Joris Guisson <joris.guisson@gmail.com>
+Date: Mon Oct 22 20:07:21 2012 +0200
+
+ Backport to 4.3: Fix crash in GroupViewModel when dragging torrents over groups
+
+ BUG: 308733
+
+diff --git a/ktorrent/groups/groupviewmodel.cpp b/ktorrent/groups/groupviewmodel.cpp
+index f2e99d2..b4dca7e 100644
+--- ktorrent/groups/groupviewmodel.cpp
++++ ktorrent/groups/groupviewmodel.cpp
+@@ -55,6 +55,9 @@ namespace kt
+ QVariant GroupViewModel::data(const QModelIndex& index, int role) const
+ {
+ Item* item = (Item*)index.internalPointer();
++ if(!item)
++ return QVariant();
++
+ switch(role)
+ {
+ case Qt::DisplayRole:
+@@ -72,6 +75,9 @@ namespace kt
+ return false;
+
+ Item* item = (Item*)index.internalPointer();
++ if(!item)
++ return false;
++
+ Group* group = item->group;
+ QString new_name = value.toString();
+ if(new_name.isEmpty() || gman->find(new_name))
+@@ -96,13 +102,16 @@ namespace kt
+ return 1;
+
+ Item* item = (Item*)parent.internalPointer();
+- return item->children.size();
++ if(!item)
++ return 0;
++ else
++ return item->children.size();
+ }
+
+ QModelIndex GroupViewModel::parent(const QModelIndex& child) const
+ {
+ Item* item = (Item*)child.internalPointer();
+- if(!item->parent)
++ if(!item || !item->parent)
+ return QModelIndex();
+ else
+ return createIndex(item->parent->row, 0, (void*)item->parent);
+@@ -114,7 +123,7 @@ namespace kt
+ return createIndex(row, column, (void*)&root);
+
+ Item* item = (Item*)parent.internalPointer();
+- if(row < 0 || row >= item->children.count())
++ if(!item || row < 0 || row >= item->children.count())
+ return QModelIndex();
+
+ return createIndex(row, column, (void*)&item->children.at(row));
+@@ -157,7 +166,7 @@ namespace kt
+ Qt::ItemFlags GroupViewModel::flags(const QModelIndex& index) const
+ {
+ Item* item = (Item*)index.internalPointer();
+- if(item->group && !item->group->isStandardGroup())
++ if(item && item->group && !item->group->isStandardGroup())
+ return Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsDropEnabled;
+ else
+ return Qt::ItemIsEnabled;
+@@ -218,8 +227,11 @@ namespace kt
+
+ bool GroupViewModel::removeRows(int row, int count, const QModelIndex& parent)
+ {
++ Item* item = (Item*)parent.internalPointer();
++ if(!item)
++ return false;
++
+ beginRemoveRows(parent, row, row + count);
+- Item* item = (Item*)parent.internalPointer();
+ for(int i = 0; i < count; i++)
+ item->children.removeAt(row);
+ int row_index = 0;
+@@ -436,3 +448,4 @@ namespace kt
+
+
+ }
++