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