[Kget] [Bug 117970] kget konq integration doesnt work when severall files are selected

Urs Wolfer uwolfer at fwo.ch
Thu Dec 22 21:07:00 CET 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=117970         
uwolfer fwo ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From uwolfer fwo ch  2005-12-22 21:06 -------
fixed

SVN commit 490685 by ratz:

Accept multiple urls from commandline. When there are two arguments and the 2nd is a local file, interpret as destination. BUG: 117970

 M  +15 -4     main.cpp  


--- branches/KDE/3.5/kdenetwork/kget/main.cpp #490684:490685
 @ -165,10 +165,21  @
                 kmain->addTransferEx( KURL::fromPathOrURL( txt ),
                                       KURL());
         }
-        else if(args->count()==2)
-            kmain->addTransferEx( KURL::fromPathOrURL( args->arg(0) ),
-                                  KURL::fromPathOrURL( args->arg(1) ));
-
+        else if(args->count()>=2)
+               {
+                       KURL::List urls;
+                       QString dest;
+                       for( int i=0; i < args->count(); ++i){
+                               urls.append(KURL::fromPathOrURL( args->arg(i)));
+                       }
+                       if ( args->count()==2 & urls.last().protocol() == "file" )
+                       {
+                               dest=urls.last().path();
+                               kmain->addTransferEx( urls.first(), dest );
+                       }
+                       else
+                               kmain->addTransfers( urls, dest );
+               }
         args->clear();
 
 #ifdef _DEBUG



More information about the Kget mailing list