(qt) #5239 'client should have the option to play a sound when the download completes' -- use QApplication::beep() on OS X and Mac. Patch by rb07

This commit is contained in:
Jordan Lee 2013-01-21 21:48:52 +00:00
parent 0da726e639
commit 2262c7c565
1 changed files with 7 additions and 1 deletions

View File

@ -288,7 +288,13 @@ MyApp :: onTorrentCompleted( int id )
notify (tr("Torrent Completed"), tor->name());
if (myPrefs->getBool (Prefs::COMPLETE_SOUND_ENABLED))
QProcess::execute (myPrefs->getString(Prefs::COMPLETE_SOUND_COMMAND));
{
#if defined( Q_OS_WIN ) || defined( Q_OS_MAC )
QApplication::beep();
#else
QProcess::execute (myPrefs->getString(Prefs::COMPLETE_SOUND_COMMAND));
#endif
}
disconnect( tor, SIGNAL(torrentCompleted(int)), this, SLOT(onTorrentCompleted(int)) );
}