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    = "[email protected]"

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
[email protected]       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to