diff --git a/retroshare-gui/src/gui/SoundManager.cpp b/retroshare-gui/src/gui/SoundManager.cpp index f15988684..a2b48672c 100644 --- a/retroshare-gui/src/gui/SoundManager.cpp +++ b/retroshare-gui/src/gui/SoundManager.cpp @@ -37,14 +37,6 @@ #define GROUP_ENABLE "Enable" #define GROUP_SOUNDFILE "SoundFilePath" -#ifdef UBUNTU -#include -#include -#include - -Phonon::MediaObject *SoundManager::mediaObject = NULL ; -#endif - SoundManager *soundManager = NULL; SoundEvents::SoundEvents() @@ -243,23 +235,11 @@ void SoundManager::playFile(const QString &filename) QString playFilename = realFilename(filename); -#ifdef UBUNTU - // The media object is only deleted before being used, so as to avoid a memory leak. We cannot delete it after calling play() because the - // playing is asynchronous. The way to do this properly would be to connect the finish() signal of the player to some slot that delete it, - // assuming it's not done in a static method like now. - - if(mediaObject != NULL) - delete mediaObject ; - - mediaObject = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(QUrl::fromLocalFile(filename))); - mediaObject->play(); -#else - #if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0) if (!QAudioDeviceInfo::availableDevices(QAudio::AudioOutput).isEmpty()) #else if (QSound::isAvailable()) #endif QSound::play(playFilename); -#endif } + diff --git a/retroshare-gui/src/gui/SoundManager.h b/retroshare-gui/src/gui/SoundManager.h index 569a95ee6..6473f8e7b 100644 --- a/retroshare-gui/src/gui/SoundManager.h +++ b/retroshare-gui/src/gui/SoundManager.h @@ -30,10 +30,6 @@ #define SOUND_MESSAGE_ARRIVED "MessageArrived" #define SOUND_DOWNLOAD_COMPLETE "DownloadComplete" -#ifdef UBUNTU -#include -#endif - class SoundEvents { public: @@ -91,9 +87,6 @@ public: private: SoundManager(); -#ifdef UBUNTU - static Phonon::MediaObject *mediaObject ; -#endif }; extern SoundManager *soundManager; diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index feba1cdcc..963a6b20f 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -66,7 +66,6 @@ linux-* { PKGCONFIG *= x11 xscrnsaver - LIBS *= -lphonon LIBS *= -rdynamic DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions DEFINES *= UBUNTU