openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #28249
[Merge] lp:~thelinuxguy/openlp/strip-whitespace-from-titles-songbeamer-import into lp:openlp
Simon Hanna has proposed merging lp:~thelinuxguy/openlp/strip-whitespace-from-titles-songbeamer-import into lp:openlp.
Requested reviews:
Tim Bentley (trb143)
For more details, see:
https://code.launchpad.net/~thelinuxguy/openlp/strip-whitespace-from-titles-songbeamer-import/+merge/282037
Strip whitespace from title when importing a Songbeamer song.
--
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/songs/lib/importers/songbeamer.py'
--- openlp/plugins/songs/lib/importers/songbeamer.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/lib/importers/songbeamer.py 2016-01-08 17:32:13 +0000
@@ -242,7 +242,7 @@
elif tag_val[0] == '#TextAlign':
pass
elif tag_val[0] == '#Title':
- self.title = str(tag_val[1])
+ self.title = str(tag_val[1]).strip()
elif tag_val[0] == '#TitleAlign':
pass
elif tag_val[0] == '#TitleFontSize':
=== modified file 'tests/functional/openlp_core_lib/test_htmlbuilder.py'
--- tests/functional/openlp_core_lib/test_htmlbuilder.py 2015-11-07 00:49:40 +0000
+++ tests/functional/openlp_core_lib/test_htmlbuilder.py 2016-01-08 17:32:13 +0000
@@ -4,11 +4,11 @@
from unittest import TestCase
-from PyQt5 import QtCore
+from PyQt5 import QtCore, QtWebKit
from openlp.core.common import Settings
from openlp.core.lib.htmlbuilder import build_html, build_background_css, build_lyrics_css, build_lyrics_outline_css, \
- build_lyrics_format_css, build_footer_css
+ build_lyrics_format_css, build_footer_css, webkit_version
from openlp.core.lib.theme import HorizontalType, VerticalType
from tests.functional import MagicMock, patch
from tests.helpers.testmixin import TestMixin
@@ -358,3 +358,14 @@
# THEN: Footer should wrap
self.assertEqual(FOOTER_CSS_WRAP, css, 'The footer strings should be equal.')
+
+ def webkit_version_test(self):
+ """
+ Test the webkit_version() function
+ """
+ # GIVEN: Webkit
+ webkit_ver = float(QtWebKit.qWebKitVersion())
+ # WHEN: Retrieving the webkit version
+ # THEN: Webkit versions should match
+ self.assertEquals(webkit_version(), webkit_ver, "The returned webkit version doesn't match the installed one")
+
=== modified file 'tests/resources/songbeamersongs/Lobsinget dem Herrn.sng'
--- tests/resources/songbeamersongs/Lobsinget dem Herrn.sng 2014-04-16 08:25:17 +0000
+++ tests/resources/songbeamersongs/Lobsinget dem Herrn.sng 2016-01-08 17:32:13 +0000
@@ -1,5 +1,5 @@
#LangCount=1
-#Title=GL 1 - Lobsinget dem Herrn
+#Title= GL 1 - Lobsinget dem Herrn
#Author=Carl Brockhaus
#Melody=Johann Jakob Vetter
#Editor=SongBeamer 4.20
Follow ups