mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
Remove unused code
This commit is contained in:
@@ -134,9 +134,6 @@ namespace BlackGui
|
|||||||
void replaceModelsUnvalidated(const BlackMisc::Simulation::CAircraftModelList &models);
|
void replaceModelsUnvalidated(const BlackMisc::Simulation::CAircraftModelList &models);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! Unstash
|
|
||||||
void unstashed(BlackMisc::Simulation::CAircraftModel &model);
|
|
||||||
|
|
||||||
//! Stashed models have been changed
|
//! Stashed models have been changed
|
||||||
void stashedModelsChanged();
|
void stashedModelsChanged();
|
||||||
|
|
||||||
|
|||||||
@@ -163,20 +163,6 @@ namespace BlackGui
|
|||||||
ui->comp_NetworkAircraft->showValues();
|
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
|
bool CLoginOverviewComponent::hasValidContexts() const
|
||||||
{
|
{
|
||||||
if (!sGui || !sGui->supportsContexts()) { return false; }
|
if (!sGui || !sGui->supportsContexts()) { return false; }
|
||||||
@@ -187,16 +173,5 @@ namespace BlackGui
|
|||||||
return true;
|
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
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -84,18 +84,6 @@ namespace BlackGui
|
|||||||
//! Login cancelled
|
//! Login cancelled
|
||||||
void cancel();
|
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?
|
//! Has contexts?
|
||||||
bool hasValidContexts() const;
|
bool hasValidContexts() const;
|
||||||
|
|
||||||
|
|||||||
@@ -87,9 +87,6 @@ namespace BlackGui
|
|||||||
BlackMisc::Simulation::CAircraftModelList findModelsStartingWith(const QString &modelName, Qt::CaseSensitivity cs);
|
BlackMisc::Simulation::CAircraftModelList findModelsStartingWith(const QString &modelName, Qt::CaseSensitivity cs);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! Request a text message
|
|
||||||
void requestTextMessageWidget(const BlackMisc::Aviation::CCallsign &callsign);
|
|
||||||
|
|
||||||
//! Request the validation dialog
|
//! Request the validation dialog
|
||||||
void requestValidationDialog();
|
void requestValidationDialog();
|
||||||
|
|
||||||
|
|||||||
@@ -148,9 +148,7 @@ namespace BlackMisc
|
|||||||
CStatusMessageList msgs;
|
CStatusMessageList msgs;
|
||||||
msgs.push_back(CStatusMessage(cats).validationInfo(u"DB models: %1") << dbModels.size());
|
msgs.push_back(CStatusMessage(cats).validationInfo(u"DB models: %1") << dbModels.size());
|
||||||
|
|
||||||
QSet<QString> newModelStrings; // not in DB yet
|
|
||||||
QSet<QString> unchangedCG;
|
QSet<QString> unchangedCG;
|
||||||
|
|
||||||
for (const QString &modelString : m_modelStringVsCG.keys())
|
for (const QString &modelString : m_modelStringVsCG.keys())
|
||||||
{
|
{
|
||||||
const CAircraftModel dbModel = dbModels.findFirstByModelStringOrDefault(modelString);
|
const CAircraftModel dbModel = dbModels.findFirstByModelStringOrDefault(modelString);
|
||||||
@@ -161,11 +159,6 @@ namespace BlackMisc
|
|||||||
unchangedCG.insert(modelString);
|
unchangedCG.insert(modelString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// not in DB
|
|
||||||
newModelStrings << modelString;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QSet<QString> unchangedSim;
|
QSet<QString> unchangedSim;
|
||||||
@@ -179,10 +172,6 @@ namespace BlackMisc
|
|||||||
unchangedSim.insert(modelString);
|
unchangedSim.insert(modelString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
newModelStrings << modelString;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
|
|||||||
Reference in New Issue
Block a user