From cfe2d603503d7da01e87dc8e14a90942e7544843 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 19:52:01 +0100 Subject: [PATCH] More renames... --HG-- branch : feature-crashreport --- code/nel/src/misc/report.cpp | 4 +-- .../tools/misc/crash_report/crash_report.cpp | 4 +-- .../misc/crash_report/crash_report_data.h | 2 +- .../misc/crash_report/crash_report_socket.cpp | 14 +++++----- .../misc/crash_report/crash_report_socket.h | 14 +++++----- .../misc/crash_report/crash_report_widget.cpp | 26 +++++++++---------- .../misc/crash_report/crash_report_widget.h | 14 +++++----- .../misc/crash_report/crash_report_widget.ui | 4 +-- 8 files changed, 41 insertions(+), 41 deletions(-) diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index d761373fd..09cfc1178 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -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 } diff --git a/code/nel/tools/misc/crash_report/crash_report.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp index f26886735..d04928d21 100644 --- a/code/nel/tools/misc/crash_report/crash_report.cpp +++ b/code/nel/tools/misc/crash_report/crash_report.cpp @@ -17,7 +17,7 @@ // along with this program. If not, see . -#include "rcerror_widget.h" +#include "crash_report_widget.h" #include #include @@ -25,7 +25,7 @@ int main( int argc, char **argv ) { QApplication app( argc, argv ); - CRCErrorWidget w; + CCrashReportWidget w; w.setFileName( "rcerrorlog.txt" ); w.show(); diff --git a/code/nel/tools/misc/crash_report/crash_report_data.h b/code/nel/tools/misc/crash_report/crash_report_data.h index 8accc75a3..5884e7eb4 100644 --- a/code/nel/tools/misc/crash_report/crash_report_data.h +++ b/code/nel/tools/misc/crash_report/crash_report_data.h @@ -23,7 +23,7 @@ #include -struct SRCErrorData +struct SCrashReportData { QString description; QString report; diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.cpp b/code/nel/tools/misc/crash_report/crash_report_socket.cpp index 720cb792b..209ea89e8 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_socket.cpp @@ -16,7 +16,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "rcerror_socket.h" +#include "crash_report_socket.h" #include #include #include @@ -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(); diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.h b/code/nel/tools/misc/crash_report/crash_report_socket.h index 95092a250..24bf6c451 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.h +++ b/code/nel/tools/misc/crash_report/crash_report_socket.h @@ -21,20 +21,20 @@ #define RCERROR_SOCKET #include -#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 diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 04d06ff94..49925765d 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -17,20 +17,20 @@ // along with this program. If not, see . -#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 #include #include #include -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 ); diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h index 1d016fa52..47d16ad77 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.h +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -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 diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.ui b/code/nel/tools/misc/crash_report/crash_report_widget.ui index b92ac65a6..589810578 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.ui +++ b/code/nel/tools/misc/crash_report/crash_report_widget.ui @@ -1,7 +1,7 @@ - RCErrorWidget - + CrashReportWidget + Qt::ApplicationModal