summaryrefslogtreecommitdiffstats
path: root/src/client/toolbar
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/toolbar')
-rw-r--r--src/client/toolbar/toolbar.cpp10
-rw-r--r--src/client/toolbar/toolbar.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index 416a68f..6fe7432 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -158,11 +158,11 @@ void Toolbar::timerEvent(QTimerEvent* event)
* Slots
*/
-void Toolbar::onDisconnected(QObject* connection)
+void Toolbar::onDisconnected()
{
- if (connection != _connection)
- qDebug("onDisconnect pointer mismatch!");
_connectWindow->setConnected(false);
+ if (_connection != NULL)
+ _connection->blockSignals(true);
_connection = NULL;
lblStatus->setStyleSheet("color:red");
lblStatus->setText(tr("Offline"));
@@ -175,12 +175,12 @@ void Toolbar::onConnected(ServerConnection* connection)
//
if (_connection != NULL)
{
- disconnect(_connection, SIGNAL(destroyed(QObject*)), this, SLOT(onDisconnected(QObject*)));
+ disconnect(_connection, SIGNAL(disconnected()), this, SLOT(onDisconnected()));
_connection->blockSignals(true);
_connection->disconnectFromServer();
}
_connection = connection;
- connect(_connection, SIGNAL(destroyed(QObject*)), this, SLOT(onDisconnected(QObject*)));
+ connect(_connection, SIGNAL(disconnected()), this, SLOT(onDisconnected()));
connect(_connection, SIGNAL(openVnc(const QString&, int, const QString&, bool, bool, const QString&, const int)),
_vnc, SLOT(open(const QString&, int, const QString&, bool, bool, const QString&, const int)));
connect(_connection, SIGNAL(closeVnc()), _vnc, SLOT(close()));
diff --git a/src/client/toolbar/toolbar.h b/src/client/toolbar/toolbar.h
index 0ce4d2b..8887ca7 100644
--- a/src/client/toolbar/toolbar.h
+++ b/src/client/toolbar/toolbar.h
@@ -68,7 +68,7 @@ protected:
*/
private slots:
- void onDisconnected(QObject* connection);
+ void onDisconnected();
void onConnected(ServerConnection* connection);
void onDoDisconnect();
void onQuit();