Remove generated log file when quitting the reporter.

This commit is contained in:
dfighter1985 2015-02-22 22:34:07 +01:00
parent 967275ec19
commit 7394873799
2 changed files with 11 additions and 4 deletions

View file

@ -24,6 +24,7 @@
#include <QTextStream>
#include <QFile>
#include <QMessageBox>
#include <QFile>
CCrashReportWidget::CCrashReportWidget( QWidget *parent ) :
QWidget( parent )
@ -111,7 +112,7 @@ void CCrashReportWidget::onSendClicked()
void CCrashReportWidget::onCancelClicked()
{
close();
removeAndQuit();
}
void CCrashReportWidget::onCBClicked()
@ -127,7 +128,7 @@ void CCrashReportWidget::onReportSent()
tr( "Report sent" ),
tr( "The report has been sent." ) );
close();
removeAndQuit();
}
void CCrashReportWidget::onReportFailed()
@ -138,7 +139,7 @@ void CCrashReportWidget::onReportFailed()
tr( "Report failed" ),
tr( "Failed to send the report..." ) );
close();
removeAndQuit();
}
bool CCrashReportWidget::checkSettings()
@ -162,3 +163,9 @@ bool CCrashReportWidget::checkSettings()
return true;
}
void CCrashReportWidget::removeAndQuit()
{
QFile::remove( m_fileName );
close();
}

View file

@ -49,7 +49,7 @@ private Q_SLOTS:
private:
bool checkSettings();
void removeAndQuit();
Ui::CrashReportWidget m_ui;
QString m_fileName;