UnconfiguredProjectPanel: Fix crash if there are no profiles

That can happen, since the default profile is now manual and can be
deleted.

Change-Id: Id9274351e800ba88d7050ca7cd036cfc227a899a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Daniel Teske
2012-07-12 13:30:03 +02:00
parent 1a5edbaff9
commit 113bd5ce7e

View File

@@ -148,8 +148,15 @@ void TargetSetupPageWrapper::updateNoteText()
{
ProjectExplorer::Profile *p = ProjectExplorer::ProfileManager::instance()->defaultProfile();
QString text;
if (p->isValid())
if (!p)
text = tr("<p>The project <b>%1</b> is not yet configured.</p>"
"<p>Qt Creator can not parse the project, because no profile "
"has been setup. You can setup profiles "
"in the <b><a href=\"edit\">settings.</a></b></p>")
.arg(m_project->displayName());
else if (p->isValid())
text = tr("<p>The project <b>%1</b> is not yet configured.</p>"
"<p>Qt Creator uses the profile: <b>%2</b> "
"to parse the project. You can edit "