User is not able to select file from FileBrowser and play it.
When string is converted to Url qrc:// scheme is used. Fix Filebrowser to use file:// scheme instead. Change-Id: I9617d9503ed403de7d017b8586ae37b05dc096cb Reviewed-by: Andy Nichols <andy.nichols@digia.com>
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user