rev 9414 - in kde-extras/ktorrent/trunk/debian: . patches

Modestas Vainius modax-guest at alioth.debian.org
Fri Feb 15 12:22:34 UTC 2008


Author: modax-guest
Date: 2008-02-15 12:22:32 +0000 (Fri, 15 Feb 2008)
New Revision: 9414

Added:
   kde-extras/ktorrent/trunk/debian/patches/11_ktorrent_kde3_branch_r775289.diff
Modified:
   kde-extras/ktorrent/trunk/debian/changelog
   kde-extras/ktorrent/trunk/debian/control
   kde-extras/ktorrent/trunk/debian/ktorrent.1
   kde-extras/ktorrent/trunk/debian/patches/series
Log:
Preparing for ktorrent 2.2.5.dfsg.1-2 upload

Modified: kde-extras/ktorrent/trunk/debian/changelog
===================================================================
--- kde-extras/ktorrent/trunk/debian/changelog	2008-02-15 12:20:17 UTC (rev 9413)
+++ kde-extras/ktorrent/trunk/debian/changelog	2008-02-15 12:22:32 UTC (rev 9414)
@@ -1,3 +1,14 @@
+ktorrent (2.2.5.dfsg.1-2~pre2) unstable; urgency=low
+
+  [ Modestas Vainius ]
+  * Build-depend on libqt3-mt-dev (>= 3:3.3.8b-1) to resolve undefined
+    [fl]?stat64 symbol mess with libqt3-mt (>= 3:3.3.8b-1) (Closes: #465759).
+  * Pull fixes from ktorrent kde3 branch up to r775289.
+    That's a new patch 11_ktorrent_kde3_branch_r775289.diff.
+  * Describe a new option --silent in debian/ktorrent.1 man page.
+
+ -- Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org>  Fri, 15 Feb 2008 14:16:15 +0200
+
 ktorrent (2.2.5.dfsg.1-1) unstable; urgency=low
 
   [ Modestas Vainius ]

Modified: kde-extras/ktorrent/trunk/debian/control
===================================================================
--- kde-extras/ktorrent/trunk/debian/control	2008-02-15 12:20:17 UTC (rev 9413)
+++ kde-extras/ktorrent/trunk/debian/control	2008-02-15 12:22:32 UTC (rev 9414)
@@ -4,7 +4,7 @@
 Maintainer: Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org>
 Uploaders: Joel Johnson <mrjoel at lixil.net>, Modestas Vainius <modestas at vainius.eu>
 DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 5.0.0), autotools-dev, kdelibs4-dev, libpcre3-dev, libx11-dev, libgmp3-dev, libgeoip-dev, quilt (>= 0.40)
+Build-Depends: debhelper (>= 5.0.0), autotools-dev, kdelibs4-dev, libpcre3-dev, libx11-dev, libgmp3-dev, libgeoip-dev, quilt (>= 0.40), libqt3-mt-dev (>= 3:3.3.8b-1)
 Standards-Version: 3.7.3.0
 Homepage: http://ktorrent.org
 

Modified: kde-extras/ktorrent/trunk/debian/ktorrent.1
===================================================================
--- kde-extras/ktorrent/trunk/debian/ktorrent.1	2008-02-15 12:20:17 UTC (rev 9413)
+++ kde-extras/ktorrent/trunk/debian/ktorrent.1	2008-02-15 12:22:32 UTC (rev 9414)
@@ -13,6 +13,9 @@
 start downloading it.
 .SS Options
 .TP
+\fB\-\-silent\fP
+Silently save torrent given on URL
+.TP
 \fB\-\-debug\fP
 Debug mode
 

Added: kde-extras/ktorrent/trunk/debian/patches/11_ktorrent_kde3_branch_r775289.diff
===================================================================
--- kde-extras/ktorrent/trunk/debian/patches/11_ktorrent_kde3_branch_r775289.diff	                        (rev 0)
+++ kde-extras/ktorrent/trunk/debian/patches/11_ktorrent_kde3_branch_r775289.diff	2008-02-15 12:22:32 UTC (rev 9414)
@@ -0,0 +1,566 @@
+Index: libktorrent/torrent/torrentcontrol.h
+===================================================================
+--- libktorrent/torrent/torrentcontrol.h	(revision 766762)
++++ libktorrent/torrent/torrentcontrol.h	(revision 775291)
+@@ -34,7 +34,12 @@
+ class QStringList;
+ class QString;
+ 
++namespace KIO
++{
++	class Job;
++}
+ 
++
+ namespace bt
+ {
+ 	class Choker;
+@@ -302,6 +307,7 @@
+ 		/// Update the stats of the torrent.
+ 		void updateStats();
+ 		void corrupted(Uint32 chunk);
++		void moveDataFilesJobDone(KIO::Job* job);
+ 		
+ 	private:	
+ 		void updateTracker(const QString & ev,bool last_succes = true);
+@@ -345,6 +351,9 @@
+ 		QString outputdir;
+ 		QString error_msg;
+ 		
++		QString move_data_files_destination_path;
++		bool restart_torrent_after_move_data_files;
++		
+ 		bool prealloc;
+ 		PreallocationThread* prealoc_thread;
+ 		DataCheckerThread* dcheck_thread;
+Index: libktorrent/torrent/multifilecache.cpp
+===================================================================
+--- libktorrent/torrent/multifilecache.cpp	(revision 766762)
++++ libktorrent/torrent/multifilecache.cpp	(revision 775291)
+@@ -195,7 +195,7 @@
+ 		}
+ 	}
+ 	
+-	void MultiFileCache::moveDataFiles(const QString & ndir)
++	KIO::Job* MultiFileCache::moveDataFiles(const QString & ndir)
+ 	{
+ 		if (!bt::Exists(ndir))
+ 			bt::MakeDir(ndir);
+@@ -230,23 +230,27 @@
+ 			}
+ 			
+ 			mvd->startMoving();
+-			if (KIO::NetAccess::synchronousRun(mvd,0))
+-			{
+-				for (Uint32 i = 0;i < tor.getNumFiles();i++)
+-				{
+-					TorrentFile & tf = tor.getFile(i);
+-					// check for empty directories and delete them 
+-					DeleteEmptyDirs(output_dir,tf.getPath());
+-				}
+-			}
+-			else
+-				throw bt::Error("Move failed");
++			return mvd;
+ 		}
+ 		catch (bt::Error & err)
+ 		{
+ 			throw; // rethrow error
+ 		}
++		return 0;
+ 	}
++	
++	void MultiFileCache::moveDataFilesCompleted(KIO::Job* job)
++	{
++		if (!job->error())
++		{
++			for (Uint32 i = 0;i < tor.getNumFiles();i++)
++			{
++				TorrentFile & tf = tor.getFile(i);
++					// check for empty directories and delete them 
++				DeleteEmptyDirs(output_dir,tf.getPath());
++			}
++		}
++	}
+ 
+ 	void MultiFileCache::create()
+ 	{
+Index: libktorrent/torrent/singlefilecache.h
+===================================================================
+--- libktorrent/torrent/singlefilecache.h	(revision 766762)
++++ libktorrent/torrent/singlefilecache.h	(revision 775291)
+@@ -49,7 +49,8 @@
+ 		virtual void close();
+ 		virtual void open();
+ 		virtual void changeTmpDir(const QString & ndir);
+-		virtual void moveDataFiles(const QString & ndir);
++		virtual KIO::Job* moveDataFiles(const QString & ndir);
++		virtual void moveDataFilesCompleted(KIO::Job* job);
+ 		virtual void changeOutputPath(const QString& outputpath);
+ 		virtual QString getOutputPath() const {return output_file;}
+ 		virtual void preallocateDiskSpace(PreallocationThread* prealloc);
+Index: libktorrent/torrent/multifilecache.h
+===================================================================
+--- libktorrent/torrent/multifilecache.h	(revision 766762)
++++ libktorrent/torrent/multifilecache.h	(revision 775291)
+@@ -55,7 +55,8 @@
+ 		virtual void open();
+ 		virtual QString getOutputPath() const;
+ 		virtual void changeOutputPath(const QString & outputpath);
+-		virtual void moveDataFiles(const QString & ndir);
++		virtual KIO::Job* moveDataFiles(const QString & ndir);
++		virtual void moveDataFilesCompleted(KIO::Job* job);
+ 		virtual void preallocateDiskSpace(PreallocationThread* prealloc);
+ 		virtual bool hasMissingFiles(QStringList & sl);
+ 		virtual void deleteDataFiles();
+Index: libktorrent/torrent/singlefilecache.cpp
+===================================================================
+--- libktorrent/torrent/singlefilecache.cpp	(revision 766762)
++++ libktorrent/torrent/singlefilecache.cpp	(revision 775291)
+@@ -52,11 +52,15 @@
+ 		cache_file = tmpdir + "cache";
+ 	}
+ 	
+-	void SingleFileCache::moveDataFiles(const QString & ndir)
++	KIO::Job* SingleFileCache::moveDataFiles(const QString & ndir)
+ 	{
+-		bt::Move(output_file,ndir);
++		return KIO::move(KURL::fromPathOrURL(output_file),KURL::fromPathOrURL(ndir));
+ 	}
+ 	
++	void SingleFileCache::moveDataFilesCompleted(KIO::Job* /*job*/)
++	{
++	}
++	
+ 	void bt::SingleFileCache::changeOutputPath(const QString & outputpath)
+ 	{
+ 		bt::Delete(cache_file);
+Index: libktorrent/torrent/chunkmanager.h
+===================================================================
+--- libktorrent/torrent/chunkmanager.h	(revision 766762)
++++ libktorrent/torrent/chunkmanager.h	(revision 775291)
+@@ -30,6 +30,11 @@
+ 
+ class QStringList;
+ 
++namespace KIO
++{
++	class Job;
++}
++
+ namespace bt
+ {
+ 	class Torrent;
+@@ -101,10 +106,17 @@
+ 		/**
+ 		 * Move the data files of the torrent.
+ 		 * @param ndir The new directory
++		 * @return The job doing the move
+ 		 */
+-		void moveDataFiles(const QString & ndir);
++		KIO::Job* moveDataFiles(const QString & ndir);
+ 		
+ 		/**
++		 * The move data files job has finished
++		 * @param job The move job
++		 */
++		void moveDataFilesCompleted(KIO::Job* job);
++		
++		/**
+ 		 * Loads the index file.
+ 		 * @throw Error When it can be loaded
+ 		 */
+Index: libktorrent/torrent/torrentcontrol.cpp
+===================================================================
+--- libktorrent/torrent/torrentcontrol.cpp	(revision 766762)
++++ libktorrent/torrent/torrentcontrol.cpp	(revision 775291)
+@@ -287,8 +287,14 @@
+ 				emit seedingAutoStopped(this, overMaxRatio() ? kt::MAX_RATIO_REACHED : kt::MAX_SEED_TIME_REACHED);
+             }
+ 			
++			//Update diskspace if needed (every 1 min)			
++			if(!stats.completed && stats.running && bt::GetCurrentTime() - last_diskspace_check >= 60 * 1000)
++			{
++				checkDiskSpace(true);
++			}
++			
+ 			//Move completed files if needed:
+-			if(moveCompleted)
++			if (moveCompleted)
+ 			{
+ 				QString outdir = Settings::completedDir();
+ 				if(!outdir.endsWith(bt::DirSeparator()))
+@@ -296,12 +302,6 @@
+ 				
+ 				changeOutputDir(outdir);
+ 			}
+-			
+-			//Update diskspace if needed (every 1 min)			
+-			if(!stats.completed && stats.running && bt::GetCurrentTime() - last_diskspace_check >= 60 * 1000)
+-			{
+-				checkDiskSpace(true);
+-			}
+ 		}
+ 		catch (Error & e)
+ 		{
+@@ -813,15 +813,17 @@
+ 	
+ 	bool TorrentControl::changeOutputDir(const QString & new_dir, bool moveFiles)
+ 	{
++		if (moving_files)
++			return false;
++		
+ 		Out(SYS_GEN|LOG_NOTICE) << "Moving data for torrent " << stats.torrent_name << " to " << new_dir << endl;
+ 		
+-		bool start = false;
+-		int old_prio = getPriority();
++		restart_torrent_after_move_data_files = false;
+ 		
+ 		//check if torrent is running and stop it before moving data
+ 		if(stats.running)
+ 		{
+-			start = true;
++			restart_torrent_after_move_data_files = true;
+ 			this->stop(false);
+ 		}
+ 		
+@@ -841,21 +843,25 @@
+ 			
+ 			if (stats.output_path != nd)
+ 			{
++				KIO::Job* j = 0;
+ 				if(moveFiles)
+-				{
++				{	
+ 					if (stats.multi_file_torrent)
+-						cman->moveDataFiles(nd);
++						j = cman->moveDataFiles(nd);
+ 					else
+-						cman->moveDataFiles(new_dir);
+-					// bt::Move(stats.output_path, new_dir);
++						j = cman->moveDataFiles(new_dir);
+ 				}
+ 				
+-				cman->changeOutputPath(nd);
+-				outputdir = stats.output_path = nd;
+-				istats.custom_output_name = true;
+-				
+-				saveStats();
+-				Out(SYS_GEN|LOG_NOTICE) << "Data directory changed for torrent " << "'" << stats.torrent_name << "' to: " << new_dir << endl;
++				move_data_files_destination_path = nd;
++				if (j)
++				{
++					connect(j,SIGNAL(result(KIO::Job*)),this,SLOT(moveDataFilesJobDone(KIO::Job*)));
++					return true;
++				}
++				else
++				{
++					moveDataFilesJobDone(0);
++				}
+ 			}
+ 			else
+ 			{
+@@ -870,13 +876,39 @@
+ 		}
+ 		
+ 		moving_files = false;
+-		if(start)
++		if (restart_torrent_after_move_data_files)
+ 		{
+ 			this->start();
+ 		}
+ 		
+ 		return true;
+ 	}
++	
++	void TorrentControl::moveDataFilesJobDone(KIO::Job* job)
++	{
++		if (job)
++			cman->moveDataFilesCompleted(job);
++		
++		if (!job || (job && !job->error()))
++		{
++			cman->changeOutputPath(move_data_files_destination_path);
++			outputdir = stats.output_path = move_data_files_destination_path;
++			istats.custom_output_name = true;
++				
++			saveStats();
++			Out(SYS_GEN|LOG_NOTICE) << "Data directory changed for torrent " << "'" << stats.torrent_name << "' to: " << move_data_files_destination_path << endl;
++		}
++		else if (job->error())
++		{
++			Out(SYS_GEN|LOG_IMPORTANT) << "Could not move " << stats.output_path << " to " << move_data_files_destination_path << endl;
++		}
++		
++		moving_files = false;
++		if (restart_torrent_after_move_data_files)
++		{
++			this->start();
++		}
++	}
+ 
+ 
+ 	void TorrentControl::rollback()
+Index: libktorrent/torrent/chunkmanager.cpp
+===================================================================
+--- libktorrent/torrent/chunkmanager.cpp	(revision 766762)
++++ libktorrent/torrent/chunkmanager.cpp	(revision 775291)
+@@ -148,11 +148,16 @@
+ 		file_priority_file = data_dir + "file_priority";
+ 	}
+ 	
+-	void ChunkManager::moveDataFiles(const QString & ndir)
++	KIO::Job* ChunkManager::moveDataFiles(const QString & ndir)
+ 	{
+-		cache->moveDataFiles(ndir);
++		return cache->moveDataFiles(ndir);
+ 	}
+ 	
++	void ChunkManager::moveDataFilesCompleted(KIO::Job* job)
++	{
++		cache->moveDataFilesCompleted(job);
++	}
++	
+ 	void ChunkManager::changeOutputPath(const QString & output_path)
+ 	{
+ 		cache->changeOutputPath(output_path);
+@@ -441,7 +446,7 @@
+ 	
+ 	bool ChunkManager::completed() const
+ 	{
+-		return todo.numOnBits() == 0;
++		return todo.numOnBits() == 0 && bitset.numOnBits() > 0;
+ 	}
+ 	
+ 	Uint64 ChunkManager::bytesLeft() const
+Index: libktorrent/torrent/cache.h
+===================================================================
+--- libktorrent/torrent/cache.h	(revision 766762)
++++ libktorrent/torrent/cache.h	(revision 775291)
+@@ -20,6 +20,8 @@
+ #ifndef BTCACHE_H
+ #define BTCACHE_H
+ 
++#include <kio/job.h>
++
+ class QStringList;
+ 
+ namespace bt
+@@ -68,10 +70,17 @@
+ 		/**
+ 		 * Move the data files to a new directory.
+ 		 * @param ndir The directory
++		 * @return The KIO::Job doing the move
+ 		 */
+-		virtual void moveDataFiles(const QString & ndir) = 0;
++		virtual KIO::Job* moveDataFiles(const QString & ndir) = 0;
+ 		
+ 		/**
++		 * The move data files job is done.
++		 * @param job The job that did it 
++		 */
++		virtual void moveDataFilesCompleted(KIO::Job* job) = 0;
++		
++		/**
+ 		 * Changes output path. All data files should already been moved.
+ 		 * This just modifies the datadir variable.
+ 		 * @param outputpath New output path
+Index: libktorrent/kademlia/kbucket.cpp
+===================================================================
+--- libktorrent/kademlia/kbucket.cpp	(revision 766762)
++++ libktorrent/kademlia/kbucket.cpp	(revision 775291)
+@@ -36,6 +36,7 @@
+ 	{
+ 		last_responded = bt::GetCurrentTime();
+ 		failed_queries = 0;
++		questionable_pings = 0;
+ 	}
+ 	
+ 	KBucketEntry::KBucketEntry(const KInetSocketAddress & addr,const Key & id)
+@@ -43,11 +44,12 @@
+ 	{
+ 		last_responded = bt::GetCurrentTime();
+ 		failed_queries = 0;
++		questionable_pings = 0;
+ 	}
+ 		
+ 	KBucketEntry::KBucketEntry(const KBucketEntry & other)
+ 	: addr(other.addr),node_id(other.node_id),
+-	last_responded(other.last_responded),failed_queries(other.failed_queries)
++	last_responded(other.last_responded),failed_queries(other.failed_queries),questionable_pings(other.questionable_pings)
+ 	{}
+ 
+ 		
+@@ -60,6 +62,7 @@
+ 		node_id = other.node_id;
+ 		last_responded = other.last_responded;
+ 		failed_queries = other.failed_queries;
++		questionable_pings = other.questionable_pings;
+ 		return *this;
+ 	}
+ 	
+@@ -90,13 +93,14 @@
+ 		if (isGood())
+ 			return false;
+ 		
+-		return failed_queries > 2;
++		return failed_queries > 2 || questionable_pings > 2;
+ 	}
+ 	
+ 	void KBucketEntry::hasResponded()
+ 	{
+ 		last_responded = bt::GetCurrentTime();
+ 		failed_queries = 0; // reset failed queries
++		questionable_pings = 0;
+ 	}
+ 	
+ 
+@@ -212,6 +216,7 @@
+ 				RPCCall* c = srv->doCall(p);
+ 				if (c)
+ 				{
++					e.onPingQuestionable();
+ 					c->addListener(this);
+ 					// add the pending entry
+ 					pending_entries_busy_pinging.insert(c,replacement_entry);
+Index: libktorrent/kademlia/kbucket.h
+===================================================================
+--- libktorrent/kademlia/kbucket.h	(revision 766762)
++++ libktorrent/kademlia/kbucket.h	(revision 775291)
+@@ -68,6 +68,7 @@
+ 		Key node_id;
+ 		bt::TimeStamp last_responded;
+ 		Uint32 failed_queries;
++		Uint32 questionable_pings;
+ 	public:
+ 		/**
+ 		 * Constructor, sets everything to 0.
+@@ -123,6 +124,9 @@
+ 		/// A request timed out
+ 		void requestTimeout() {failed_queries++;}
+ 		
++		/// The entry has been pinged because it is questionable
++		void onPingQuestionable() {questionable_pings++;}
++
+ 		/// The null entry
+ 		static KBucketEntry null; 
+ 	};
+Index: apps/ktorrent/ktorrentview.cpp
+===================================================================
+--- apps/ktorrent/ktorrentview.cpp	(revision 766762)
++++ apps/ktorrent/ktorrentview.cpp	(revision 775291)
+@@ -369,7 +369,7 @@
+ 		{	
+ 			const TorrentStats & s = tc->getStats();
+ 			bool data_to = false;
+-			if (s.bytes_left_to_download > 0)
++			if (!s.completed)
+ 			{
+ 				QString msg = i18n("The torrent %1 has not finished downloading, "
+ 						"do you want to delete the incomplete data, too?").arg(s.torrent_name);
+@@ -731,7 +731,7 @@
+ 		if (tc)
+ 		{
+ 			QString dn;
+-			dn = KFileDialog::getExistingDirectory(QString::null, this, i18n("Choose download location for %1").arg(tc->getStats().torrent_name));
++			dn = KFileDialog::getExistingDirectory(tc->getStats().output_path, this, i18n("Choose download location for %1").arg(tc->getStats().torrent_name));
+ 								
+ 			if(dn.isNull() || dn.isEmpty())
+ 				continue;
+Index: apps/ktorrent/ktorrentapp.cpp
+===================================================================
+--- apps/ktorrent/ktorrentapp.cpp	(revision 766762)
++++ apps/ktorrent/ktorrentapp.cpp	(revision 775291)
+@@ -66,7 +66,10 @@
+ 
+ 	for (int i = 0; i < args->count(); i++)
+ 	{
+-		widget->load(args->url(i));
++		if (args->isSet("silent"))
++			widget->loadSilently(args->url(i));
++		else
++			widget->load(args->url(i)); 
+ 	}
+ 
+ 	args->clear();
+Index: apps/ktorrent/ktorrent.desktop
+===================================================================
+--- apps/ktorrent/ktorrent.desktop	(revision 766762)
++++ apps/ktorrent/ktorrent.desktop	(revision 775291)
+@@ -1,7 +1,6 @@
+ [Desktop Entry]
+ Encoding=UTF-8
+ Name=KTorrent
+-Name[nl]=KTorrentGibbon
+ Name[sv]=Ktorrent
+ Name[xx]=xxKTorrentxx
+ GenericName=BitTorrent Client
+Index: apps/ktorrent/main.cpp
+===================================================================
+--- apps/ktorrent/main.cpp	(revision 766762)
++++ apps/ktorrent/main.cpp	(revision 775291)
+@@ -106,6 +106,7 @@
+ static KCmdLineOptions options[] =
+ {
+ 	{ "debug", I18N_NOOP("Debug mode"), 0 },
++	{ "silent",  I18N_NOOP("Silently save torrent given on URL"), 0 },
+ 	{ "+[URL]", I18N_NOOP( "Document to open" ), 0 },
+ 	KCmdLineLastOption
+ };
+@@ -163,6 +164,7 @@
+ 	about.addCredit("Jindrich Makovicka",I18N_NOOP("Non threaded fileview update patch"),"makovick at gmail.com");
+ 	about.addCredit("swolchok",I18N_NOOP("Optimization to SHA1 hash generation"),"evilsporkman at gmail.com");
+ 	about.addCredit("Markus Brueffer",I18N_NOOP("Patch to fix free diskspace calculation on FreeBSD"),"markus at brueffer.de");
++	about.addCredit("caruccio",I18N_NOOP("Patch to load torrents silently from the command line"),"mateus at caruccio.com");
+ 
+ 	KCmdLineArgs::init(argc, argv, &about);
+ 	KCmdLineArgs::addCmdLineOptions(options);
+Index: apps/ktorrent/groups/torrentgroup.cpp
+===================================================================
+--- apps/ktorrent/groups/torrentgroup.cpp	(revision 766762)
++++ apps/ktorrent/groups/torrentgroup.cpp	(revision 775291)
+@@ -74,8 +74,8 @@
+ 	void TorrentGroup::save(bt::BEncoder* enc)
+ 	{
+ 		enc->beginDict();
+-		enc->write("name"); enc->write(name);
+-		enc->write("icon"); enc->write(icon_name);
++		enc->write("name"); enc->write(name.local8Bit());
++		enc->write("icon"); enc->write(icon_name.local8Bit());
+ 		enc->write("hashes"); enc->beginList();
+ 		std::set<TorrentInterface*>::iterator i = torrents.begin();
+ 		while (i != torrents.end())
+@@ -102,13 +102,15 @@
+ 		if (!vn || vn->data().getType() != bt::Value::STRING)
+ 			throw bt::Error("invalid or missing name");
+ 		
+-		name = vn->data().toString();
++		QByteArray tmp = vn->data().toByteArray();
++		name = QString::fromLocal8Bit(tmp.data(),tmp.size());
+ 		
+ 		vn = dn->getValue("icon");
+ 		if (!vn || vn->data().getType() != bt::Value::STRING)
+ 			throw bt::Error("invalid or missing icon");
+ 		
+-		setIconByName(vn->data().toString());
++		tmp = vn->data().toByteArray();
++		setIconByName(QString::fromLocal8Bit(tmp.data(),tmp.size()));
+ 		
+ 		BListNode* ln = dn->getList("hashes");
+ 		if (!ln)
+Index: apps/ktorrent/trayicon.cpp
+===================================================================
+--- apps/ktorrent/trayicon.cpp	(revision 766762)
++++ apps/ktorrent/trayicon.cpp	(revision 775291)
+@@ -96,6 +96,11 @@
+ 	
+ 	if(showBars)
+ 		drawSpeedBar(stats.download_speed/1024,stats.upload_speed/1024, downloadBandwidth, uploadBandwidth);
++	else if (previousDownloadHeight > 0 || previousUploadHeight > 0)
++	{
++		repaint(); // clear the bars if they are disabled
++		previousDownloadHeight = previousUploadHeight = 0;
++	}
+ }
+ 
+ void TrayIcon::drawSpeedBar(int downloadSpeed, int uploadSpeed, int downloadBandwidth, int uploadBandwidth )

Modified: kde-extras/ktorrent/trunk/debian/patches/series
===================================================================
--- kde-extras/ktorrent/trunk/debian/patches/series	2008-02-15 12:20:17 UTC (rev 9413)
+++ kde-extras/ktorrent/trunk/debian/patches/series	2008-02-15 12:22:32 UTC (rev 9414)
@@ -6,4 +6,5 @@
 06_makefile_am_fixups.diff
 07_drop_geoip_from_makefile_am.diff
 10_ru_translation_fix.diff
+11_ktorrent_kde3_branch_r775289.diff -p0
 98_buildprep.diff




More information about the pkg-kde-commits mailing list