From 43bf478b8577477a4497887dfbe6405bb1ee6d52 Mon Sep 17 00:00:00 2001 From: Liran BN Date: Thu, 26 Jun 2014 18:30:49 +0300 Subject: [PATCH] fixed null pointer --- jceGrade.pro | 1 - src/connection/jcesslclient.cpp | 5 +---- src/connection/jcesslclient.h | 6 +----- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/jceGrade.pro b/jceGrade.pro index 02fd473..b03a0f8 100644 --- a/jceGrade.pro +++ b/jceGrade.pro @@ -11,7 +11,6 @@ TARGET = jceGrade TEMPLATE = app RC_FILE = appConfigure.rc CONFIG += c++11 static - SOURCES += main/coursestablemanager.cpp \ main/loginhandler.cpp \ main/main.cpp \ diff --git a/src/connection/jcesslclient.cpp b/src/connection/jcesslclient.cpp index 7812d8a..65ddb46 100644 --- a/src/connection/jcesslclient.cpp +++ b/src/connection/jcesslclient.cpp @@ -1,6 +1,6 @@ #include "jcesslclient.h" -jceSSLClient::jceSSLClient(QObject *parent) : flag(false), packet("") +jceSSLClient::jceSSLClient() : flag(false), packet("") { connect(this,SIGNAL(error(QAbstractSocket::SocketError)),this,SLOT(checkErrors(QAbstractSocket::SocketError))); connect(this,SIGNAL(connected()),this,SLOT(setConnected())); @@ -83,13 +83,11 @@ bool jceSSLClient::recieveData(std::string &str, bool fast) { p = readAll(); packet.append(p); - debugEdit->setPlainText(debugEdit->toPlainText() + "\n Size" + QString::number(p.size())); }while (p.size() > 0); } } str = packet.toStdString(); - debugEdit->setPlainText(debugEdit->toPlainText() + "\n" + QString::fromStdString(str)); if (str.size() > 0) sflag = true; @@ -103,7 +101,6 @@ void jceSSLClient::readIt() { p = readAll(); packet.append(p); - debugEdit->setPlainText(debugEdit->toPlainText() + "\n Size" + QString::number(p.size())); }while (p.size() > 0); diff --git a/src/connection/jcesslclient.h b/src/connection/jcesslclient.h index 4c45aa6..6e73658 100644 --- a/src/connection/jcesslclient.h +++ b/src/connection/jcesslclient.h @@ -10,13 +10,11 @@ #include #define milisTimeOut 3500 -#include - class jceSSLClient : QSslSocket { Q_OBJECT public: - jceSSLClient(QObject *parent = 0); + jceSSLClient(); bool makeConnect(std::string server,int port); bool isConnected(); @@ -36,8 +34,6 @@ private: bool flag; QString packet; - QPlainTextEdit* debugEdit; - }; #endif // JCESSLCLIENT_H