Commit 31117038 authored by Daniel Molkentin's avatar Daniel Molkentin Committed by hjk

Don't open files and help if someone chooses to cancel loading an example.

Task-Number: QTCREATORBUG-4414
Change-Id: I0272091d185fe6a9ac23022eb4efb723eb541494x
(cherry picked from commit 15ac4f0e)
Reviewed-on: http://codereview.qt.nokia.com/148Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 7cb66c54
......@@ -422,7 +422,6 @@ void GettingStartedWelcomePageWidget::slotOpenExample()
}
QString tryFile;
files << proFile;
if (isQmlProject) {
tryFile = proFileInfo.path() + '/' + "/main.qml";
if(!QFile::exists(tryFile))
......@@ -436,10 +435,13 @@ void GettingStartedWelcomePageWidget::slotOpenExample()
tryFile = proFileInfo.path() + "/main.cpp";
if(!QFile::exists(tryFile))
tryFile = proFileInfo.path() + '/' + proFileInfo.baseName() + ".cpp";
files << tryFile;
}
if (ProjectExplorer::ProjectExplorerPlugin::instance()->openProject(proFile)) {
Core::ICore::instance()->openFiles(files);
if (!helpFile.isEmpty())
slotOpenContextHelpPage(helpFile);
}
Core::ICore::instance()->openFiles(files, static_cast<Core::ICore::OpenFilesFlags>(Core::ICore::SwitchMode | Core::ICore::StopOnLoadFail));
if (!tryFile.isEmpty() && Core::EditorManager::instance()->hasEditor(tryFile) && !helpFile.isEmpty())
slotOpenContextHelpPage(helpFile);
}
void GettingStartedWelcomePageWidget::slotOpenHelpPage(const QString& url)
......
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