1 --- fpicker/source/unx/kde/kdefilepicker.cxx 2006-01-27 17:46:57.000000000 +0100
2 +++ fpicker/source/unx/kde/kdefilepicker.cxx 2006-01-27 19:29:05.000000000 +0100
7 +#include <kdeversion.h>
8 #include <kdiroperator.h>
9 #include <kfiledialog.h>
10 #include <kfilefiltercombo.h>
11 @@ -343,8 +344,13 @@ void FileDialog::customEvent( QCustomEve
12 setCanNotifySelection( true );
15 - qSelectedURL = addExtension( selectedURL().url() );
16 - QString qProtocol( selectedURL().protocol() );
17 +#if KDE_IS_VERSION(3,5,0)
18 + KURL qLocalSelectedURL = KIO::NetAccess::mostLocalURL( selectedURL(), this );
20 + KURL qLocalSelectedURL( selectedURL() );
22 + qSelectedURL = addExtension( qLocalSelectedURL.url() );
23 + QString qProtocol( qLocalSelectedURL.protocol() );
25 if ( isSave() && result() == QDialog::Accepted )
27 @@ -632,6 +638,12 @@ bool FileDialog::isSupportedProtocol( co
29 QString FileDialog::localCopy( const QString &rFileName ) const
31 +#if KDE_IS_VERSION(3,5,0)
32 + KURL qLocalURL = KIO::NetAccess::mostLocalURL( KURL( rFileName ), const_cast<FileDialog*>( this ) );
33 + if ( qLocalURL.isLocalFile() )
34 + return qLocalURL.url();
37 int nExtensionPos = rFileName.findRev( '/' );
38 if ( nExtensionPos >= 0 )
39 nExtensionPos = rFileName.find( '.', nExtensionPos );