use QDate instead of python datetime object

This commit is contained in:
Andreas Preikschat 2013-04-02 16:42:33 +02:00
parent 29d7b3411e
commit e3afbefd27
2 changed files with 2 additions and 3 deletions

View File

@ -126,7 +126,7 @@ class Settings(QtCore.QSettings):
u'general/has run wizard': False,
u'general/language': u'[en]',
# This defaults to yesterday in order to force the update check to run when you've never run it before.
u'general/last version test': datetime.datetime.now().date() - datetime.timedelta(days=1),
u'general/last version test': QtCore.QDate.currentDate().addDays(-1),
u'general/loop delay': 5,
u'general/recent files': [],
u'general/save prompt': False,

View File

@ -29,7 +29,6 @@
"""
The :mod:`openlp.core.utils` module provides the utility libraries for OpenLP.
"""
from datetime import datetime
from distutils.version import LooseVersion
import logging
import locale
@ -184,7 +183,7 @@ def check_latest_version(current_version):
settings = Settings()
settings.beginGroup(u'general')
last_test = settings.value(u'last version test')
this_test = datetime.now().date()
this_test = QtCore.QDate.currentDate()
settings.setValue(u'last version test', this_test)
settings.endGroup()
# Tell the main window whether there will ever be data to display