[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/network/ktorrent/plugins/mediaplayer
From:       Joris Guisson <joris.guisson () gmail ! com>
Date:       2008-04-22 11:37:00
Message-ID: 1208864220.689464.6544.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 799801 by guisson:

Fix bug in MediaModel, which could result in rows being added, when it is not necessary



 M  +8 -2      mediamodel.cpp  


--- trunk/extragear/network/ktorrent/plugins/mediaplayer/mediamodel.cpp #799800:799801
@@ -199,13 +199,19 @@
 	{
 		Item* item = new Item(tc);
 		if (tc->getStats().multi_file_torrent && item->multimedia_files.count() > 0)
+		{
 			items.append(item);
+			insertRow(items.count());
+		}
 		else if (!tc->getStats().multi_file_torrent && tc->isMultimedia())
+		{
 			items.append(item);
+			insertRow(items.count());
+		}
 		else
+		{
 			delete item;
-		
-		insertRow(items.count());
+		}
 	}
 	
 	void MediaModel::onTorrentRemoved(bt::TorrentInterface* tc)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic