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
=== modified file 'src/aalimagecapturecontrol.cpp'
--- src/aalimagecapturecontrol.cpp 2016-02-09 08:54:12 +0000
+++ src/aalimagecapturecontrol.cpp 2016-03-23 15:31:00 +0000
@@ -36,6 +36,7 @@
36#include <QScreen>36#include <QScreen>
37#include <QSettings>37#include <QSettings>
38#include <QtConcurrent/QtConcurrent>38#include <QtConcurrent/QtConcurrent>
39#include <QtMultimedia/qaudio.h>
3940
40AalImageCaptureControl::AalImageCaptureControl(AalCameraService *service, QObject *parent)41AalImageCaptureControl::AalImageCaptureControl(AalCameraService *service, QObject *parent)
41 : QCameraImageCaptureControl(parent),42 : QCameraImageCaptureControl(parent),
@@ -50,11 +51,7 @@
50{51{
51 m_galleryPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);52 m_galleryPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
52 m_audioPlayer->setMedia(QUrl::fromLocalFile("/system/media/audio/ui/camera_click.ogg"));53 m_audioPlayer->setMedia(QUrl::fromLocalFile("/system/media/audio/ui/camera_click.ogg"));
53#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
54 m_audioPlayer->setAudioRole(QMediaPlayer::AlertRole);
55#else
56 m_audioPlayer->setAudioRole(QAudio::NotificationRole);54 m_audioPlayer->setAudioRole(QAudio::NotificationRole);
57#endif
5855
59 QObject::connect(&m_storageManager, &StorageManager::previewReady,56 QObject::connect(&m_storageManager, &StorageManager::previewReady,
60 this, &AalImageCaptureControl::imageCaptured);57 this, &AalImageCaptureControl::imageCaptured);

Subscribers

People subscribed via source and target branches

to all changes: