Move client worker methods to correct position

parent 5adbbfc3
Pipeline #15074 passed with stages
in 39 minutes and 40 seconds
......@@ -86,6 +86,11 @@ ClientWorker::ClientWorker(Caches *caches, Kaidan *kaidan, bool enableLogging, Q
connect(app, &QGuiApplication::applicationStateChanged, this, &ClientWorker::setCsiState);
}
VCardManager *ClientWorker::getVCardManager() const
{
return vCardManager;
}
void ClientWorker::main()
{
// initialize random generator
......@@ -191,6 +196,14 @@ void ClientWorker::onConnectionError(QXmppClient::Error error)
}
}
void ClientWorker::setCsiState(Qt::ApplicationState state)
{
if (state == Qt::ApplicationActive)
client->setActive(true);
else
client->setActive(false);
}
QString ClientWorker::generateRandomString(unsigned int length) const
{
const QString resourceChars(KAIDAN_RESOURCE_RANDOM_CHARS);
......@@ -200,16 +213,3 @@ QString ClientWorker::generateRandomString(unsigned int length) const
randomString.append(resourceChars.at(qrand() % resourceChars.length()));
return randomString;
}
VCardManager *ClientWorker::getVCardManager() const
{
return vCardManager;
}
void ClientWorker::setCsiState(Qt::ApplicationState state)
{
if (state == Qt::ApplicationActive)
client->setActive(true);
else
client->setActive(false);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment