Remove unused code

This commit is contained in:
Mat Sutcliffe
2021-08-09 19:32:39 +01:00
parent 68933408db
commit dd3fc42c94
5 changed files with 0 additions and 54 deletions

View File

@@ -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();

View File

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

View File

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

View File

@@ -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();

View File

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