forked from qt-creator/qt-creator
		
	centralize message box handling in adapters
This commit is contained in:
		@@ -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;
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -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()
 | 
			
		||||
 
 | 
			
		||||
@@ -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()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user