Merge lp:~phablet-team/qtubuntu-camera/audio-role into lp:qtubuntu-camera

Proposed by Jim Hodapp
Status: Merged
Approved by: Florian Boucault
Approved revision: 161
Merged at revision: 161
Proposed branch: lp:~phablet-team/qtubuntu-camera/audio-role
Merge into: lp:qtubuntu-camera
Diff against target: 23 lines (+1/-4)
1 file modified
src/aalimagecapturecontrol.cpp (+1/-4)
To merge this branch: bzr merge lp:~phablet-team/qtubuntu-camera/audio-role
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+289545@code.launchpad.net

Commit message

Get rid of using the old QMediaPlayer::Alert role and use the new
QAudio::NotificationRole for vivid and xenial.

Description of the change

Get rid of using the old QMediaPlayer::Alert role and use the new
QAudio::NotificationRole for vivid and xenial.

To post a comment you must log in.
161. By Jim Hodapp

Get rid of using the old QMediaPlayer::Alert role and use the new
QAudio::NotificationRole for vivid and xenial.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/aalimagecapturecontrol.cpp'
2--- src/aalimagecapturecontrol.cpp 2016-02-09 08:54:12 +0000
3+++ src/aalimagecapturecontrol.cpp 2016-03-23 15:31:00 +0000
4@@ -36,6 +36,7 @@
5 #include <QScreen>
6 #include <QSettings>
7 #include <QtConcurrent/QtConcurrent>
8+#include <QtMultimedia/qaudio.h>
9
10 AalImageCaptureControl::AalImageCaptureControl(AalCameraService *service, QObject *parent)
11 : QCameraImageCaptureControl(parent),
12@@ -50,11 +51,7 @@
13 {
14 m_galleryPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
15 m_audioPlayer->setMedia(QUrl::fromLocalFile("/system/media/audio/ui/camera_click.ogg"));
16-#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
17- m_audioPlayer->setAudioRole(QMediaPlayer::AlertRole);
18-#else
19 m_audioPlayer->setAudioRole(QAudio::NotificationRole);
20-#endif
21
22 QObject::connect(&m_storageManager, &StorageManager::previewReady,
23 this, &AalImageCaptureControl::imageCaptured);

Subscribers

People subscribed via source and target branches

to all changes: