Merge branch 'publish-coverage' into 'master'

Publish coverage, plus bug fixes

Closes #48 and #64

See merge request openlp/openlp!39
This commit is contained in:
Tim Bentley 2019-10-10 15:26:56 +00:00
commit bf3201003d
3 changed files with 21 additions and 4 deletions

View File

@ -1,6 +1,7 @@
stages:
- lint
- test
- deploy
lint:
stage: lint
@ -17,6 +18,9 @@ test-debian:
- sh scripts/generate_resources.sh
script:
- xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings --ignore tests/functional/openlp_plugins/presentations/test_pdfcontroller.py --cov openlp --cov-report term --cov-report html
artifacts:
paths:
- htmlcov
test-ubuntu:
stage: test
@ -53,3 +57,16 @@ test-macos:
- python3 -m pytest --color=no --disable-warnings
only:
- master@openlp/openlp
pages:
stage: deploy
script:
- mv htmlcov public
artifacts:
paths:
- public
expire_in: 30 days
dependencies:
- test-debian
only:
- master@openlp/openlp

View File

@ -226,7 +226,7 @@ class Settings(QtCore.QSettings):
'themes/last directory': None,
'themes/last directory export': None,
'themes/last directory import': None,
'themes/theme level': ThemeLevel.Song,
'themes/theme level': ThemeLevel.Global,
'themes/wrap footer': False,
'user interface/live panel': True,
'user interface/live splitter geometry': QtCore.QByteArray(),

View File

@ -509,12 +509,12 @@ class SongMediaItem(MediaManagerItem):
Remove a song from the list and database
"""
if check_item_selected(self.list_view, UiStrings().SelectDelete):
items = self.list_view.selectedIndexes()
items = self.list_view.selectedItems()
if QtWidgets.QMessageBox.question(
self, UiStrings().ConfirmDelete,
translate('SongsPlugin.MediaItem',
'Are you sure you want to delete the "{items:d}" '
'selected song(s)?').format(items=len(items)),
'Are you sure you want to delete the following songs?') +
'\n\n- {songs}'.format(songs='\n- '.join([item.text() for item in items])),
defaultButton=QtWidgets.QMessageBox.Yes) == QtWidgets.QMessageBox.No:
return
self.application.set_busy_cursor()