diff --git a/harbour-wlan-keyboard/src/server_configurator.cpp b/harbour-wlan-keyboard/src/server_configurator.cpp index 21a18ec..e9b2326 100644 --- a/harbour-wlan-keyboard/src/server_configurator.cpp +++ b/harbour-wlan-keyboard/src/server_configurator.cpp @@ -17,7 +17,7 @@ void ServerConfigurator::configure(QQuickView *view) this->m_websocket_server = new websocket_server(QObject::parent()); view->rootContext()->setContextProperty("websocketServer", m_websocket_server); connect(m_websocket_server, SIGNAL(processMessage(QString*)), this, SLOT(processSocketMessage(QString*))); - //connect(m_websocket_server, SIGNAL(processNewClientConnected())), this, SLOT(onNewClientConnected()); + connect(m_websocket_server, SIGNAL(processNewClientConnected()), this, SLOT(onNewClientConnected())); this->m_http_server = new http_server(QObject::parent()); m_http_server->setBasePath("/usr/share/harbour-wlan-keyboard/publish/"); @@ -136,7 +136,7 @@ void ServerConfigurator::onNewClientConnected() void ServerConfigurator::onSettingsChanged(Settings * s) { - + qDebug("Client is requesting app settigs"); sendSettingsToWsClients(s->toJson()); } diff --git a/harbour-wlan-keyboard/src/websocket_server.cpp b/harbour-wlan-keyboard/src/websocket_server.cpp index c504187..9875ad6 100644 --- a/harbour-wlan-keyboard/src/websocket_server.cpp +++ b/harbour-wlan-keyboard/src/websocket_server.cpp @@ -70,6 +70,7 @@ void websocket_server::processNewConnection() QObject::connect(clientSocket, SIGNAL(pong(quint64)), this, SLOT(processPong(quint64))); m_clients << clientSocket; + emit processNewClientConnected(); qDebug() << "New websocket client connected"; }