forked from openlp/openlp
Fix unused var and standardise loop vars
This commit is contained in:
parent
8480da6e08
commit
003cfd1e68
@ -122,7 +122,7 @@ class OpenLP(QtGui.QApplication):
|
||||
show_splash = QtCore.QSettings().value(
|
||||
u'general/show splash', QtCore.QVariant(True)).toBool()
|
||||
if show_splash:
|
||||
self.splash = SplashScreen(self.applicationVersion())
|
||||
self.splash = SplashScreen()
|
||||
self.splash.show()
|
||||
# make sure Qt really display the splash screen
|
||||
self.processEvents()
|
||||
|
@ -27,7 +27,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
class SplashScreen(object):
|
||||
def __init__(self, version):
|
||||
def __init__(self):
|
||||
self.splash_screen = QtGui.QSplashScreen()
|
||||
self.setupUi()
|
||||
|
||||
|
@ -118,11 +118,11 @@ def parse_reference(reference):
|
||||
unified_ref_list.append((book, chapter, vr1_start, vr1_end))
|
||||
vr2_end = check_end(match.group(6))
|
||||
if int(match.group(4)) > chapter:
|
||||
for x in range(chapter + 1, int(match.group(4)) + 1):
|
||||
if x == int(match.group(4)):
|
||||
unified_ref_list.append((book, x, 1, vr2_end))
|
||||
for i in range(chapter + 1, int(match.group(4)) + 1):
|
||||
if i == int(match.group(4)):
|
||||
unified_ref_list.append((book, i, 1, vr2_end))
|
||||
else:
|
||||
unified_ref_list.append((book, x, 1, -1))
|
||||
unified_ref_list.append((book, i, 1, -1))
|
||||
elif match.group(4):
|
||||
# Chapter range or chapter and verse range
|
||||
if match.group(3):
|
||||
@ -134,8 +134,8 @@ def parse_reference(reference):
|
||||
log.debug(u'Ambiguous reference: %s' % reference)
|
||||
return None
|
||||
elif match.group(4) != u'end':
|
||||
for x in range(chapter, int(match.group(4)) + 1):
|
||||
unified_ref_list.append((book, x, 1, -1))
|
||||
for i in range(chapter, int(match.group(4)) + 1):
|
||||
unified_ref_list.append((book, i, 1, -1))
|
||||
else:
|
||||
log.debug(u'Unsupported reference: %s' % reference)
|
||||
return None
|
||||
|
@ -158,7 +158,7 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
|
||||
sxml.new_document()
|
||||
sxml.add_lyrics_to_song()
|
||||
count = 1
|
||||
for i in range (0, self.verseListView.count()):
|
||||
for i in range(0, self.verseListView.count()):
|
||||
sxml.add_verse_to_lyrics(u'custom', unicode(count),
|
||||
unicode(self.verseListView.item(i).text()))
|
||||
count += 1
|
||||
|
@ -663,7 +663,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
sxml = SongXMLBuilder()
|
||||
text = u''
|
||||
multiple = []
|
||||
for i in range (0, self.VerseListWidget.rowCount()):
|
||||
for i in range(0, self.VerseListWidget.rowCount()):
|
||||
item = self.VerseListWidget.item(i, 0)
|
||||
verseId = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
bits = verseId.split(u':')
|
||||
|
Loading…
Reference in New Issue
Block a user