Skip to content
Snippets Groups Projects
Commit 1507b5b4 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

QML wizard: Remove remains of dummy data loading.

The GUI part of this has been removed already.

Reviewed-by: Alessandro Portale
parent 78ea4d2d
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,6 @@ int main(int argc, char *argv[])
viewer.addImportPath(QLatin1String("modules")); // ADDIMPORTPATH
viewer.setOrientation(QmlApplicationViewer::Auto); // ORIENTATION
viewer.setMainQmlFile(QLatin1String("qml/app/app.qml")); // MAINQML
viewer.setLoadDummyData(false); // LOADDUMMYDATA
viewer.show();
return app.exec();
......
......@@ -108,27 +108,6 @@ void QmlApplicationViewer::setOrientation(Orientation orientation)
#endif // Q_OS_SYMBIAN
}
void QmlApplicationViewer::setLoadDummyData(bool loadDummyData)
{
if (loadDummyData) {
const QFileInfo mainQmlFileInfo(m_d->mainQmlFile);
const QDir dir(mainQmlFileInfo.absolutePath() + QLatin1String("/dummydata"),
QLatin1String("*.qml"));
foreach (const QFileInfo &qmlFile, dir.entryInfoList()) {
QFile f(qmlFile.absoluteFilePath());
if (f.open(QIODevice::ReadOnly)) {
QDeclarativeComponent comp(engine());
comp.setData(f.readAll(), QUrl());
QObject *dummyData = comp.create();
if (dummyData) {
rootContext()->setContextProperty(qmlFile.baseName(), dummyData);
dummyData->setParent(this);
}
}
}
}
}
void QmlApplicationViewer::show()
{
#ifdef Q_OS_SYMBIAN
......
......@@ -18,7 +18,6 @@ public:
void setMainQmlFile(const QString &file);
void addImportPath(const QString &path);
void setOrientation(Orientation orientation);
void setLoadDummyData(bool loadDummyData);
void show();
private:
......
......@@ -210,8 +210,6 @@ bool QmlStandaloneApp::adaptCurrentMainCppTemplateLine(QString &line) const
adaptLine = false;
else
insertParameter(line, quote + path(ModulesDir) + quote);
} else if (line.contains(QLatin1String("// LOADDUMMYDATA"))) {
adaptLine = false;
}
return adaptLine;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment