From 1e79260c5c01aa0fe6947a8441097df519457188 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 9 Mar 2010 22:29:45 +0200 Subject: [PATCH] Renamed the versionThread class to VersionThread to fit with our coding standards. --- openlp/core/ui/mainwindow.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 01f3cabbe..41b6d245f 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -53,13 +53,21 @@ media_manager_style = """ border-color: palette(button); } """ -class versionThread(QtCore.QThread): +class VersionThread(QtCore.QThread): + """ + A special Qt thread class to fetch the version of OpenLP from the website. + This is threaded so that it doesn't affect the loading time of OpenLP. + """ def __init__(self, parent, app_version, generalConfig): QtCore.QThread.__init__(self, parent) self.parent = parent self.app_version = app_version self.generalConfig = generalConfig - def run (self): + + def run(self): + """ + Run the thread. + """ time.sleep(2) version = check_latest_version(self.generalConfig, self.app_version) #new version has arrived @@ -586,7 +594,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): def versionThread(self): app_version = self.applicationVersion[u'full'] - vT = versionThread(self, app_version, self.generalConfig) + vT = VersionThread(self, app_version, self.generalConfig) vT.start() def onHelpAboutItemClicked(self):