mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
[AFV] Add client version to API auth
This commit is contained in:
committed by
Klaus Basan
parent
f980fd02d5
commit
2362e25593
@@ -119,13 +119,13 @@ namespace BlackCore
|
||||
m_connectedWithContext = true;
|
||||
}
|
||||
|
||||
void CAfvClient::connectTo(const QString &cid, const QString &password, const QString &callsign)
|
||||
void CAfvClient::connectTo(const QString &cid, const QString &password, const QString &callsign, const QString &client)
|
||||
{
|
||||
if (QThread::currentThread() != thread())
|
||||
{
|
||||
// Method needs to be executed in the object thread since it will create new QObject children
|
||||
QPointer<CAfvClient> myself(this);
|
||||
QMetaObject::invokeMethod(this, [ = ]() { if (myself) { connectTo(cid, password, callsign); }});
|
||||
QMetaObject::invokeMethod(this, [ = ]() { if (myself) { connectTo(cid, password, callsign, client); }});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace BlackCore
|
||||
QMutexLocker lock(&m_mutexConnection);
|
||||
|
||||
// async connection
|
||||
m_connection->connectTo(cid, password, callsign, { this, [ = ](bool authenticated)
|
||||
m_connection->connectTo(cid, password, callsign, client, { this, [ = ](bool authenticated)
|
||||
{
|
||||
// this is the callback when the connection has been established
|
||||
|
||||
|
||||
Reference in New Issue
Block a user