QmlDesigner: fix gotoCode in error/warning case

The QmlDesignerPlugin::hideDesigner() jumped again to selected node,
which came after the DocumentWarningWidget already set it.

Change-Id: I6e84342208c6405e8b25b516cd411b30bc48fcdb
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
Tim Jenssen
2016-10-05 12:16:58 +02:00
committed by Thomas Hartmann
parent 9a9c29dd82
commit c27c9a3123
5 changed files with 32 additions and 10 deletions

View File

@@ -319,6 +319,7 @@ void DesignModeWidget::setup()
m_warningWidget->setVisible(false);
connect(m_warningWidget.data(), &DocumentWarningWidget::gotoCodeClicked, [=]
(const QString &filePath, int codeLine, int codeColumn) {
Q_UNUSED(filePath);
QTC_ASSERT(textEditor(), return;);
@@ -570,6 +571,13 @@ void DesignModeWidget::showWarningMessageBox(const QList<RewriterError> &warning
m_warningWidget->setVisible(true);
}
bool DesignModeWidget::gotoCodeWasClicked()
{
if (m_warningWidget)
return m_warningWidget->gotoCodeWasClicked();
return false;
}
CrumbleBar *DesignModeWidget::crumbleBar() const
{
return m_crumbleBar;