Debugger: Avoid messagesboxes on the same topic at the same time

Task-number: QTCREATORBUG-16971
Change-Id: I625f04cbd8f609c66597450dbad22ebc6eadcfe5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2016-12-14 09:59:49 +01:00
parent c16d350539
commit 26331f771a
3 changed files with 13 additions and 4 deletions

View File

@@ -383,6 +383,7 @@ public:
// Safety net to avoid infinite lookups.
QSet<QString> m_lookupRequests; // FIXME: Integrate properly.
QPointer<QWidget> m_alertBox;
};
@@ -1813,8 +1814,11 @@ QString DebuggerEngine::msgInterrupted()
return tr("Interrupted.");
}
void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name)
bool DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name)
{
if (d->m_alertBox)
return false;
if (name.isEmpty())
name = ' ' + tr("<Unknown>", "name") + ' ';
if (meaning.isEmpty())
@@ -1824,7 +1828,9 @@ void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name
"<table><tr><td>Signal name : </td><td>%1</td></tr>"
"<tr><td>Signal meaning : </td><td>%2</td></tr></table>")
.arg(name, meaning);
AsynchronousMessageBox::information(tr("Signal Received"), msg);
d->m_alertBox = AsynchronousMessageBox::information(tr("Signal Received"), msg);
return true;
}
void DebuggerEngine::showStoppedByExceptionMessageBox(const QString &description)