forked from openlp/openlp
moved application creation
This commit is contained in:
parent
d78373e65e
commit
fab327c89f
@ -5,4 +5,9 @@ sip.setapi(u'QString', 2)
|
|||||||
sip.setapi(u'QTextStream', 2)
|
sip.setapi(u'QTextStream', 2)
|
||||||
sip.setapi(u'QTime', 2)
|
sip.setapi(u'QTime', 2)
|
||||||
sip.setapi(u'QUrl', 2)
|
sip.setapi(u'QUrl', 2)
|
||||||
sip.setapi(u'QVariant', 2)
|
sip.setapi(u'QVariant', 2)
|
||||||
|
|
||||||
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
|
# Only one QApplication can be created. Use QtGui.QApplication.instance() when you need to "create" a QApplication.
|
||||||
|
application = QtGui.QApplication([])
|
||||||
|
@ -26,7 +26,7 @@ class TestPluginManager(TestCase):
|
|||||||
Settings().set_filename(self.ini_file)
|
Settings().set_filename(self.ini_file)
|
||||||
Registry.create()
|
Registry.create()
|
||||||
Registry().register(u'service_list', MagicMock())
|
Registry().register(u'service_list', MagicMock())
|
||||||
self.app = QtGui.QApplication([])
|
self.app = QtGui.QApplication.instance()
|
||||||
self.main_window = QtGui.QMainWindow()
|
self.main_window = QtGui.QMainWindow()
|
||||||
Registry().register(u'main_window', self.main_window)
|
Registry().register(u'main_window', self.main_window)
|
||||||
self.plugins_dir = os.path.abspath(os.path.join(os.path.basename(__file__), u'..', u'openlp', u'plugins'))
|
self.plugins_dir = os.path.abspath(os.path.join(os.path.basename(__file__), u'..', u'openlp', u'plugins'))
|
||||||
|
Loading…
Reference in New Issue
Block a user