mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 23:56:15 +00:00
Class names in Nel start with a C...
This commit is contained in:
parent
f25c6f6103
commit
a2cd433eed
6 changed files with 29 additions and 29 deletions
|
@ -25,7 +25,7 @@ int main( int argc, char **argv )
|
|||
{
|
||||
QApplication app( argc, argv );
|
||||
|
||||
RCErrorWidget w;
|
||||
CRCErrorWidget w;
|
||||
w.setFileName( "rcerrorlog.txt" );
|
||||
w.show();
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <QString>
|
||||
|
||||
|
||||
struct RCErrorData
|
||||
struct SRCErrorData
|
||||
{
|
||||
QString description;
|
||||
QString report;
|
||||
|
|
|
@ -27,26 +27,26 @@ namespace
|
|||
static const char *BUG_URL = "http://192.168.2.66/dfighter/r.php";
|
||||
}
|
||||
|
||||
class RCErrorSocketPvt
|
||||
class CRCErrorSocketPvt
|
||||
{
|
||||
public:
|
||||
QNetworkAccessManager mgr;
|
||||
};
|
||||
|
||||
RCErrorSocket::RCErrorSocket( QObject *parent ) :
|
||||
CRCErrorSocket::CRCErrorSocket( QObject *parent ) :
|
||||
QObject( parent )
|
||||
{
|
||||
m_pvt = new RCErrorSocketPvt();
|
||||
m_pvt = new CRCErrorSocketPvt();
|
||||
|
||||
connect( &m_pvt->mgr, SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished( QNetworkReply* ) ) );
|
||||
}
|
||||
|
||||
RCErrorSocket::~RCErrorSocket()
|
||||
CRCErrorSocket::~CRCErrorSocket()
|
||||
{
|
||||
delete m_pvt;
|
||||
}
|
||||
|
||||
void RCErrorSocket::sendReport( const RCErrorData &data )
|
||||
void CRCErrorSocket::sendReport( const SRCErrorData &data )
|
||||
{
|
||||
QUrl params;
|
||||
params.addQueryItem( "report", data.report );
|
||||
|
@ -60,7 +60,7 @@ void RCErrorSocket::sendReport( const RCErrorData &data )
|
|||
m_pvt->mgr.post( request, params.encodedQuery() );
|
||||
}
|
||||
|
||||
void RCErrorSocket::onFinished( QNetworkReply *reply )
|
||||
void CRCErrorSocket::onFinished( QNetworkReply *reply )
|
||||
{
|
||||
if( reply->error() != QNetworkReply::NoError )
|
||||
Q_EMIT reportFailed();
|
||||
|
|
|
@ -23,18 +23,18 @@
|
|||
#include <QObject>
|
||||
#include "rcerror_data.h"
|
||||
|
||||
class RCErrorSocketPvt;
|
||||
class CRCErrorSocketPvt;
|
||||
class QNetworkReply;
|
||||
|
||||
class RCErrorSocket : public QObject
|
||||
class CRCErrorSocket : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RCErrorSocket( QObject *parent );
|
||||
~RCErrorSocket();
|
||||
CRCErrorSocket( QObject *parent );
|
||||
~CRCErrorSocket();
|
||||
|
||||
void sendReport( const RCErrorData &data );
|
||||
void sendReport( const SRCErrorData &data );
|
||||
|
||||
Q_SIGNALS:
|
||||
void reportSent();
|
||||
|
@ -44,7 +44,7 @@ private Q_SLOTS:
|
|||
void onFinished( QNetworkReply *reply );
|
||||
|
||||
private:
|
||||
RCErrorSocketPvt *m_pvt;
|
||||
CRCErrorSocketPvt *m_pvt;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,12 +25,12 @@
|
|||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
|
||||
RCErrorWidget::RCErrorWidget( QWidget *parent ) :
|
||||
CRCErrorWidget::CRCErrorWidget( QWidget *parent ) :
|
||||
QWidget( parent )
|
||||
{
|
||||
m_ui.setupUi( this );
|
||||
|
||||
m_socket = new RCErrorSocket( this );
|
||||
m_socket = new CRCErrorSocket( this );
|
||||
|
||||
QTimer::singleShot( 1, this, SLOT( onLoad() ) );
|
||||
|
||||
|
@ -42,12 +42,12 @@ QWidget( parent )
|
|||
connect( m_socket, SIGNAL( reportFailed() ), this, SLOT( onReportFailed() ) );
|
||||
}
|
||||
|
||||
RCErrorWidget::~RCErrorWidget()
|
||||
CRCErrorWidget::~CRCErrorWidget()
|
||||
{
|
||||
m_socket = NULL;
|
||||
}
|
||||
|
||||
void RCErrorWidget::onLoad()
|
||||
void CRCErrorWidget::onLoad()
|
||||
{
|
||||
QFile f( m_fileName );
|
||||
bool b = f.open( QFile::ReadOnly | QFile::Text );
|
||||
|
@ -64,12 +64,12 @@ void RCErrorWidget::onLoad()
|
|||
f.close();
|
||||
}
|
||||
|
||||
void RCErrorWidget::onSendClicked()
|
||||
void CRCErrorWidget::onSendClicked()
|
||||
{
|
||||
m_ui.sendButton->setEnabled( false );
|
||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||
|
||||
RCErrorData data;
|
||||
SRCErrorData data;
|
||||
data.description = m_ui.descriptionEdit->toPlainText();
|
||||
data.report = m_ui.reportEdit->toPlainText();
|
||||
data.email = m_ui.emailEdit->text();
|
||||
|
@ -77,17 +77,17 @@ void RCErrorWidget::onSendClicked()
|
|||
m_socket->sendReport( data );
|
||||
}
|
||||
|
||||
void RCErrorWidget::onCancelClicked()
|
||||
void CRCErrorWidget::onCancelClicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void RCErrorWidget::onCBClicked()
|
||||
void CRCErrorWidget::onCBClicked()
|
||||
{
|
||||
m_ui.emailEdit->setEnabled( m_ui.emailCB->isChecked() );
|
||||
}
|
||||
|
||||
void RCErrorWidget::onReportSent()
|
||||
void CRCErrorWidget::onReportSent()
|
||||
{
|
||||
QApplication::setOverrideCursor( Qt::ArrowCursor );
|
||||
|
||||
|
@ -98,7 +98,7 @@ void RCErrorWidget::onReportSent()
|
|||
close();
|
||||
}
|
||||
|
||||
void RCErrorWidget::onReportFailed()
|
||||
void CRCErrorWidget::onReportFailed()
|
||||
{
|
||||
QApplication::setOverrideCursor( Qt::ArrowCursor );
|
||||
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
|
||||
#include "ui_rcerror_widget.h"
|
||||
|
||||
class RCErrorSocket;
|
||||
class CRCErrorSocket;
|
||||
|
||||
class RCErrorWidget : public QWidget
|
||||
class CRCErrorWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RCErrorWidget( QWidget *parent = NULL );
|
||||
~RCErrorWidget();
|
||||
CRCErrorWidget( QWidget *parent = NULL );
|
||||
~CRCErrorWidget();
|
||||
|
||||
void setFileName( const char *fn ){ m_fileName = fn; }
|
||||
|
||||
|
@ -46,7 +46,7 @@ private Q_SLOTS:
|
|||
private:
|
||||
Ui::RCErrorWidget m_ui;
|
||||
QString m_fileName;
|
||||
RCErrorSocket *m_socket;
|
||||
CRCErrorSocket *m_socket;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue