From 13a208211edb4be970d04b977cc626aa5cdec261 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 2 Oct 2012 22:13:03 +0000 Subject: fix previous commit git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6266 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/snd/libkvisnd.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/modules/snd/libkvisnd.cpp') diff --git a/src/modules/snd/libkvisnd.cpp b/src/modules/snd/libkvisnd.cpp index 086d88fad..8df5d325e 100644 --- a/src/modules/snd/libkvisnd.cpp +++ b/src/modules/snd/libkvisnd.cpp @@ -238,13 +238,18 @@ void KviSoundPlayer::detectSoundSystem() #endif KVI_OPTION_STRING(KviOption_stringSoundSystem) = "oss"; #endif + #if (QT_VERSION < 0x050000) if(QSound::isAvailable()) +#else + // on qt5 QSound::isAvailable() is not available anymore + // Note: consider the use of QMediaPlayer + if(true) +#endif { KVI_OPTION_STRING(KviOption_stringSoundSystem) = "qt"; return; } -#endif KVI_OPTION_STRING(KviOption_stringSoundSystem) = "null"; #endif } @@ -359,15 +364,14 @@ bool KviSoundPlayer::playQt(const QString &szFileName) { if(isMuted()) return true; -#if (QT_VERSION < 0x050000) QSound::play(szFileName); -#endif return true; } void KviSoundPlayer::cleanupQt() { // how to stop Qt sounds ? + // using the play/stop slots instead of the static ::play (TODO) } bool KviSoundPlayer::playNull(const QString &) -- cgit v1.3.1-10-gc9f91