summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/app.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-03-10 03:27:10 -0400
committerKali Kaneko <kali@leap.se>2014-03-10 03:27:10 -0400
commitb762e09f6f20c07fccc66325079584213388102d (patch)
treee05bb63f227a46c7f4c1aefe5a766408230a3169 /src/leap/bitmask/app.py
parent92290fa7df14fd6282b362dba39b01c562a5725c (diff)
parent2f46572ef137bb20c04f443a36361569b4b9e120 (diff)
Merge remote-tracking branch 'chiiph/feature/remove_qtreactor' into develop
Diffstat (limited to 'src/leap/bitmask/app.py')
-rw-r--r--src/leap/bitmask/app.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index 1146d1d0..a1f3a69f 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -58,6 +58,9 @@ from leap.bitmask.services.mail import plumber
from leap.common.events import server as event_server
from leap.mail import __version__ as MAIL_VERSION
+from twisted.internet import reactor
+from twisted.internet.task import LoopingCall
+
import codecs
codecs.register(lambda name: codecs.lookup('utf-8')
if name == 'cp65001' else None)
@@ -74,12 +77,6 @@ def sigint_handler(*args, **kwargs):
mainwindow.quit()
-def install_qtreactor(logger):
- import qt4reactor
- qt4reactor.install()
- logger.debug("Qt4 reactor installed")
-
-
def add_logger_handlers(debug=False, logfile=None, replace_stdout=True):
"""
Create the logger and attach the handlers.
@@ -274,9 +271,6 @@ def main():
app = QtGui.QApplication(sys.argv)
- # install the qt4reactor.
- install_qtreactor(logger)
-
# To test:
# $ LANG=es ./app.py
locale = QtCore.QLocale.system().name()
@@ -319,8 +313,9 @@ def main():
#tx_app = leap_services()
#assert(tx_app)
- # Run main loop
- twisted_main.start(app)
+ l = LoopingCall(QtCore.QCoreApplication.processEvents, 0, 10)
+ l.start(0.01)
+ reactor.run()
if __name__ == "__main__":
main()