<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>97342</bug_id>
          
          <creation_ts>2005-01-18 14:24:42 +0000</creation_ts>
          <short_desc>network filenames end up the same in kprinter</short_desc>
          <delta_ts>2008-12-31 17:54:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kdeprint</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Debian testing</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>zfavas</reporter>
          <assigned_to name="KDEPrint Devel Mailinglist">kde-print-bugs-null</assigned_to>
          <cc>jlayt</cc>
    
    <cc>l.lunak</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>304181</commentid>
    <comment_count>0</comment_count>
    <who name="">zfavas</who>
    <bug_when>2005-01-18 14:24:42 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465628</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Rodrigues">phil</who>
    <bug_when>2006-09-01 16:50:03 +0000</bug_when>
    <thetext>Does the problem happen only for smb:// files, or for all files? I can&apos;t reproduce it in KDE 3.5 with local files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>468106</commentid>
    <comment_count>2</comment_count>
    <who name="Christoph Burger-Scheidlin">mail</who>
    <bug_when>2006-09-09 00:18:35 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>469094</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Rodrigues">phil</who>
    <bug_when>2006-09-11 23:14:48 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483611</commentid>
    <comment_count>4</comment_count>
    <who name="Lubos Lunak">l.lunak</who>
    <bug_when>2006-11-03 18:43:10 +0000</bug_when>
    <thetext>SVN commit 601577 by lunakl:

Clean up handling of filenames and urls. Apparently &quot;kde-filelist&quot;
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 ) &lt;&lt; url.url() &lt;&lt; endl;
 		if (KIO::NetAccess::download(url, tmpFile, this))
 		{
--- branches/KDE/3.5/kdelibs/kdeprint/kfilelist.cpp #601576:601577
@@ -189,17 +189,12 @@
 		while (item &amp;&amp; item-&gt;nextSibling())
 			item = item-&gt;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-&gt;comment(), downloaded);
-				item-&gt;setPixmap(0, mime-&gt;pixmap(url, KIcon::Small));
-			}
+		{
+			KMimeType::Ptr	mime = KMimeType::findByURL( *it, 0, true, false);
+			item = new QListViewItem(m_files, item, (*it).fileName(), mime-&gt;comment(), (*it).url());
+			item-&gt;setPixmap(0, mime-&gt;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-&gt;comment(), *it);
+		item = new QListViewItem(m_files, item, url.fileName(), mime-&gt;comment(), url.url());
 		item-&gt;setPixmap(0, mime-&gt;pixmap(url, KIcon::Small));
 	}
 	slotSelectionChanged();
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>690315</commentid>
    <comment_count>5</comment_count>
    <who name="John Layt">jlayt</who>
    <bug_when>2008-12-31 17:54:19 +0000</bug_when>
    <thetext>Closing old Resolved status bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>