[PyQt] no UDSEntryList in PyKDE leads to crash
Magnus Kulke
magnus.kulke at radicalapproach.de
Sat Dec 20 12:37:38 GMT 2008
hello,
today i install kde 4.2 beta2 and the problem disappeared.
greets,
magnus
Am Dec 18, 2008 um 11:30 AM schrieb Magnus Kulke:
> Hi,
>
> sure, below is a small program which will crash when using
> KIO::UDSEntryList in a signal handler
>
> thanks,
>
> magnus
>
> (i am using python-qt4 4.4.3-1ubuntu1& python-kde4
> 4:4.1.3-0ubuntu1~intrepid1)
>
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
>
> import sys
> from PyQt4.QtCore import *
> from PyQt4.QtGui import *
> from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineArgs, KUrl
> from PyKDE4.kdeui import KApplication, KMainWindow
> from PyKDE4.kio import *
>
> class KasablancaMainWindow (KMainWindow):
>
> listjob = None
>
> def __init__ (self):
> KMainWindow.__init__ (self)
> listjob = KIO.listDir(KUrl ("/" ))
> self.connect (listjob, SIGNAL ("result (KJob *)"), self.slotResult)
> self.connect (listjob, SIGNAL ("entries (KIO::Job *, const
> KIO::UDSEntryList &)"), self.slotEntries)
> def slotResult(self, job):
> print "result"
> def slotEntries(self, job, entrylist):
> print "entries"
>
> if __name__ == '__main__':
>
> appName = "kasablanca"
> catalog = ""
> programName = ki18n ("kasablanca")
> version = "0.5"
> description = ki18n ("kasablanca ftp client")
> license = KAboutData.License_GPL
> copyright = ki18n ("(c) 2008 Magnus Kulke")
> text = ki18n ("none")
> homePage = "kasablanca.berlios.de"
> bugEmail = "mkulke at bla.com"
>
> aboutData = KAboutData (appName, catalog, programName, version,
> description, license, copyright, text, homePage, bugEmail)
>
> KCmdLineArgs.init (sys.argv, aboutData)
>
> app = KApplication ()
> mainWindow = KasablancaMainWindow ()
> mainWindow.show()
> app.exec_ ()
>
>
> Am Dec 17, 2008 um 11:17 PM schrieb Simon Edwards:
>
>> Hi,
>>
>> Magnus Kulke wrote:
>>> there is a signal in KDE, emitted by a KIO::ListJob, "entries
>>> (KIO::Job *, const KIO::UDSEntryList &). there seems to be no
>>> binding for this class in python. USDEntryList is really a
>>> typedef'ed QList <UDSEntry> KIO::UDSEntryList. Only UDSEntry seems
>>> to be available in PyKDE4. when connecting the signal to my slot
>>> the application crashes, anyone knows how to work around this?
>>
>> If you can boil the problem down to something simple enough that I
>> can (reasonably) easily reproduce it here, then I'll have a look at
>> it.
>>
>> cheers,
>>
>> --
>> Simon Edwards | KDE-NL, Guidance tools, Guarddog Firewall
>> simon at simonzone.com | http://www.simonzone.com/software/
>> Nijmegen, The Netherlands | "ZooTV? You made the right choice."
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list