Code cleanup, printouts removed
This commit is contained in:
parent
37dcc1ff4f
commit
af2ae018cb
4 changed files with 4 additions and 11 deletions
|
@ -57,7 +57,6 @@ LiveMessageToken LiveMessageToken::parseToken(const QByteArray &string, int* sta
|
||||||
++(*start);
|
++(*start);
|
||||||
int index = string.indexOf('s', (*start));
|
int index = string.indexOf('s', (*start));
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
qDebug() << "Error in" << string;
|
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
bool ok;
|
bool ok;
|
||||||
|
@ -87,7 +86,6 @@ LiveMessageToken LiveMessageToken::parseToken(const QByteArray &string, int* sta
|
||||||
} else { //String
|
} else { //String
|
||||||
int index = string.indexOf(':', (*start));
|
int index = string.indexOf(':', (*start));
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
qDebug() << "Error in" << string;
|
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
|
@ -93,13 +93,13 @@ void LiveObject::disconnect() {
|
||||||
|
|
||||||
void LiveObject::readyRead() {
|
void LiveObject::readyRead() {
|
||||||
QByteArray ba = d->socket->readAll();
|
QByteArray ba = d->socket->readAll();
|
||||||
qDebug() << ba;
|
//qDebug() << ba;
|
||||||
QScopedPointer<LiveMessage> envelope(LiveMessage::fromByteArray(ba));
|
QScopedPointer<LiveMessage> envelope(LiveMessage::fromByteArray(ba));
|
||||||
QString signature = envelope->name();
|
QString signature = envelope->name();
|
||||||
QScopedPointer<LiveMessage> msg(LiveMessage::fromByteArray(envelope->arg(0).stringVal.toUtf8()));
|
QScopedPointer<LiveMessage> msg(LiveMessage::fromByteArray(envelope->arg(0).stringVal.toUtf8()));
|
||||||
|
|
||||||
if (signatureForMessage(envelope->arg(0).stringVal.toUtf8()) != signature) {
|
if (signatureForMessage(envelope->arg(0).stringVal.toUtf8()) != signature) {
|
||||||
qDebug() << "HASH mismatch!" << msg->name();
|
//qDebug() << "HASH mismatch!" << msg->name();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,8 +203,6 @@ void LiveObject::stateChanged( QAbstractSocket::SocketState socketState ) {
|
||||||
emit statusChanged("Reconnecting in " + QString::number(timeout) + " seconds...");
|
emit statusChanged("Reconnecting in " + QString::number(timeout) + " seconds...");
|
||||||
} else if (socketState == QAbstractSocket::ConnectingState) {
|
} else if (socketState == QAbstractSocket::ConnectingState) {
|
||||||
emit statusChanged("Connecting...");
|
emit statusChanged("Connecting...");
|
||||||
} else {
|
|
||||||
//qDebug() << "State:" << socketState;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +213,7 @@ void LiveObject::sslErrors( const QList<QSslError> & errors ) {
|
||||||
case QSslError::SelfSignedCertificate:
|
case QSslError::SelfSignedCertificate:
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
qDebug() << "SSL" << error.errorString();
|
//qDebug() << "SSL" << error.errorString();
|
||||||
everythingOK = false;
|
everythingOK = false;
|
||||||
emit statusChanged("SSL Error");
|
emit statusChanged("SSL Error");
|
||||||
emit errorChanged(error.errorString());
|
emit errorChanged(error.errorString());
|
||||||
|
@ -251,7 +249,7 @@ void LiveObject::serverAssignReply( QNetworkReply *r ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found) {
|
if (found) {
|
||||||
qDebug() << "Servers found, retry direct...";
|
//qDebug() << "Servers found, retry direct...";
|
||||||
d->serverRefreshTime = QDateTime::currentDateTime();
|
d->serverRefreshTime = QDateTime::currentDateTime();
|
||||||
QTimer::singleShot(0, this, SLOT(connectToServer()));
|
QTimer::singleShot(0, this, SLOT(connectToServer()));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
Message::Message(QWidget *parent)
|
Message::Message(QWidget *parent)
|
||||||
:QWidget(parent)
|
:QWidget(parent)
|
||||||
|
@ -20,7 +19,6 @@ Message::Message(QWidget *parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
Message::~Message() {
|
Message::~Message() {
|
||||||
qDebug() << "Why am I dying?";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Message::showMessage( const QString &title, const QString &message, const QString &detailedMessage ) {
|
void Message::showMessage( const QString &title, const QString &message, const QString &detailedMessage ) {
|
||||||
|
|
|
@ -132,7 +132,6 @@ void TelldusCenterApplication::loadScripts() {
|
||||||
if (extension.startsWith("...")) {
|
if (extension.startsWith("...")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// qDebug() << "Loading extension:" << extension;
|
|
||||||
foreach(QDir dir, this->libraryPaths()) {
|
foreach(QDir dir, this->libraryPaths()) {
|
||||||
dir.cd("script");
|
dir.cd("script");
|
||||||
QString path = extension;
|
QString path = extension;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue