KURLRequester Problem

Frerich Raabe raabe at kde.org
Sat Feb 7 19:02:20 GMT 2004


Moin,

while tackling bug 74485 I came up with the attached patch, but before I
commit I'd some reviewal before I commit it since I'm not sure it is a
proper fix. In particular, I'm not sure whether there are any other
protocols (other than file:) in which characters with a special
meaning in URLs (such as '?', as mentioned in the bug report) should
be preserved.

- Frerich

-- 
if new true friend not protected for explicit private union, break
case and try using this.
-------------- next part --------------
Index: kurlrequester.cpp
===================================================================
RCS file: /home/kde/kdelibs/kio/kfile/kurlrequester.cpp,v
retrieving revision 1.53
diff -u -3 -p -r1.53 kurlrequester.cpp
--- kurlrequester.cpp	8 Jan 2004 12:10:58 -0000	1.53
+++ kurlrequester.cpp	7 Feb 2004 17:58:58 -0000
@@ -266,7 +266,14 @@ void KURLRequester::slotOpenDialog()
 
     if ( dlg->exec() == QDialog::Accepted )
     {
-	setURL( dlg->selectedURL().prettyURL() );
+        if ( dlg->selectedURL().isLocalFile() )
+        {
+            setURL( dlg->selectedURL().path() );
+        }
+        else
+        {
+            setURL( dlg->selectedURL().prettyURL() );
+        }
         emit urlSelected( d->url() );
     }
 }


More information about the kde-core-devel mailing list