mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Minor tweaks (found during T125)
* formatting/typos * authentication: private slots => private
This commit is contained in:
committed by
Mathew Sutcliffe
parent
ca651877cd
commit
0bbad2ff83
@@ -258,7 +258,6 @@ namespace BlackCore
|
||||
% "swift DB datafile locations: "
|
||||
% getSwiftDbDataFileLocationUrls().toQString(i18n)
|
||||
% separator;
|
||||
|
||||
s +=
|
||||
"VATSIM bookings: "
|
||||
% getVatsimBookingsUrl().toQString(i18n)
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace BlackCore
|
||||
|
||||
QString query = params.toString();
|
||||
const QNetworkRequest request(CNetworkUtils::getNetworkRequest(url, CNetworkUtils::PostUrlEncoded));
|
||||
sApp->postToNetwork(request, query.toUtf8(), { this, &CDatabaseAuthenticationService::ps_parseServerResponse});
|
||||
sApp->postToNetwork(request, query.toUtf8(), { this, &CDatabaseAuthenticationService::parseServerResponse});
|
||||
QString rm("Sent request to authentication server %1");
|
||||
msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityInfo, rm.arg(url.toQString())));
|
||||
return msgs;
|
||||
@@ -100,11 +100,11 @@ namespace BlackCore
|
||||
CUrl url(sApp->getGlobalSetup().getDbLoginServiceUrl());
|
||||
url.setQuery("logoff=true");
|
||||
QNetworkRequest request(CNetworkUtils::getNetworkRequest(url));
|
||||
sApp->getFromNetwork(request, { this, &CDatabaseAuthenticationService::ps_parseServerResponse });
|
||||
sApp->getFromNetwork(request, { this, &CDatabaseAuthenticationService::parseServerResponse });
|
||||
this->m_swiftDbUser.set(CAuthenticatedUser());
|
||||
}
|
||||
|
||||
void CDatabaseAuthenticationService::ps_parseServerResponse(QNetworkReply *nwReplyPtr)
|
||||
void CDatabaseAuthenticationService::parseServerResponse(QNetworkReply *nwReplyPtr)
|
||||
{
|
||||
// always cleanup reply
|
||||
QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> nwReply(nwReplyPtr);
|
||||
@@ -170,7 +170,7 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
void CDatabaseAuthenticationService::ps_userChanged()
|
||||
void CDatabaseAuthenticationService::userChanged()
|
||||
{
|
||||
// code goes here
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace BlackCore
|
||||
namespace Db
|
||||
{
|
||||
//! Databse user used with swift DB. Features role and cookie handling.
|
||||
class BLACKCORE_EXPORT CDatabaseAuthenticationService: public QObject
|
||||
class BLACKCORE_EXPORT CDatabaseAuthenticationService: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -59,15 +59,14 @@ namespace BlackCore
|
||||
//! Logoff completed
|
||||
void logoffFinished();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
//! Parse login answer
|
||||
void ps_parseServerResponse(QNetworkReply *nwReplyPtr);
|
||||
void parseServerResponse(QNetworkReply *nwReplyPtr);
|
||||
|
||||
//! User object changed
|
||||
void ps_userChanged();
|
||||
void userChanged();
|
||||
|
||||
private:
|
||||
BlackMisc::CData<BlackCore::Data::TAuthenticatedDbUser> m_swiftDbUser {this, &CDatabaseAuthenticationService::ps_userChanged};
|
||||
BlackMisc::CData<BlackCore::Data::TAuthenticatedDbUser> m_swiftDbUser {this, &CDatabaseAuthenticationService::userChanged};
|
||||
bool m_shutdown = false;
|
||||
};
|
||||
} // ns
|
||||
|
||||
@@ -239,8 +239,8 @@ namespace BlackCore
|
||||
CAircraftModelList stashModels;
|
||||
if (dbFsFamilyModels.isEmpty() || ownModels.isEmpty()) { return stashModels; }
|
||||
const QSet<QString> dbKeys = dbFsFamilyModels.getModelStringSet();
|
||||
const int mexModelsCount = maxToStash >= 0 ? maxToStash : ownModels.size();
|
||||
if (mexModelsCount < 1) { return stashModels; }
|
||||
const int maxModelsCount = maxToStash >= 0 ? maxToStash : ownModels.size();
|
||||
if (maxModelsCount < 1) { return stashModels; }
|
||||
|
||||
int c = 0; // counter
|
||||
for (const CAircraftModel &ownModel : ownModels)
|
||||
@@ -252,7 +252,7 @@ namespace BlackCore
|
||||
{
|
||||
if (progressIndicator)
|
||||
{
|
||||
const int percentage = c * 100 / mexModelsCount;
|
||||
const int percentage = c * 100 / maxModelsCount;
|
||||
progressIndicator->updateProgressIndicatorAndProcessEvents(percentage);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace BlackCore
|
||||
//! Allow to call directly, special for info objects reader
|
||||
void read();
|
||||
|
||||
//! URL depending on mode
|
||||
//! URL depending on mode, i.e. shared/DB
|
||||
BlackMisc::Network::CUrl getInfoObjectsUrl() const;
|
||||
|
||||
// cache handling for base class: no cache handling here in that case
|
||||
|
||||
Reference in New Issue
Block a user