diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-19 17:14:43 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-19 17:15:56 +0100 |
commit | d396262bc9771cacbc71e79215768984fa1974ff (patch) | |
tree | e029399524feabed6ebe0ee1e010af9f5e58932d /examples/multimedia/video/qmlvideo/main.cpp | |
parent | 0ce2cb3ebe6289e3db14438560fa186d9e5186b8 (diff) | |
parent | 2db2cde0d8433ad1aed59412717c4cddf496ba66 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/multimedia/doc/qtmultimedia.qdocconf
src/plugins/blackberry/mediaplayer/bbmetadata.cpp
src/plugins/blackberry/mediaplayer/bbmetadata.h
tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp
Change-Id: I447c297ea15a94d1d2feb0fb5f9edac8c5d4505a
Diffstat (limited to 'examples/multimedia/video/qmlvideo/main.cpp')
-rw-r--r-- | examples/multimedia/video/qmlvideo/main.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/multimedia/video/qmlvideo/main.cpp b/examples/multimedia/video/qmlvideo/main.cpp index ac26c983a..1a9c52391 100644 --- a/examples/multimedia/video/qmlvideo/main.cpp +++ b/examples/multimedia/video/qmlvideo/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -127,10 +127,13 @@ int main(int argc, char *argv[]) rootObject, SLOT(qmlFramePainted())); #endif - QString videoPath; + QUrl videoPath; const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation); - if (!moviesLocation.isEmpty()) - videoPath = moviesLocation.first(); + if (moviesLocation.isEmpty()) { + QUrl appPath(QString("file:///%1").arg(app.applicationDirPath())); + videoPath = appPath.resolved(QUrl("./")); + } else + videoPath = QString("file:///%1").arg(moviesLocation.first()); viewer.rootContext()->setContextProperty("videoPath", videoPath); QMetaObject::invokeMethod(rootObject, "init"); |