Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 88789c7d authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Revert "Clean up" (revert switch from Phonon to QtMultimedia)

This reverts commit f1cc7239.
parent b2bf3439
......@@ -58,7 +58,7 @@ set(AKONADINOTES_LIB_VERSION "5.10.90")
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 Multimedia)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Gui Widgets Test UiTools)
set(KDEPIM_APPS_LIB_VERSION_LIB "5.10.90")
set(PIMCOMMON_LIB_VERSION_LIB "5.10.90")
set(LIBKDEPIM_LIB_VERSION_LIB "5.10.90")
......
......@@ -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 <QMediaPlayer>
#include <phonon/mediaobject.h>
#include <QLabel>
#include <QKeyEvent>
#include <QSpinBox>
......@@ -711,16 +711,12 @@ void AlarmDialog::eventNotification()
QProcess::startDetached(program + QLatin1Char(' ') + alarm->programArguments());
} else if (alarm->type() == Alarm::Audio) {
beeped = true;
QMediaPlayer *player = new QMediaPlayer;
player->setMedia(QUrl::fromLocalFile(alarm->audioFile()));
player->setVolume(50);
Phonon::MediaObject *player
= Phonon::createPlayer(Phonon::NotificationCategory,
QUrl::fromLocalFile(alarm->audioFile()));
player->setParent(this);
connect(player, &QMediaPlayer::stateChanged, this, [this, player](QMediaPlayer::State state) {
if (state == QMediaPlayer::StoppedState) {
player->deleteLater();
}
});
connect(player, &Phonon::MediaObject::finished, player,
&Phonon::MediaObject::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
Qt5::Multimedia
Phonon::phonon4qt5
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