Update ooo320-m1
[ooovba.git] / applied_patches / 0286-fpicker-kde-local-media.diff
blob207a581e7e8cfe8f5faec6cbd6cc5bf21d889a93
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
3 @@ -76,6 +76,7 @@
4 #define emit
5 #endif
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 );
13 exec();
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 );
19 +#else
20 + KURL qLocalSelectedURL( selectedURL() );
21 +#endif
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();
35 +#endif
37 int nExtensionPos = rFileName.findRev( '/' );
38 if ( nExtensionPos >= 0 )
39 nExtensionPos = rFileName.find( '.', nExtensionPos );