summaryrefslogtreecommitdiffstats
path: root/src/client/connectwindow/connectwindow.cpp
diff options
context:
space:
mode:
authorManuel Schneider2014-11-28 14:54:54 +0100
committerManuel Schneider2014-11-28 14:54:54 +0100
commit303dfd7c1798f4aa211653d1bc66a9998cbe6ceb (patch)
treec3c105a29bdac1ade88a06e7ae264028dbab1150 /src/client/connectwindow/connectwindow.cpp
parentRemove redundant flags (diff)
downloadpvs2-303dfd7c1798f4aa211653d1bc66a9998cbe6ceb.tar.gz
pvs2-303dfd7c1798f4aa211653d1bc66a9998cbe6ceb.tar.xz
pvs2-303dfd7c1798f4aa211653d1bc66a9998cbe6ceb.zip
Reset debug timeouts, fix autoconnect, remove magic numbers
Diffstat (limited to 'src/client/connectwindow/connectwindow.cpp')
-rw-r--r--src/client/connectwindow/connectwindow.cpp10
1 files changed, 4 insertions, 6 deletions
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)