~fboucault/qtubuntu-camera/remove_maker_tag

« back to all changes in this revision

Viewing changes to src/aalimagecapturecontrol.cpp

  • Committer: CI Train Bot
  • Author(s): Timo Jyrinki
  • Date: 2015-12-01 06:13:31 UTC
  • mfrom: (151.1.1 qtubuntu-camera)
  • Revision ID: ci-train-bot@canonical.com-20151201061331-pyhn8068ypbq6mns
Support the new AudioRole API in addition to the old (LP: #1493851) (LP: #1450346)

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
{
52
52
    m_galleryPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
53
53
    m_audioPlayer->setMedia(QUrl::fromLocalFile("/system/media/audio/ui/camera_click.ogg"));
 
54
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
54
55
    m_audioPlayer->setAudioRole(QMediaPlayer::AlertRole);
 
56
#else
 
57
    m_audioPlayer->setAudioRole(QAudio::NotificationRole);
 
58
#endif
55
59
}
56
60
 
57
61
AalImageCaptureControl::~AalImageCaptureControl()