<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>141799</bug_id>
          
          <creation_ts>2007-02-16 19:38:29 +0000</creation_ts>
          <short_desc>Not able to select anything after automatically adding several torrents.</short_desc>
          <delta_ts>2007-02-17 14:24:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>ktorrent</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Unlisted Binaries</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Laurens Vets">laurens</reporter>
          <assigned_to name="Joris Guisson">joris.guisson</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>509577</commentid>
    <comment_count>0</comment_count>
    <who name="Laurens Vets">laurens</who>
    <bug_when>2007-02-16 19:38:29 +0000</bug_when>
    <thetext>Version:           2.1 (using KDE KDE 3.5.6)
Installed from:    Unspecified Linux
OS:                Linux

I let ktorrent automatically add .torrent files who appear in a certain folder and ktorrent should add them silently.  After adding several torrents (3+) at once this way, I&apos;m unable to select any menu option or torrent details or anything else in the ktorrent GUI.  Ktorrent works as the torrents which are loaded start downloading, I&apos;m just not able to do anything in ktorrent anymore.
I can only restart ktorrent by killing at as I cannot select the option to quite ktorrent.

If I just add 1 torrent this way, ktorrent is still usable.  If I add multiple, ktorrent isn&apos;t usable anymore.

I have reproduced this several times.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509695</commentid>
    <comment_count>1</comment_count>
    <who name="Joris Guisson">joris.guisson</who>
    <bug_when>2007-02-17 13:38:20 +0000</bug_when>
    <thetext>I have a pretty good idea what the problem is</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509712</commentid>
    <comment_count>2</comment_count>
    <who name="Joris Guisson">joris.guisson</who>
    <bug_when>2007-02-17 14:24:37 +0000</bug_when>
    <thetext>SVN commit 634509 by guisson:

- NetAccess considered harmfull, so lets not use it anymore in scanfolder plugin, this fixes bug 141799
- In case of loadSilently, if no default save location is set, the home directory of the user is used instead

BUG: 141799



 M  +7 -7      apps/ktorrent/ktorrentcore.cpp  
 M  +3 -4      plugins/scanfolder/scanfolder.cpp  


--- trunk/extragear/network/ktorrent/apps/ktorrent/ktorrentcore.cpp #634508:634509
@@ -329,15 +329,15 @@
 		QString dir = Settings::saveDir();
 		if (!Settings::useSaveDir())
 		{
-			loadingFinished(url,false,false);
+			Out(SYS_GEN|LOG_NOTICE) &lt;&lt; &quot;Cannot load &quot; &lt;&lt; path &lt;&lt; &quot; silently, default save location not set !&quot; &lt;&lt; endl;
+			Out(SYS_GEN|LOG_NOTICE) &lt;&lt; &quot;Using home directory instead !&quot; &lt;&lt; endl;
+			dir = QDir::homeDirPath();
 		}
+	
+		if (dir != QString::null &amp;&amp; load(path,dir,true))
+			loadingFinished(url,true,false);
 		else
-		{
-			if (dir != QString::null &amp;&amp; load(path,dir,true))
-				loadingFinished(url,true,false);
-			else
-				loadingFinished(url,false,true);
-		}
+			loadingFinished(url,false,true);
 	}
 	else
 	{
--- trunk/extragear/network/ktorrent/plugins/scanfolder/scanfolder.cpp #634508:634509
@@ -22,7 +22,7 @@
 #include &lt;kdirlister.h&gt;
 #include &lt;kfileitem.h&gt;
 #include &lt;klocale.h&gt;
-#include &lt;kio/netaccess.h&gt;
+#include &lt;kio/job.h&gt;
 
 #include &lt;qstring.h&gt;
 #include &lt;qobject.h&gt;
@@ -56,7 +56,6 @@
 		connect(m_dir, SIGNAL(newItems( const KFileItemList&amp; )), this, SLOT(onNewItems( const KFileItemList&amp; )));
 		connect(m_core, SIGNAL(loadingFinished( const KURL&amp;, bool, bool )), this, SLOT(onLoadingFinished( const KURL&amp;, bool, bool )));
 
-// 		Out() &lt;&lt; &quot;LOADING SCANFOLDER: &quot; &lt;&lt; m_dir-&gt;url().path() &lt;&lt; endl;
 	}
 
 
@@ -76,7 +75,6 @@
 			QString dirname = m_dir-&gt;url().path();
 			QString filename = dirname + &quot;/&quot; + name;
 
-
 			if(!name.endsWith(&quot;.torrent&quot;))
 				continue;
 
@@ -144,7 +142,8 @@
 				if(QFile::exists(dirname + &quot;/.&quot; + name))
 					QFile::remove(dirname + &quot;/.&quot; + name);
 
-				KIO::NetAccess::move(url, destination);
+				// NetAccess considered harmfull !!!
+				KIO::file_move(url, destination);
 				break;
 			case defaultAction:
 				QFile f(dirname + &quot;/.&quot; + name);
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>