Added return codes as requested.

This commit is contained in:
dfighter1985 2015-03-02 20:12:09 +01:00
parent 0fcd0798ae
commit 50be8e3ba2
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.setup( params );
w.show(); 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() void CCrashReportWidget::onAlwaysIgnoreClicked()
{ {
m_returnValue = ERET_ALWAYS_IGNORE;
close();
} }
void CCrashReportWidget::onIgnoreClicked() void CCrashReportWidget::onIgnoreClicked()
{ {
m_returnValue = ERET_IGNORE;
close();
} }
void CCrashReportWidget::onAbortClicked() void CCrashReportWidget::onAbortClicked()
{ {
m_returnValue = ERET_ABORT;
close();
} }
void CCrashReportWidget::onBreakClicked() void CCrashReportWidget::onBreakClicked()
{ {
m_returnValue = ERET_BREAK;
close();
} }

View file

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

View file

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