More renames...

This commit is contained in:
dfighter1985 2015-02-22 19:52:01 +01:00
parent 687655c086
commit 2b24f62e9a
8 changed files with 41 additions and 41 deletions

View file

@ -115,9 +115,9 @@ static void doSendReport()
f.close();
#ifdef NL_OS_WINDOWS
NLMISC::launchProgram( "rcerror.exe", filename );
NLMISC::launchProgram( "crash_report.exe", filename );
#else
NLMISC::launchProgram( "rcerror", filename );
NLMISC::launchProgram( "crash_report", filename );
#endif
}

View file

@ -17,7 +17,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "rcerror_widget.h"
#include "crash_report_widget.h"
#include <QApplication>
#include <QMessageBox>
@ -25,7 +25,7 @@ int main( int argc, char **argv )
{
QApplication app( argc, argv );
CRCErrorWidget w;
CCrashReportWidget w;
w.setFileName( "rcerrorlog.txt" );
w.show();

View file

@ -23,7 +23,7 @@
#include <QString>
struct SRCErrorData
struct SCrashReportData
{
QString description;
QString report;

View file

@ -16,7 +16,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "rcerror_socket.h"
#include "crash_report_socket.h"
#include <QNetworkAccessManager>
#include <QUrl>
#include <QNetworkRequest>
@ -27,26 +27,26 @@ namespace
static const char *BUG_URL = "http://192.168.2.66/dfighter/r.php";
}
class CRCErrorSocketPvt
class CCrashReportSocketPvt
{
public:
QNetworkAccessManager mgr;
};
CRCErrorSocket::CRCErrorSocket( QObject *parent ) :
CCrashReportSocket::CCrashReportSocket( QObject *parent ) :
QObject( parent )
{
m_pvt = new CRCErrorSocketPvt();
m_pvt = new CCrashReportSocketPvt();
connect( &m_pvt->mgr, SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished( QNetworkReply* ) ) );
}
CRCErrorSocket::~CRCErrorSocket()
CCrashReportSocket::~CCrashReportSocket()
{
delete m_pvt;
}
void CRCErrorSocket::sendReport( const SRCErrorData &data )
void CCrashReportSocket::sendReport( const SCrashReportData &data )
{
QUrl params;
params.addQueryItem( "report", data.report );
@ -60,7 +60,7 @@ void CRCErrorSocket::sendReport( const SRCErrorData &data )
m_pvt->mgr.post( request, params.encodedQuery() );
}
void CRCErrorSocket::onFinished( QNetworkReply *reply )
void CCrashReportSocket::onFinished( QNetworkReply *reply )
{
if( reply->error() != QNetworkReply::NoError )
Q_EMIT reportFailed();

View file

@ -21,20 +21,20 @@
#define RCERROR_SOCKET
#include <QObject>
#include "rcerror_data.h"
#include "crash_report_data.h"
class CRCErrorSocketPvt;
class CCrashReportSocketPvt;
class QNetworkReply;
class CRCErrorSocket : public QObject
class CCrashReportSocket : public QObject
{
Q_OBJECT
public:
CRCErrorSocket( QObject *parent );
~CRCErrorSocket();
CCrashReportSocket( QObject *parent );
~CCrashReportSocket();
void sendReport( const SRCErrorData &data );
void sendReport( const SCrashReportData &data );
Q_SIGNALS:
void reportSent();
@ -44,7 +44,7 @@ private Q_SLOTS:
void onFinished( QNetworkReply *reply );
private:
CRCErrorSocketPvt *m_pvt;
CCrashReportSocketPvt *m_pvt;
};
#endif

View file

@ -17,20 +17,20 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "rcerror_widget.h"
#include "rcerror_socket.h"
#include "rcerror_data.h"
#include "crash_report_widget.h"
#include "crash_report_socket.h"
#include "crash_report_data.h"
#include <QTimer>
#include <QTextStream>
#include <QFile>
#include <QMessageBox>
CRCErrorWidget::CRCErrorWidget( QWidget *parent ) :
CCrashReportWidget::CCrashReportWidget( QWidget *parent ) :
QWidget( parent )
{
m_ui.setupUi( this );
m_socket = new CRCErrorSocket( this );
m_socket = new CCrashReportSocket( this );
QTimer::singleShot( 1, this, SLOT( onLoad() ) );
@ -42,12 +42,12 @@ QWidget( parent )
connect( m_socket, SIGNAL( reportFailed() ), this, SLOT( onReportFailed() ) );
}
CRCErrorWidget::~CRCErrorWidget()
CCrashReportWidget::~CCrashReportWidget()
{
m_socket = NULL;
}
void CRCErrorWidget::onLoad()
void CCrashReportWidget::onLoad()
{
QFile f( m_fileName );
bool b = f.open( QFile::ReadOnly | QFile::Text );
@ -64,12 +64,12 @@ void CRCErrorWidget::onLoad()
f.close();
}
void CRCErrorWidget::onSendClicked()
void CCrashReportWidget::onSendClicked()
{
m_ui.sendButton->setEnabled( false );
QApplication::setOverrideCursor( Qt::WaitCursor );
SRCErrorData data;
SCrashReportData data;
data.description = m_ui.descriptionEdit->toPlainText();
data.report = m_ui.reportEdit->toPlainText();
data.email = m_ui.emailEdit->text();
@ -77,17 +77,17 @@ void CRCErrorWidget::onSendClicked()
m_socket->sendReport( data );
}
void CRCErrorWidget::onCancelClicked()
void CCrashReportWidget::onCancelClicked()
{
close();
}
void CRCErrorWidget::onCBClicked()
void CCrashReportWidget::onCBClicked()
{
m_ui.emailEdit->setEnabled( m_ui.emailCB->isChecked() );
}
void CRCErrorWidget::onReportSent()
void CCrashReportWidget::onReportSent()
{
QApplication::setOverrideCursor( Qt::ArrowCursor );
@ -98,7 +98,7 @@ void CRCErrorWidget::onReportSent()
close();
}
void CRCErrorWidget::onReportFailed()
void CCrashReportWidget::onReportFailed()
{
QApplication::setOverrideCursor( Qt::ArrowCursor );

View file

@ -21,16 +21,16 @@
#define RCERROR_WIDGET
#include "ui_rcerror_widget.h"
#include "ui_crash_report_widget.h"
class CRCErrorSocket;
class CCrashReportSocket;
class CRCErrorWidget : public QWidget
class CCrashReportWidget : public QWidget
{
Q_OBJECT
public:
CRCErrorWidget( QWidget *parent = NULL );
~CRCErrorWidget();
CCrashReportWidget( QWidget *parent = NULL );
~CCrashReportWidget();
void setFileName( const char *fn ){ m_fileName = fn; }
@ -44,9 +44,9 @@ private Q_SLOTS:
void onReportFailed();
private:
Ui::RCErrorWidget m_ui;
Ui::CrashReportWidget m_ui;
QString m_fileName;
CRCErrorSocket *m_socket;
CCrashReportSocket *m_socket;
};
#endif

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RCErrorWidget</class>
<widget class="QWidget" name="RCErrorWidget">
<class>CrashReportWidget</class>
<widget class="QWidget" name="CrashReportWidget">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>