diff options
author | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2012-07-05 13:30:47 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-09 04:50:09 +0200 |
commit | ed7f02490d2344377b878a4dda62cb5be1c22287 (patch) | |
tree | 8047b67a9cf22c208542dfd5c08dba8f60e0c85b /src/plugins | |
parent | f9a3b9b00fbd92072c72bf1cb0de7052f12d93d3 (diff) |
Gst capture: use QDesktopServices for default storage location
Change-Id: Icff46f2dc88572beab2eb835e24424f15ff05616
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp index 6ac760562..3ff148e08 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp @@ -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(); |