forked from openlp/openlp
Renamed the versionThread class to VersionThread to fit with our coding standards.
This commit is contained in:
parent
16ea5dd0ad
commit
1e79260c5c
@ -53,13 +53,21 @@ media_manager_style = """
|
|||||||
border-color: palette(button);
|
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):
|
def __init__(self, parent, app_version, generalConfig):
|
||||||
QtCore.QThread.__init__(self, parent)
|
QtCore.QThread.__init__(self, parent)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.app_version = app_version
|
self.app_version = app_version
|
||||||
self.generalConfig = generalConfig
|
self.generalConfig = generalConfig
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
"""
|
||||||
|
Run the thread.
|
||||||
|
"""
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
version = check_latest_version(self.generalConfig, self.app_version)
|
version = check_latest_version(self.generalConfig, self.app_version)
|
||||||
#new version has arrived
|
#new version has arrived
|
||||||
@ -586,7 +594,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
def versionThread(self):
|
def versionThread(self):
|
||||||
app_version = self.applicationVersion[u'full']
|
app_version = self.applicationVersion[u'full']
|
||||||
vT = versionThread(self, app_version, self.generalConfig)
|
vT = VersionThread(self, app_version, self.generalConfig)
|
||||||
vT.start()
|
vT.start()
|
||||||
|
|
||||||
def onHelpAboutItemClicked(self):
|
def onHelpAboutItemClicked(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user