From ff1b2dab63fcd2384242e8d85216e8fd04d7cbe9 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Thu, 10 Oct 2019 15:26:56 +0000 Subject: [PATCH] Publish the coverage report, plus bug fixes. - Default theme level to Global, as per #48 - Make song delete message make more sense, fixes #64 - Publish the coverate report to OpenLP's GitLab page --- .gitlab-ci.yml | 17 +++++++++++++++++ openlp/core/common/settings.py | 2 +- openlp/plugins/songs/lib/mediaitem.py | 6 +++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 215f34951..7552b8385 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py index bbe0b731a..34efbc9e3 100644 --- a/openlp/core/common/settings.py +++ b/openlp/core/common/settings.py @@ -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(), diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 90e4e9098..1458d56ce 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -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()