Version: (using KDE KDE 3.3.0) Installed from: Debian testing/unstable Packages OS: Linux I was bold enough to drag-and-drop a number of selected files from an smb:// url (konqueror) into kprinter (single drag-and-drop of multiple files). Unfortunately this single drag-and-drop operation resulted in the same temporary filename in /tmp/kde-xxxxx/kprinteryyyyyy.tmp times the number of the dragged-and-dropped file.
Does the problem happen only for smb:// files, or for all files? I can't reproduce it in KDE 3.5 with local files.
I have the problem in kde 3.5.4 for files accessed via smb:/ ftp, ftps and sieve. I did not try any more, but it is safe to assume that it happens for all files that need to be stored in /tmp before they can be printed. as comment #1 I do NOT have this problem for local files.
Confirmed with ftp on 3.5 branch r581764. I can correctly DnD from konqueror to konqueror, so I suppose the bug is in kprinter: reassigning.
SVN commit 601577 by lunakl: Clean up handling of filenames and urls. Apparently "kde-filelist" can contain urls, so just use those. Results in less ugly filenames and fixes incorrect NetAccess::download() usage as a side-effect. BUG: 97342 M +1 -1 kdebase/kdeprint/kprinter/printwrapper.cpp M +7 -13 kdelibs/kdeprint/kfilelist.cpp --- branches/KDE/3.5/kdebase/kdeprint/kprinter/printwrapper.cpp #601576:601577 @@ -304,7 +304,7 @@ for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it) { QString tmpFile; - KURL url(*it); + KURL url = KURL::fromPathOrURL(*it); kdDebug( 500 ) << url.url() << endl; if (KIO::NetAccess::download(url, tmpFile, this)) { --- branches/KDE/3.5/kdelibs/kdeprint/kfilelist.cpp #601576:601577 @@ -189,17 +189,12 @@ while (item && item->nextSibling()) item = item->nextSibling(); - // for each file, download it (if necessary) and add it - QString downloaded; for (KURL::List::ConstIterator it=files.begin(); it!=files.end(); ++it) - if (KIO::NetAccess::download(*it, downloaded, this)) - { - KURL url; - url.setPath(downloaded); - KMimeType::Ptr mime = KMimeType::findByURL(url, 0, true, false); - item = new QListViewItem(m_files, item, url.fileName(), mime->comment(), downloaded); - item->setPixmap(0, mime->pixmap(url, KIcon::Small)); - } + { + KMimeType::Ptr mime = KMimeType::findByURL( *it, 0, true, false); + item = new QListViewItem(m_files, item, (*it).fileName(), mime->comment(), (*it).url()); + item->setPixmap(0, mime->pixmap(*it, KIcon::Small)); + } slotSelectionChanged(); /* @@ -220,10 +215,9 @@ QListViewItem *item = 0; for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it) { - KURL url; - url.setPath(*it); + KURL url = KURL::fromPathOrURL( *it ); KMimeType::Ptr mime = KMimeType::findByURL(url, 0, true, false); - item = new QListViewItem(m_files, item, url.fileName(), mime->comment(), *it); + item = new QListViewItem(m_files, item, url.fileName(), mime->comment(), url.url()); item->setPixmap(0, mime->pixmap(url, KIcon::Small)); } slotSelectionChanged();
Closing old Resolved status bug.