mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Remove unused code
This commit is contained in:
@@ -134,9 +134,6 @@ namespace BlackGui
|
||||
void replaceModelsUnvalidated(const BlackMisc::Simulation::CAircraftModelList &models);
|
||||
|
||||
signals:
|
||||
//! Unstash
|
||||
void unstashed(BlackMisc::Simulation::CAircraftModel &model);
|
||||
|
||||
//! Stashed models have been changed
|
||||
void stashedModelsChanged();
|
||||
|
||||
|
||||
@@ -163,20 +163,6 @@ namespace BlackGui
|
||||
ui->comp_NetworkAircraft->showValues();
|
||||
}
|
||||
|
||||
void CLoginOverviewComponent::onSimulatorStatusChanged(int status)
|
||||
{
|
||||
ISimulator::SimulatorStatus s = static_cast<ISimulator::SimulatorStatus>(status);
|
||||
if (!this->hasValidContexts()) { return; }
|
||||
if (sGui->getIContextNetwork()->isConnected())
|
||||
{
|
||||
if (!s.testFlag(ISimulator::Connected))
|
||||
{
|
||||
// sim NOT connected but network connected
|
||||
this->autoLogoffDetection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CLoginOverviewComponent::hasValidContexts() const
|
||||
{
|
||||
if (!sGui || !sGui->supportsContexts()) { return false; }
|
||||
@@ -187,16 +173,5 @@ namespace BlackGui
|
||||
return true;
|
||||
}
|
||||
|
||||
void CLoginOverviewComponent::autoLogoffDetection()
|
||||
{
|
||||
if (!ui->cb_AutoLogoff->isChecked()) { return; }
|
||||
if (!this->hasValidContexts()) { return; }
|
||||
if (!sGui->getIContextNetwork()->isConnected()) { return; } // nothing to logoff
|
||||
|
||||
const CStatusMessage m = CStatusMessage(this, CStatusMessage::SeverityInfo, u"Auto logoff in progress (could be simulator shutdown, crash, closing simulator)");
|
||||
const int delaySecs = 30;
|
||||
this->showOverlayHTMLMessage(m, qRound(1000 * delaySecs * 0.8));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -84,18 +84,6 @@ namespace BlackGui
|
||||
//! Login cancelled
|
||||
void cancel();
|
||||
|
||||
//! Auto-logoff detection
|
||||
void autoLogoffDetection();
|
||||
|
||||
//! Pause/Continue timeout
|
||||
void toggleTimeout();
|
||||
|
||||
//! Set OK button string
|
||||
void setOkButtonString(bool connected);
|
||||
|
||||
//! Simulator status changed
|
||||
void onSimulatorStatusChanged(int status);
|
||||
|
||||
//! Has contexts?
|
||||
bool hasValidContexts() const;
|
||||
|
||||
|
||||
@@ -87,9 +87,6 @@ namespace BlackGui
|
||||
BlackMisc::Simulation::CAircraftModelList findModelsStartingWith(const QString &modelName, Qt::CaseSensitivity cs);
|
||||
|
||||
signals:
|
||||
//! Request a text message
|
||||
void requestTextMessageWidget(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Request the validation dialog
|
||||
void requestValidationDialog();
|
||||
|
||||
|
||||
@@ -148,9 +148,7 @@ namespace BlackMisc
|
||||
CStatusMessageList msgs;
|
||||
msgs.push_back(CStatusMessage(cats).validationInfo(u"DB models: %1") << dbModels.size());
|
||||
|
||||
QSet<QString> newModelStrings; // not in DB yet
|
||||
QSet<QString> unchangedCG;
|
||||
|
||||
for (const QString &modelString : m_modelStringVsCG.keys())
|
||||
{
|
||||
const CAircraftModel dbModel = dbModels.findFirstByModelStringOrDefault(modelString);
|
||||
@@ -161,11 +159,6 @@ namespace BlackMisc
|
||||
unchangedCG.insert(modelString);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// not in DB
|
||||
newModelStrings << modelString;
|
||||
}
|
||||
}
|
||||
|
||||
QSet<QString> unchangedSim;
|
||||
@@ -179,10 +172,6 @@ namespace BlackMisc
|
||||
unchangedSim.insert(modelString);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
newModelStrings << modelString;
|
||||
}
|
||||
}
|
||||
|
||||
// remove
|
||||
|
||||
Reference in New Issue
Block a user