mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25:36 +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
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace BlackCore
|
||||
//! Connect to network
|
||||
//! \threadsafe
|
||||
//! \remark runs in thread of CAfvClient object and is ASYNC when called from another thread
|
||||
Q_INVOKABLE void connectTo(const QString &cid, const QString &password, const QString &getCallsign);
|
||||
Q_INVOKABLE void connectTo(const QString &cid, const QString &password, const QString &getCallsign, const QString &client);
|
||||
|
||||
//! Disconnect from network
|
||||
//! \threadsafe
|
||||
|
||||
Reference in New Issue
Block a user