Gst capture: use QDesktopServices for default storage location

Change-Id: Icff46f2dc88572beab2eb835e24424f15ff05616
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
Dmytro Poplavskiy
2012-07-05 13:30:47 +10:00
committed by Qt by Nokia
parent f9a3b9b00f
commit ed7f02490d

View File

@@ -44,6 +44,7 @@
#include "qgstreamervideoencode.h"
#include "qgstreamermediacontainercontrol.h"
#include <QtCore/QDebug>
#include <QtGui/qdesktopservices.h>
QGstreamerRecorderControl::QGstreamerRecorderControl(QGstreamerCaptureSession *session)
:QMediaRecorderControl(session),
@@ -321,6 +322,11 @@ QDir QGstreamerRecorderControl::defaultDir() const
dirCandidates << QLatin1String("/home/user/MyDocs");
#endif
if (m_session->captureMode() & QGstreamerCaptureSession::Video)
dirCandidates << QDesktopServices::storageLocation(QDesktopServices::MoviesLocation);
else
dirCandidates << QDesktopServices::storageLocation(QDesktopServices::MusicLocation);
dirCandidates << QDir::home().filePath("Documents");
dirCandidates << QDir::home().filePath("My Documents");
dirCandidates << QDir::homePath();