I am trying to use QtNetwork.QHttp in my N900 using python. Previously my code worked fine, fetched data using get/post methods and so on. But after maemo-upgrade (the big one around ~89MB), it stopped working. I simplified my code to following. The code causes segfault after sleep() when application quits. Same happens in my real application in similar situation. If I comment out all signal-connections, it wont segfault, but it wont do anything useful either (ofcourse). I have upgraded PySide modules and so on and I don't have any other dev/testing libraries installed (atleast I am quite sure about that). Can anybody tell me, what am I doing wrong or is the problem somewhere else?
Code:import sys, os, time from PySide import QtCore, QtGui, QtNetwork class thttp(): def __init__(self): self.http = QtNetwork.QHttp() self.http.connect(QtCore.SIGNAL("done(bool)"), self.httpDone) self.http.connect(QtCore.SIGNAL("requestStarted(int)"), self.httpRequestStarted) self.http.connect(QtCore.SIGNAL("requestFinished(int,bool)"), self.httpRequestFinished) self.http.setHost("maemo.org", 80) def httpDone(error): print "done:",error def httpRequestStarted(id): print "started:",id def httpRequestFinished(id, error): print "finished:",id,error t = thttp() t.http.get(str(QtCore.QUrl.toPercentEncoding("/index.html"))) time.sleep(15)

Reply With Quote

