Bug 56766

Summary: Printing job name CUPS and kword - not always correct! (mostly KDE print system)
Product: kword Reporter: Wilfried Bytebier <wilfried.bytebier>
Component: generalAssignee: Thomas Zander <zander>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.5 or before   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In:

Description Wilfried Bytebier 2003-04-02 22:52:33 UTC
Version:           1.2.1 (using KDE KDE 3.1)
Installed from:    Slackware Packages
Compiler:          gcc version 3.2.2 
OS:          Linux

If a document is printed in kword (haven't tested other applications yet), the print-job name in kprint is mostly "KDE print system".  The only time when the document name is show here, is when the file is saved for the first time and then printed.  If the document is closed and then opened again, the job-name is again "KDE print system".

How to reproduce this:
1. Open kword
2. Type some text
3. Print ---> job name = "KDE print system"
4. save as <document name>
5. Print ---> job name = <document name>
6. Close kword
7. Use conqueror to open the document
8. Print ---> job name = "KDE print system"
9. save as <document name>
10. Print ---> job name = "KDE print system"
11. save
12. Print ---> job name = "KDE print system"


The only time when the document-name is used as the job-name for the printing system is when the first time a document is saved with save-as.
Comment 1 David Faure 2003-04-02 23:43:00 UTC
Subject: koffice/lib/kofficecore

CVS commit by faure: 

Fix for: the print-job name in kprint is mostly "KDE print system".
We were trying to get the title from the document info page, but due to an
empty vs null confusion, the fallback to the filename didn't happen.
Now it uses the filename if the title is empty.
CCMAIL: 56766-done@bugs.kde.org


  M +1 -1      koMainWindow.cc   1.297


--- koffice/lib/kofficecore/koMainWindow.cc  #1.296:1.297
@@ -1095,5 +1095,5 @@ void KoMainWindow::print(bool quick) {
     }
 
-    if ( title.isNull() )
+    if ( title.isEmpty() )
         title = fileName;
     printer.setDocName( title );