// search Paths seem to be broken in Harmattan?
-static QString trueFilePath(QString path)
+static QString trueFilePath(const QString &path)
{
qDebug() << "searching for" << path;
+#if USE_RESOURCES
+ return path;
+#else
QString searchPathName = path.section(':', 0, 0);
qDebug() << "path is" << searchPathName;
QString fileName = path.section(':', 1, 1);
}
qDebug() << "file not found";
return QString();
+#endif
}
View::View(QWidget *parent) :
// This does not seem ot work in harmattan. As a workaround, change dir to
// the qml dir, then load the file.
// m_view->setSource(QUrl::fromLocalFile("qml:main.qml"));
- setSource(QUrl::fromLocalFile(trueFilePath("qml:main.qml")));
+ future.waitForFinished();
+ setSource(trueFilePath("qml:main.qml"));
}
View::~View()