openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #15465
[Merge] lp:~googol/openlp/trivial2 into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/trivial2 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol/openlp/trivial2/+merge/104234
Hello,
- replaced numScreens by screenCount
numScreens() can be found in the docs until 4.5 (http://doc.trolltech.com/4.5/qdesktopwidget.html#numScreens) and in later versions we find screenCount() http://doc.trolltech.com/4.7/qdesktopwidget.html#screenCount-prop.
- removed 0 in range()
--
https://code.launchpad.net/~googol/openlp/trivial2/+merge/104234
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/trivial2 into lp:openlp.
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2012-04-23 19:19:13 +0000
+++ openlp/core/lib/mediamanageritem.py 2012-05-01 11:07:38 +0000
@@ -373,12 +373,12 @@
Process a list for files either from the File Dialog or from Drag and
Drop
- ``files``
- The files to be loaded
+ ``files``
+ The files to be loaded.
"""
names = []
fullList = []
- for count in range(0, self.listView.count()):
+ for count in range(self.listView.count()):
names.append(unicode(self.listView.item(count).text()))
fullList.append(unicode(self.listView.item(count).
data(QtCore.Qt.UserRole).toString()))
=== modified file 'openlp/core/ui/mediadockmanager.py'
--- openlp/core/ui/mediadockmanager.py 2011-12-27 10:33:55 +0000
+++ openlp/core/ui/mediadockmanager.py 2012-05-01 11:07:38 +0000
@@ -64,7 +64,7 @@
visible_title = media_item.plugin.getString(StringContent.VisibleName)
log.debug(u'Inserting %s dock' % visible_title[u'title'])
match = False
- for dock_index in range(0, self.media_dock.count()):
+ for dock_index in range(self.media_dock.count()):
if self.media_dock.widget(dock_index).settingsSection == \
media_item.plugin.name:
match = True
@@ -81,7 +81,7 @@
"""
visible_title = media_item.plugin.getString(StringContent.VisibleName)
log.debug(u'remove %s dock' % visible_title[u'title'])
- for dock_index in range(0, self.media_dock.count()):
+ for dock_index in range(self.media_dock.count()):
if self.media_dock.widget(dock_index):
if self.media_dock.widget(dock_index).settingsSection == \
media_item.plugin.name:
=== modified file 'openlp/core/ui/screen.py'
--- openlp/core/ui/screen.py 2011-12-29 17:50:42 +0000
+++ openlp/core/ui/screen.py 2012-05-01 11:07:38 +0000
@@ -106,13 +106,13 @@
"""
# Do not log at start up.
if changed_screen != -1:
- log.info(u'screen_count_changed %d' % self.desktop.numScreens())
+ log.info(u'screen_count_changed %d' % self.desktop.screenCount())
# Remove unplugged screens.
for screen in copy.deepcopy(self.screen_list):
- if screen[u'number'] == self.desktop.numScreens():
+ if screen[u'number'] == self.desktop.screenCount():
self.remove_screen(screen[u'number'])
# Add new screens.
- for number in xrange(0, self.desktop.numScreens()):
+ for number in xrange(self.desktop.screenCount()):
if not self.screen_exists(number):
self.add_screen({
u'number': number,
=== modified file 'openlp/core/ui/settingsform.py'
--- openlp/core/ui/settingsform.py 2012-04-23 19:19:13 +0000
+++ openlp/core/ui/settingsform.py 2012-05-01 11:07:38 +0000
@@ -92,7 +92,7 @@
"""
Process the form saving the settings
"""
- for tabIndex in range(0, self.stackedLayout.count()):
+ for tabIndex in range(self.stackedLayout.count()):
self.stackedLayout.widget(tabIndex).save()
# Must go after all settings are save
Receiver.send_message(u'config_updated')
@@ -102,7 +102,7 @@
"""
Process the form saving the settings
"""
- for tabIndex in range(0, self.stackedLayout.count()):
+ for tabIndex in range(self.stackedLayout.count()):
self.stackedLayout.widget(tabIndex).cancel()
return QtGui.QDialog.reject(self)
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2012-04-22 19:37:11 +0000
+++ openlp/core/ui/slidecontroller.py 2012-05-01 11:07:38 +0000
@@ -373,7 +373,7 @@
u'text': translate('OpenLP.SlideController', 'Go to "Ending"')},
{u'key': u'O', u'configurable': True,
u'text': translate('OpenLP.SlideController', 'Go to "Other"')}]
- shortcuts += [{u'key': unicode(number)} for number in range(0, 10)]
+ shortcuts += [{u'key': unicode(number)} for number in range(10)]
self.previewListWidget.addActions([create_action(self,
u'shortcutAction_%s' % s[u'key'], text=s.get(u'text'),
shortcuts=[QtGui.QKeySequence(s[u'key'])],
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py 2012-04-02 00:19:16 +0000
+++ openlp/plugins/custom/forms/editcustomform.py 2012-05-01 11:07:38 +0000
@@ -127,7 +127,7 @@
sxml.new_document()
sxml.add_lyrics_to_song()
count = 1
- for i in range(0, self.slideListView.count()):
+ for i in range(self.slideListView.count()):
sxml.add_verse_to_lyrics(u'custom', unicode(count),
unicode(self.slideListView.item(i).text()))
count += 1
@@ -170,7 +170,7 @@
Edits all slides.
"""
slide_list = u''
- for row in range(0, self.slideListView.count()):
+ for row in range(self.slideListView.count()):
item = self.slideListView.item(row)
slide_list += item.text()
if row != self.slideListView.count() - 1:
@@ -206,7 +206,7 @@
old_row = self.slideListView.currentRow()
# Create a list with all (old/unedited) slides.
old_slides = [self.slideListView.item(row).text() for row in \
- range(0, self.slideListView.count())]
+ range(self.slideListView.count())]
self.slideListView.clear()
old_slides.pop(old_row)
# Insert all slides to make the old_slides list complete.
=== modified file 'openlp/plugins/presentations/lib/powerpointcontroller.py'
--- openlp/plugins/presentations/lib/powerpointcontroller.py 2011-12-27 10:33:55 +0000
+++ openlp/plugins/presentations/lib/powerpointcontroller.py 2012-05-01 11:07:38 +0000
@@ -152,7 +152,7 @@
log.debug(u'create_thumbnails')
if self.check_thumbnails():
return
- for num in range(0, self.presentation.Slides.Count):
+ for num in range(self.presentation.Slides.Count):
self.presentation.Slides(num + 1).Export(os.path.join(
self.get_thumbnail_folder(), 'slide%d.png' % (num + 1)),
'png', 320, 240)
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2012-04-03 17:59:34 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2012-05-01 11:07:38 +0000
@@ -336,7 +336,7 @@
Tag the Song List rows based on the verse list
"""
row_label = []
- for row in range(0, self.verseListWidget.rowCount()):
+ for row in range(self.verseListWidget.rowCount()):
item = self.verseListWidget.item(row, 0)
verse_def = unicode(item.data(QtCore.Qt.UserRole).toString())
verse_tag = VerseType.translated_tag(verse_def[0])
@@ -494,7 +494,7 @@
if len(tempText.split(u'\n')) != len(after_text.split(u'\n')):
tempList = {}
tempId = {}
- for row in range(0, self.verseListWidget.rowCount()):
+ for row in range(self.verseListWidget.rowCount()):
tempList[row] = self.verseListWidget.item(row, 0)\
.text()
tempId[row] = self.verseListWidget.item(row, 0)\
@@ -511,7 +511,7 @@
def onVerseEditAllButtonClicked(self):
verse_list = u''
if self.verseListWidget.rowCount() > 0:
- for row in range(0, self.verseListWidget.rowCount()):
+ for row in range(self.verseListWidget.rowCount()):
item = self.verseListWidget.item(row, 0)
field = unicode(item.data(QtCore.Qt.UserRole).toString())
verse_tag = VerseType.translated_name(field[0])
@@ -579,7 +579,7 @@
verses = []
verse_names = []
order = self.__extractVerseOrder(text)
- for index in range(0, self.verseListWidget.rowCount()):
+ for index in range(self.verseListWidget.rowCount()):
verse = self.verseListWidget.item(index, 0)
verse = unicode(verse.data(QtCore.Qt.UserRole).toString())
if verse not in verse_names:
@@ -620,7 +620,7 @@
verse_names = []
order_names = unicode(verse_order).split()
order = self.__extractVerseOrder(verse_order)
- for index in range(0, verse_count):
+ for index in range(verse_count):
verse = self.verseListWidget.item(index, 0)
verse = unicode(verse.data(QtCore.Qt.UserRole).toString())
if verse not in verse_names:
@@ -920,7 +920,7 @@
try:
sxml = SongXML()
multiple = []
- for i in range(0, self.verseListWidget.rowCount()):
+ for i in range(self.verseListWidget.rowCount()):
item = self.verseListWidget.item(i, 0)
verseId = unicode(item.data(QtCore.Qt.UserRole).toString())
verse_tag = verseId[0]
=== modified file 'openlp/plugins/songs/lib/cclifileimport.py'
--- openlp/plugins/songs/lib/cclifileimport.py 2012-03-15 22:38:03 +0000
+++ openlp/plugins/songs/lib/cclifileimport.py 2012-05-01 11:07:38 +0000
@@ -185,7 +185,7 @@
check_first_verse_line = False
field_list = song_fields.split(u'/t')
words_list = song_words.split(u'/t')
- for counter in range(0, len(field_list)):
+ for counter in range(len(field_list)):
if field_list[counter].startswith(u'Ver'):
verse_type = VerseType.Tags[VerseType.Verse]
elif field_list[counter].startswith(u'Ch'):
Follow ups