Added return codes as requested.

This commit is contained in:
dfighter1985 2015-03-02 20:12:09 +01:00
parent 3080717012
commit da6391ec1e
4 changed files with 30 additions and 1 deletions

View file

@ -88,5 +88,11 @@ int main( int argc, char **argv )
w.setup( params );
w.show();
return app.exec();
int ret = app.exec();
if( ret != EXIT_SUCCESS )
return ret;
else
return w.getReturnValue();
}

View file

@ -173,18 +173,26 @@ void CCrashReportWidget::onCBClicked()
void CCrashReportWidget::onAlwaysIgnoreClicked()
{
m_returnValue = ERET_ALWAYS_IGNORE;
close();
}
void CCrashReportWidget::onIgnoreClicked()
{
m_returnValue = ERET_IGNORE;
close();
}
void CCrashReportWidget::onAbortClicked()
{
m_returnValue = ERET_ABORT;
close();
}
void CCrashReportWidget::onBreakClicked()
{
m_returnValue = ERET_BREAK;
close();
}

View file

@ -31,6 +31,16 @@ class CCrashReportWidget : public QWidget
{
Q_OBJECT
public:
enum EReturnValue
{
ERET_NULL = 0,
ERET_ALWAYS_IGNORE = 21,
ERET_IGNORE = 22,
ERET_ABORT = 23,
ERET_BREAK = 24
};
CCrashReportWidget( QWidget *parent = NULL );
~CCrashReportWidget();
@ -38,6 +48,8 @@ public:
void setup( const std::vector< std::pair< std::string, std::string > > &params );
EReturnValue getReturnValue() const{ return m_returnValue; }
private Q_SLOTS:
void onLoad();
void onSendClicked();
@ -62,6 +74,7 @@ private:
bool m_developerMode;
bool m_forceSend;
EReturnValue m_returnValue;
};
#endif

View file

@ -538,6 +538,8 @@ void checkDriverVersion()
void checkDriverDepth ()
{
nlassert( false );
// Check desktop is in 32 bit else no window mode allowed.
if (ClientCfg.Windowed)
{