openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #19924
[Merge] lp:~googol/openlp/random-regression-bugs into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/random-regression-bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol/openlp/random-regression-bugs/+merge/152839
Hello,
- fixed traceback shown when adding media to the service manager
- fixed SIP regression
--
https://code.launchpad.net/~googol/openlp/random-regression-bugs/+merge/152839
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/random-regression-bugs into lp:openlp.
=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py 2013-03-07 12:59:35 +0000
+++ openlp/core/ui/media/mediacontroller.py 2013-03-12 08:23:25 +0000
@@ -440,7 +440,7 @@
controller.media_info = MediaInfo()
controller.media_info.volume = 0
controller.media_info.file_info = QtCore.QFileInfo(service_item.get_frame_path())
- display = controller._display
+ display = controller.preview_display
if not self._check_file_type(controller, display, service_item):
# Media could not be loaded correctly
critical_error_message_box(translate('MediaPlugin.MediaItem', 'Unsupported File'),
=== modified file 'openlp/core/ui/media/webkitplayer.py'
--- openlp/core/ui/media/webkitplayer.py 2013-03-06 22:54:16 +0000
+++ openlp/core/ui/media/webkitplayer.py 2013-03-12 08:23:25 +0000
@@ -450,7 +450,7 @@
currentTime = display.frame.evaluateJavaScript(u'show_flash("currentTime");')
length = display.frame.evaluateJavaScript(u'show_flash("length");')
else:
- if display.frame.evaluateJavaScript(u'show_video("isEnded");') == 'true':
+ if display.frame.evaluateJavaScript(u'show_video("isEnded");'):
self.stop(display)
currentTime = display.frame.evaluateJavaScript(u'show_video("currentTime");')
# check if conversion was ok and value is not 'NaN'
=== modified file 'tests/functional/openlp_core_lib/test_image_manager.py'
--- tests/functional/openlp_core_lib/test_image_manager.py 2013-02-18 20:40:40 +0000
+++ tests/functional/openlp_core_lib/test_image_manager.py 2013-03-12 08:23:25 +0000
@@ -5,7 +5,7 @@
import os
from unittest import TestCase
-from PyQt4 import QtGui
+from PyQt4 import QtCore, QtGui
from openlp.core.lib import Registry, ImageManager, ScreenList
@@ -43,6 +43,12 @@
# THEN returned record is a type of image
self.assertEqual(isinstance(image, QtGui.QImage), True, u'The returned object should be a QImage')
+ # WHEN: The image bytes are requested.
+ byte_array = self.image_manager.get_image_bytes(TEST_PATH, u'church.jpg')
+
+ # THEN: Type should be a byte array.
+ self.assertEqual(isinstance(byte_array, QtCore.QByteArray), True, u'The returned object should be a QByteArray')
+
# WHEN the image is retrieved has not been loaded
# THEN a KeyError is thrown
with self.assertRaises(KeyError) as context:
Follow ups