[PATCH] kdeaddons/renamedlgplugins/audio/
David Faure
faure at kde.org
Mon Dec 15 21:37:59 GMT 2003
On Monday 15 December 2003 22:29, André Wöbbeking wrote:
> On Monday 15 December 2003 22:09, David Faure wrote:
> > On Monday 15 December 2003 20:15, André Wöbbeking wrote:
> > > > I'm not very aware of the preview framework there - but if it
> > > > passes a "QString filename" around, I assume that's the real
> > > > filesystem filename, so audio_plugin.cpp should use
> > > > KIO::decodeFileName() before displaying it, to decode %2F into
> > > > '/'.
> > >
> > > It all comes from KIO::RenameDlg. It used QString instead of KUrl
> > > (anyone knows why?). The jobs using this dialog convert there urls
> > > with prettyURL() to QStrings.
> >
> > The whole URL? Hmm, then those QStrings should be either displayed as
> > is or passed back to KURL for parsing....
> > The only way to extract the user-visible filename is to get it from
> > KIO::decodeFileName( url.fileName() ).
>
> From CopyJob::slotResultConflictCopyingFiles:
>
> res = Observer::self()->open_RenameDlg( this, m_conflictError == ERR_FILE_ALREADY_EXIST ?
> i18n("File Already Exists") : i18n("Already Exists as Folder"),
> (*it).uSource.prettyURL(0, KURL::StripFileProtocol),
> (*it).uDest.prettyURL(0, KURL::StripFileProtocol),
> mode, newPath,
> (*it).size, destsize,
> (*it).ctime, destctime,
> (*it).mtime, destmtime );
>
> I think, this should be changed to KUrl, maybe via an additional RenameDlg ctor
> and KDE_DEPRECATED for the old ctor.
I totally agree. This dialog was initially only showing those 2 strings, so this was enough.
Now that the URLs are passed to plugins that show previews etc., the job should
definitely pass the KURLs. Go for it.
--
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list