Commit a41876cd authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Do not add a menu if the examples cannot be found.

This is not only a waste of ressources, but breaks a check later on
which tries to load the QML examples from Creators ressource path
if no QML capable Qt version is found (included with Creator packages)

Reviewed-by: dt
parent ec0d44fc
\ No newline at end of file
\ No newline at end of file
......@@ -175,8 +175,6 @@ void GettingStartedWelcomePageWidget::updateQmlExamples(const QString &examplePa
const QString &sourcePath)
ui->qmlExamplesButton->setText(tr("Choose an example..."));
QMenu *menu = new QMenu(ui->qmlExamplesButton);
QStringList roots;
roots << (examplePath + QLatin1String("/declarative"))
......@@ -197,6 +195,11 @@ void GettingStartedWelcomePageWidget::updateQmlExamples(const QString &examplePa
exampleProjects.insert(fileName, exampleProject);
if (!exampleProjects.isEmpty()) {
QMenu *menu = new QMenu(ui->qmlExamplesButton);
QMapIterator<QString, QString> it(exampleProjects);
while (it.hasNext()) {;
......@@ -206,6 +209,7 @@ void GettingStartedWelcomePageWidget::updateQmlExamples(const QString &examplePa
// FIXME once we have help for QML examples
// exampleAction->setProperty(HelpPathPropertyName, helpPath);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment