forked from openlp/openlp
Cleanups
This commit is contained in:
parent
1005a3c1b1
commit
e3a07c1e57
@ -424,8 +424,8 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
xml_data = xml_data.decode(u'utf-8')
|
xml_data = xml_data.decode(u'utf-8')
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
log.exception(u'Theme XML is not UTF-8 '
|
log.exception(u'Theme XML is not UTF-8 '
|
||||||
'encoded.')
|
u'encoded.')
|
||||||
break;
|
break
|
||||||
if self.checkVersion1(xml_data):
|
if self.checkVersion1(xml_data):
|
||||||
# upgrade theme xml
|
# upgrade theme xml
|
||||||
filexml = self.migrateVersion122(xml_data)
|
filexml = self.migrateVersion122(xml_data)
|
||||||
|
@ -71,9 +71,9 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
|
|||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
log.debug(u'Detailed report generated')
|
log.debug(u'Detailed report generated')
|
||||||
filename = u'usage_detail_%s_%s.txt' %
|
filename = u'usage_detail_%s_%s.txt' % (
|
||||||
(self.FromDate.selectedDate().toString(u'ddMMyyyy'),
|
self.FromDate.selectedDate().toString(u'ddMMyyyy'),
|
||||||
self.ToDate.selectedDate().toString(u'ddMMyyyy'))
|
self.ToDate.selectedDate().toString(u'ddMMyyyy'))
|
||||||
usage = self.parent.songusagemanager.get_all_songusage(
|
usage = self.parent.songusagemanager.get_all_songusage(
|
||||||
self.FromDate.selectedDate(), self.ToDate.selectedDate())
|
self.FromDate.selectedDate(), self.ToDate.selectedDate())
|
||||||
outname = os.path.join(unicode(self.FileLineEdit.text()), filename)
|
outname = os.path.join(unicode(self.FileLineEdit.text()), filename)
|
||||||
|
@ -53,7 +53,7 @@ class SongUsageManager(object):
|
|||||||
db_type = unicode(
|
db_type = unicode(
|
||||||
settings.value(u'db type', QtCore.QVariant(u'sqlite')).toString())
|
settings.value(u'db type', QtCore.QVariant(u'sqlite')).toString())
|
||||||
if db_type == u'sqlite':
|
if db_type == u'sqlite':
|
||||||
self.db_url = u'sqlite:///%s/songusage.sqlite' %
|
self.db_url = u'sqlite:///%s/songusage.sqlite' % \
|
||||||
AppLocation.get_section_data_path(u'songusage')
|
AppLocation.get_section_data_path(u'songusage')
|
||||||
else:
|
else:
|
||||||
self.db_url = u'%s://%s:%s@%s/%s' % (db_type,
|
self.db_url = u'%s://%s:%s@%s/%s' % (db_type,
|
||||||
|
Loading…
Reference in New Issue
Block a user