From 4602a1a7ac1f4b2fd33bb1581f4eedd1edd65a9c Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 25 Sep 2012 13:15:57 +0000 Subject: qt5 support (sip): code only, no touch to build system by now git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6251 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/snd/libkvisnd.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/modules/snd/libkvisnd.cpp') diff --git a/src/modules/snd/libkvisnd.cpp b/src/modules/snd/libkvisnd.cpp index 5f62e929f..4db392865 100644 --- a/src/modules/snd/libkvisnd.cpp +++ b/src/modules/snd/libkvisnd.cpp @@ -34,7 +34,12 @@ #include "KviLocale.h" #include "KviQString.h" -#include +#warning in libkvisnd to use QSound we need proper cmake rules and includes for QtMultimedia + +#if (QT_VERSION < 0x050000) + #include +#endif + #ifdef COMPILE_PHONON_SUPPORT #include @@ -238,13 +243,13 @@ void KviSoundPlayer::detectSoundSystem() #endif KVI_OPTION_STRING(KviOption_stringSoundSystem) = "oss"; #endif - +#if (QT_VERSION < 0x050000) if(QSound::isAvailable()) { KVI_OPTION_STRING(KviOption_stringSoundSystem) = "qt"; return; } - +#endif KVI_OPTION_STRING(KviOption_stringSoundSystem) = "null"; #endif } @@ -359,7 +364,9 @@ bool KviSoundPlayer::playQt(const QString &szFileName) { if(isMuted()) return true; +#if (QT_VERSION < 0x050000) QSound::play(szFileName); +#endif return true; } @@ -859,6 +866,3 @@ KVIRC_MODULE( 0 ) -#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES -#include "libkvisnd.moc" -#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES -- cgit v1.3.1-10-gc9f91