Fix CMakeLists to include QtMultimedia tests + fix audio test.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
28d0c480b1
commit
c62c36a64d
2 changed files with 14 additions and 0 deletions
|
|
@ -25,6 +25,18 @@ macro(PYSIDE_TEST)
|
||||||
WILL_FAIL ${EXPECT_TO_FAIL})
|
WILL_FAIL ${EXPECT_TO_FAIL})
|
||||||
endmacro(PYSIDE_TEST)
|
endmacro(PYSIDE_TEST)
|
||||||
|
|
||||||
|
# Try to find QtMultimedia
|
||||||
|
# TODO: Remove this hack when cmake support QtMultimedia module
|
||||||
|
if (NOT QT_QTMULTIMEDIA_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
|
||||||
|
find_path(QT_QTMULTIMEDIA_INCLUDE_DIR QtMultimedia
|
||||||
|
PATHS ${QT_HEADERS_DIR}/QtMultimedia
|
||||||
|
${QT_LIBRARY_DIR}/QtMultimedia.framework/Headers
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
find_library(QT_QTMULTIMEDIA_LIBRARY QtMultimedia PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
|
||||||
|
if (QT_QTMULTIMEDIA_INCLUDE_DIR AND QT_QTMULTIMEDIA_LIBRARY)
|
||||||
|
set(QT_QTMULTIMEDIA_FOUND ON)
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
add_subdirectory(signals)
|
add_subdirectory(signals)
|
||||||
TEST_QT_MODULE(QT_QTCORE_FOUND QtCore)
|
TEST_QT_MODULE(QT_QTCORE_FOUND QtCore)
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ class testAudioDevices(unittest.TestCase):
|
||||||
|
|
||||||
def testListDevices(self):
|
def testListDevices(self):
|
||||||
for devInfo in QAudioDeviceInfo.availableDevices(QAudio.AudioOutput):
|
for devInfo in QAudioDeviceInfo.availableDevices(QAudio.AudioOutput):
|
||||||
|
if devInfo.deviceName() == 'null':
|
||||||
|
continue
|
||||||
fmt = QAudioFormat()
|
fmt = QAudioFormat()
|
||||||
for codec in devInfo.supportedCodecs():
|
for codec in devInfo.supportedCodecs():
|
||||||
fmt.setCodec(codec)
|
fmt.setCodec(codec)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue