Fix QXcbEventReader segfault in worker process used for rendering splash screen on linux

This commit is contained in:
Kovid Goyal 2015-02-04 13:32:56 +05:30
parent acfff78330
commit 5a0fb8eaf9

View File

@ -135,13 +135,14 @@ class CalibreSplashScreen(QSplashScreen):
def main():
os.closerange(3, 256)
from calibre.gui2 import Application
app = Application([])
app = QApplication([])
s = CalibreSplashScreen()
s.show_message.connect(s.showMessage, type=Qt.QueuedConnection)
s.shutdown.connect(app.quit, type=Qt.QueuedConnection)
s.show()
Thread(target=run_loop, args=(s,)).start()
t = Thread(target=run_loop, args=(s,))
t.daemon = True
t.start()
app.exec_()
if isosx: