aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/snd/libkvisnd.cpp
diff options
context:
space:
mode:
authorGravatar Fabio Bas2012-10-02 22:13:03 +0000
committerGravatar Fabio Bas2012-10-02 22:13:03 +0000
commit13a208211edb4be970d04b977cc626aa5cdec261 (patch)
tree480673254eb6eda240f89d25cc584bd366d6adcd /src/modules/snd/libkvisnd.cpp
parentSome more qt5 porting (diff)
downloadKVIrc-13a208211edb4be970d04b977cc626aa5cdec261.tar.gz
KVIrc-13a208211edb4be970d04b977cc626aa5cdec261.tar.bz2
KVIrc-13a208211edb4be970d04b977cc626aa5cdec261.zip
fix previous commit
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6266 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/snd/libkvisnd.cpp')
-rw-r--r--src/modules/snd/libkvisnd.cpp10
1 files changed, 7 insertions, 3 deletions
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 &)