From 303dfd7c1798f4aa211653d1bc66a9998cbe6ceb Mon Sep 17 00:00:00 2001 From: Manuel Schneider Date: Fri, 28 Nov 2014 14:54:54 +0100 Subject: Reset debug timeouts, fix autoconnect, remove magic numbers --- src/client/connectwindow/connectwindow.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/client/connectwindow/connectwindow.cpp') diff --git a/src/client/connectwindow/connectwindow.cpp b/src/client/connectwindow/connectwindow.cpp index 6f75e29..b84f22c 100644 --- a/src/client/connectwindow/connectwindow.cpp +++ b/src/client/connectwindow/connectwindow.cpp @@ -42,8 +42,8 @@ ConnectWindow::ConnectWindow(QWidget *parent) : QWidget(parent) connect(_ui->btn_hide, SIGNAL(clicked()), this, SLOT(onBtnHide())); // React on discovery signal - connect(&_serverDiscovery, SIGNAL(serverDetected(QString,quint16,QByteArray,QByteArray)), - this, SLOT(onServerDetected(QString,quint16,QByteArray,QByteArray))); + connect(&_serverDiscovery, SIGNAL(serverDetected(QString,quint16,QByteArray,QByteArray,bool)), + this, SLOT(onServerDetected(QString,quint16,QByteArray,QByteArray,bool))); this->updateUserInterface(); } @@ -220,9 +220,9 @@ void ConnectWindow::onBtnHide() * @param sessionName * @param certHash */ -void ConnectWindow::onServerDetected(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash) +void ConnectWindow::onServerDetected(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect) { - _connection = new ServerConnection(host, port, sessionName, certHash); + _connection = new ServerConnection(host, port, sessionName, certHash, autoConnect); connect(_connection, SIGNAL(stateChange(ConnectWindow::ConnectionState)), this, SLOT(onConnectionStateChange(ConnectWindow::ConnectionState))); connect(_connection, SIGNAL(destroyed(QObject*)), this, SLOT(onConnectionClosed(QObject*))); connect(_connection, SIGNAL(disconnected()), this, SLOT(onConnectionDisconnected())); @@ -235,7 +235,6 @@ void ConnectWindow::onServerDetected(const QString& host, const quint16 port, co */ void ConnectWindow::onConnectionStateChange(ConnectWindow::ConnectionState state) { - qDebug() << "STATE!"<< state; bool reset = (_state == Scanning); if (state == InvalidSslHash) ++_hashSslErrorCount; @@ -244,7 +243,6 @@ void ConnectWindow::onConnectionStateChange(ConnectWindow::ConnectionState state this->updateUserInterface(); if (reset) { - qDebug() << "RESET!!"<< state; _state = Scanning; } if (state == Connected) -- cgit v1.2.3-55-g7522