Memory improvements and additional logging

This commit is contained in:
Tim Bentley 2011-03-12 17:02:24 +00:00
parent 21679d6a1a
commit 0fe62c3591
3 changed files with 5 additions and 7 deletions

View File

@ -184,8 +184,7 @@ class OpenLP(QtGui.QApplication):
# make sure Qt really display the splash screen
self.processEvents()
# start the main app window
self.appClipboard = self.clipboard()
self.mainWindow = MainWindow(screens, app_version, self.appClipboard,
self.mainWindow = MainWindow(screens, app_version, self.clipboard(),
has_run_wizard)
self.mainWindow.show()
if show_splash:

View File

@ -55,10 +55,7 @@ class PluginManager(object):
sys.path.insert(0, plugin_dir)
self.basepath = os.path.abspath(plugin_dir)
log.debug(u'Base path %s ', self.basepath)
self.plugin_helpers = []
self.plugins = []
# this has to happen after the UI is sorted
# self.find_plugins(plugin_dir)
log.info(u'Plugin manager Initialised')
def find_plugins(self, plugin_dir, plugin_helpers):
@ -73,7 +70,7 @@ class PluginManager(object):
A list of helper objects to pass to the plugins.
"""
#self.plugin_helpers = plugin_helpers
log.info(u'Finding plugins')
startdepth = len(os.path.abspath(plugin_dir).split(os.sep))
log.debug(u'finding plugins in %s at depth %d',
unicode(plugin_dir), startdepth)
@ -203,6 +200,7 @@ class PluginManager(object):
Loop through all the plugins and give them an opportunity to
initialise themselves.
"""
log.info(u'Initialise Plugings - Started')
for plugin in self.plugins:
log.info(u'initialising plugins %s in a %s state'
% (plugin.name, plugin.isActive()))
@ -211,6 +209,7 @@ class PluginManager(object):
log.info(u'Initialisation Complete for %s ' % plugin.name)
if not plugin.isActive():
plugin.removeToolboxItem()
log.info(u'Initialise Plugings - Finished')
def finalise_plugins(self):
"""

View File

@ -48,7 +48,7 @@ class OpenLPToolbar(QtGui.QToolBar):
self.icons = {}
self.setIconSize(QtCore.QSize(20, 20))
self.actions = {}
log.debug(u'Init done')
log.debug(u'Init done for %s' % parent.__class__.__name__)
def addToolbarButton(self, title, icon, tooltip=None, slot=None,
checkable=False, shortcut=0, alternate=0,