forked from qt-creator/qt-creator
Core: Use std::function for info bar callbacks
Change-Id: Iae7cbef053bfe86a7692e09f66af91117815d2a6 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -713,7 +713,9 @@ void AndroidManifestEditorWidget::updateInfoBar(const QString &errorMessage, int
|
||||
else
|
||||
text = tr("%2: Could not parse file: \"%1\".").arg(errorMessage).arg(line);
|
||||
Core::InfoBarEntry infoBarEntry(infoBarId, text);
|
||||
infoBarEntry.setCustomButtonInfo(tr("Goto error"), this, SLOT(gotoError()));
|
||||
infoBarEntry.setCustomButtonInfo(tr("Goto error"), [this]() {
|
||||
m_textEditorWidget->gotoLine(m_errorLine, m_errorColumn);
|
||||
});
|
||||
infoBar->removeInfo(infoBarId);
|
||||
infoBar->addInfo(infoBarEntry);
|
||||
|
||||
@@ -729,11 +731,6 @@ void AndroidManifestEditorWidget::hideInfoBar()
|
||||
m_timerParseCheck.stop();
|
||||
}
|
||||
|
||||
void AndroidManifestEditorWidget::gotoError()
|
||||
{
|
||||
m_textEditorWidget->gotoLine(m_errorLine, m_errorColumn);
|
||||
}
|
||||
|
||||
void setApiLevel(QComboBox *box, const QDomElement &element, const QString &attribute)
|
||||
{
|
||||
if (!element.isNull() && element.hasAttribute(attribute)) {
|
||||
|
Reference in New Issue
Block a user