~phablet-team/+junk/qtmultimedia-declarative-playlist

« back to all changes in this revision

Viewing changes to examples/multimedia/video/qmlvideo/main.cpp

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-05-23 19:47:12 UTC
  • mfrom: (1.1.1) (7.1.2 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130523194712-ng8dawnyetljbjkv
Tags: 5.0.2-2ubuntu2
Update libqt5multimedia5.symbols for qreal substitutions for armhf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
2
**
3
 
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
 
3
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
4
4
** Contact: http://www.qt-project.org/legal
5
5
**
6
6
** This file is part of the Qt Mobility Components.
127
127
                     rootObject, SLOT(qmlFramePainted()));
128
128
#endif
129
129
 
130
 
    QString videoPath;
 
130
    QUrl videoPath;
131
131
    const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation);
132
 
    if (!moviesLocation.isEmpty())
133
 
        videoPath = moviesLocation.first();
 
132
    if (moviesLocation.isEmpty()) {
 
133
        QUrl appPath(QString("file:///%1").arg(app.applicationDirPath()));
 
134
        videoPath = appPath.resolved(QUrl("./"));
 
135
    } else
 
136
        videoPath = QString("file:///%1").arg(moviesLocation.first());
134
137
    viewer.rootContext()->setContextProperty("videoPath", videoPath);
135
138
 
136
139
    QMetaObject::invokeMethod(rootObject, "init");