forked from qt-creator/qt-creator
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:
@@ -148,8 +148,15 @@ void TargetSetupPageWrapper::updateNoteText()
|
|||||||
{
|
{
|
||||||
ProjectExplorer::Profile *p = ProjectExplorer::ProfileManager::instance()->defaultProfile();
|
ProjectExplorer::Profile *p = ProjectExplorer::ProfileManager::instance()->defaultProfile();
|
||||||
|
|
||||||
|
|
||||||
QString text;
|
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>"
|
text = tr("<p>The project <b>%1</b> is not yet configured.</p>"
|
||||||
"<p>Qt Creator uses the profile: <b>%2</b> "
|
"<p>Qt Creator uses the profile: <b>%2</b> "
|
||||||
"to parse the project. You can edit "
|
"to parse the project. You can edit "
|
||||||
|
|||||||
Reference in New Issue
Block a user