Minor tweaks (found during T125)

* formatting/typos
* authentication: private slots => private
This commit is contained in:
Klaus Basan
2017-08-15 02:05:43 +02:00
committed by Mathew Sutcliffe
parent ca651877cd
commit 0bbad2ff83
9 changed files with 31 additions and 33 deletions

View File

@@ -258,7 +258,6 @@ namespace BlackCore
% "swift DB datafile locations: "
% getSwiftDbDataFileLocationUrls().toQString(i18n)
% separator;
s +=
"VATSIM bookings: "
% getVatsimBookingsUrl().toQString(i18n)

View File

@@ -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
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -436,7 +436,7 @@ namespace BlackGui
if (this->m_modelLoader->isLoadingInProgress())
{
CLogMessage(this).info("Loading for %1 already in progress") << simulator.toQString();
CLogMessage(this).info("Loading for '%1' already in progress") << simulator.toQString();
return;
}

View File

@@ -141,12 +141,12 @@ namespace BlackGui
private:
QScopedPointer<Ui::COverlayMessages> ui;
BlackMisc::CSettingReadOnly<BlackGui::Settings::TextMessageSettings> m_messageSettings { this };
QString m_header;
int m_lastConfirmation = QMessageBox::Cancel;
bool m_awaitingConfirmation = false;
bool m_hasKillButton = false;
std::function<void()> m_okLambda;
QTimer m_autoCloseTimer { this };
QString m_header;
int m_lastConfirmation = QMessageBox::Cancel;
bool m_awaitingConfirmation = false;
bool m_hasKillButton = false;
std::function<void()> m_okLambda;
QTimer m_autoCloseTimer { this };
QList<std::function<void()>> m_pendingMessageCalls;
//! Init widget

View File

@@ -409,7 +409,7 @@ QString CSwiftLauncher::toCmdLine(const QString &exe, const QStringList &exeArgs
void CSwiftLauncher::ps_startButtonPressed()
{
QObject *sender = QObject::sender();
const QObject *sender = QObject::sender();
if (sender == ui->tb_SwiftGui)
{
if (this->setSwiftGuiExecutable())

View File

@@ -92,8 +92,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>392</width>
<height>349</height>
<width>98</width>
<height>88</height>
</rect>
</property>
<attribute name="label">
@@ -123,8 +123,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>392</width>
<height>349</height>
<width>199</width>
<height>63</height>
</rect>
</property>
<attribute name="label">
@@ -188,8 +188,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>392</width>
<height>349</height>
<width>277</width>
<height>244</height>
</rect>
</property>
<attribute name="label">
@@ -475,7 +475,7 @@
<property name="minimumSize">
<size>
<width>0</width>
<height>80</height>
<height>100</height>
</size>
</property>
</widget>
@@ -515,7 +515,7 @@
<x>0</x>
<y>0</y>
<width>376</width>
<height>199</height>
<height>179</height>
</rect>
</property>
<layout class="QVBoxLayout" name="vl_DataUpdatesScrollArea">
@@ -565,8 +565,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>392</width>
<height>349</height>
<width>98</width>
<height>88</height>
</rect>
</property>
<attribute name="label">