Bug 245289 - printer-applet crashed on startup
Summary: printer-applet crashed on startup
Status: RESOLVED FIXED
Alias: None
Product: printer-applet
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Jonathan Riddell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 08:32 UTC by Radek Novacek
Modified: 2010-07-29 13:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch for this issue (751 bytes, patch)
2010-07-21 08:32 UTC, Radek Novacek
Details
proposed fix based on bug 244942 (783 bytes, patch)
2010-07-29 12:58 UTC, Andrea Scarpino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Radek Novacek 2010-07-21 08:32:24 UTC
Created attachment 49356 [details]
Proposed patch for this issue

Version:           unspecified (using Devel) 
OS:                Linux

Printer applets crashed with following backtrace every time:

Traceback (most recent call last):
  File "/usr/bin/printer-applet", line 1163, in <module>
    applet = JobManager()
  File "/usr/bin/printer-applet", line 241, in __init__
    uic.loadUi(APPDIR + '/' + "printer-applet.ui", self.mainWindow)
  File "/usr/lib/python2.6/site-packages/PyQt4/uic/__init__.py", line 177, in loadUi
    return DynamicUILoader().loadUi(uifile, baseinstance)
  File "/usr/lib/python2.6/site-packages/PyQt4/uic/Loader/loader.py", line 24, in loadUi
    return self.parse(filename, os.path.dirname(filename))
  File "/usr/lib/python2.6/posixpath.py", line 119, in dirname
    i = p.rfind('/') + 1
AttributeError: 'QString' object has no attribute 'rfind'


Reproducible: Always

Steps to Reproduce:
Just run it.



Solution is simple, just convert QString to the python str.
Comment 1 Andrea Scarpino 2010-07-29 12:58:59 UTC
Created attachment 49628 [details]
proposed fix based on bug 244942
Comment 2 Jonathan Riddell 2010-07-29 13:18:37 UTC

*** This bug has been marked as a duplicate of bug 244942 ***
Comment 3 Jonathan Riddell 2010-07-29 13:35:18 UTC
SVN commit 1156611 by jriddell:

Workaround change in PyQt 4.7 which now expects a string not a QString
BUG:245289


 M  +2 -2      printer-applet.py  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1156611
Comment 4 Jonathan Riddell 2010-07-29 13:36:50 UTC
SVN commit 1156613 by jriddell:

backport workaround for PyQt 4.7 expecting a string not a QString
BUG:245289


 M  +2 -2      printer-applet.py  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1156613
Comment 5 Jonathan Riddell 2010-07-29 13:42:04 UTC
Tagging with kde-4.5.0-blocker incase dirk fancies remaking the kdeutils tar with this fix.