centralize message box handling in adapters

This commit is contained in:
Oswald Buddenhagen
2009-10-20 17:43:06 +02:00
parent 30745d049f
commit a4760b716e
3 changed files with 4 additions and 2 deletions

View File

@@ -99,6 +99,8 @@ protected:
{ m_engine->debugMessage(msg); }
void showStatusMessage(const QString &msg) const
{ m_engine->showStatusMessage(msg); }
void showMessageBox(int icon, const QString &title, const QString &text) const
{ m_engine->showMessageBox(icon, title, text); }
GdbEngine * const m_engine;
};

View File

@@ -119,7 +119,7 @@ void RemoteGdbAdapter::uploadProcError(QProcess::ProcessError error)
}
m_engine->showStatusMessage(msg);
QMessageBox::critical(m_engine->mainWindow(), tr("Error"), msg);
showMessageBox(QMessageBox::Critical, tr("Error"), msg);
}
void RemoteGdbAdapter::readUploadStandardOutput()

View File

@@ -147,7 +147,7 @@ void TermGdbAdapter::shutdown()
void TermGdbAdapter::stubError(const QString &msg)
{
QMessageBox::critical(m_engine->mainWindow(), tr("Debugger Error"), msg);
showMessageBox(QMessageBox::Critical, tr("Debugger Error"), msg);
}
void TermGdbAdapter::stubExited()