Commit f1cc7239 authored by Laurent Montel's avatar Laurent Montel 😁

Clean up

parent 5f33bef0
......@@ -58,7 +58,7 @@ set(AKONADINOTES_LIB_VERSION "5.10.80")
set(QT_REQUIRED_VERSION "5.10.0")
option(KDEPIM_ENTERPRISE_BUILD "Enable features specific to the enterprise branch, which are normally disabled. Also, it disables many components not needed for Kontact such as the Kolab client." FALSE)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Gui Widgets Test UiTools)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Gui Widgets Test UiTools Multimedia)
set(KDEPIM_APPS_LIB_VERSION_LIB "5.10.80")
set(PIMCOMMON_LIB_VERSION_LIB "5.10.80")
set(LIBKDEPIM_LIB_VERSION_LIB "5.10.80")
......
......@@ -63,13 +63,13 @@ target_link_libraries(korgac
KF5::MailTransportAkonadi
KF5::Codecs
KF5::DBusAddons
Phonon::phonon4qt5
KF5::Notifications
KF5::Completion
KF5::IconThemes
KF5::Service
KF5::KIOCore
KF5::WindowSystem
Qt5::Multimedia
)
install(TARGETS
......
......@@ -59,7 +59,7 @@
#include <KWindowSystem>
#include <KIconLoader>
#include <QIcon>
#include <phonon/mediaobject.h>
#include <QMediaPlayer>
#include <QLabel>
#include <QKeyEvent>
#include <QSpinBox>
......@@ -711,12 +711,16 @@ void AlarmDialog::eventNotification()
QProcess::startDetached(program + QLatin1Char(' ') + alarm->programArguments());
} else if (alarm->type() == Alarm::Audio) {
beeped = true;
Phonon::MediaObject *player
= Phonon::createPlayer(Phonon::NotificationCategory,
QUrl::fromLocalFile(alarm->audioFile()));
QMediaPlayer *player = new QMediaPlayer;
player->setMedia(QUrl::fromLocalFile(alarm->audioFile()));
player->setVolume(50);
player->setParent(this);
connect(player, &Phonon::MediaObject::finished, player,
&Phonon::MediaObject::deleteLater);
connect(player, &QMediaPlayer::stateChanged, this, [this, player](QMediaPlayer::State state) {
if (state == QMediaPlayer::StoppedState) {
player->deleteLater();
}
});
player->play();
} else if (alarm->type() == Alarm::Email) {
QString from = CalendarSupport::KCalPrefs::instance()->email();
......
......@@ -31,7 +31,7 @@ target_link_libraries(testalarmdlg
KF5::CalendarUtils
KF5::IdentityManagement
KF5::MailTransport
Phonon::phonon4qt5
Qt5::Multimedia
KF5::Notifications
KF5::IconThemes
KF5::WindowSystem
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment