forked from qt-creator/qt-creator
QmlDesigner: Remove warning widget from DesignModeWidget
The form editor is now handling even initial warnings. There is no need for an extra warning widget in the DesignModeWidget. Change-Id: Iac85c1968e8040ee5f11435fa2876ce2d152c194 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -199,7 +199,7 @@ void DesignModeWidget::enableWidgets()
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
hideWarningWidget();
|
||||
|
||||
viewManager().enableWidgets();
|
||||
m_isDisabled = false;
|
||||
}
|
||||
@@ -221,20 +221,6 @@ void DesignModeWidget::switchTextOrForm()
|
||||
m_centralTabWidget->switchTo(viewManager().widget("TextEditor"));
|
||||
}
|
||||
|
||||
void DesignModeWidget::showWarningMessageBox(const QList<DocumentMessage> &warnings)
|
||||
{
|
||||
Q_ASSERT(!warnings.isEmpty());
|
||||
warningWidget()->setWarnings(warnings);
|
||||
warningWidget()->setVisible(true);
|
||||
}
|
||||
|
||||
bool DesignModeWidget::gotoCodeWasClicked()
|
||||
{
|
||||
if (m_warningWidget)
|
||||
return warningWidget()->gotoCodeWasClicked();
|
||||
return false;
|
||||
}
|
||||
|
||||
static void hideToolButtons(QList<QToolButton*> &buttons)
|
||||
{
|
||||
foreach (QToolButton *button, buttons)
|
||||
@@ -528,28 +514,6 @@ QWidget *DesignModeWidget::createCrumbleBarFrame()
|
||||
return frame;
|
||||
}
|
||||
|
||||
DocumentWarningWidget *DesignModeWidget::warningWidget()
|
||||
{
|
||||
if (m_warningWidget.isNull()) {
|
||||
m_warningWidget = new DocumentWarningWidget(this);
|
||||
connect(m_warningWidget.data(), &DocumentWarningWidget::gotoCodeClicked, [=]
|
||||
(const QString &filePath, int codeLine, int codeColumn) {
|
||||
Q_UNUSED(filePath);
|
||||
|
||||
if (currentDesignDocument() && currentDesignDocument()->textEditor())
|
||||
currentDesignDocument()->textEditor()->gotoLine(codeLine, codeColumn);
|
||||
Core::ModeManager::activateMode(Core::Constants::MODE_EDIT);
|
||||
});
|
||||
}
|
||||
return m_warningWidget;
|
||||
}
|
||||
|
||||
void DesignModeWidget::hideWarningWidget()
|
||||
{
|
||||
if (m_warningWidget)
|
||||
m_warningWidget->setVisible(false);
|
||||
}
|
||||
|
||||
CrumbleBar *DesignModeWidget::crumbleBar() const
|
||||
{
|
||||
return m_crumbleBar;
|
||||
|
||||
Reference in New Issue
Block a user