refactor(ui): Remove manual pilot overwrite functionality

This functionality was rarely known.
This commit is contained in:
Lars Toenning
2024-08-24 00:11:45 +02:00
parent 8fc72226fb
commit 4ea378f751
3 changed files with 0 additions and 50 deletions

View File

@@ -27,8 +27,6 @@ namespace BlackGui::Components
connect(ui->comp_VatsimServers, &CServerListSelector::serverChanged, this, &CNetworkDetailsComponent::onSelectedServerChanged);
connect(ui->tw_Network, &QTabWidget::currentChanged, this, &CNetworkDetailsComponent::onServerTabWidgetChanged);
connect(ui->pb_OtherServersGotoSettings, &QPushButton::pressed, this, &CNetworkDetailsComponent::requestNetworkSettings);
connect(ui->pb_OverrideCredentialsVatsim, &QPushButton::clicked, this, &CNetworkDetailsComponent::onOverrideCredentialsToPilot);
connect(ui->pb_OverrideCredentialsOtherServers, &QPushButton::clicked, this, &CNetworkDetailsComponent::onOverrideCredentialsToPilot);
connect(&m_networkSetup, &CNetworkSetup::setupChanged, this, &CNetworkDetailsComponent::reloadOtherServersSetup, Qt::QueuedConnection);
// web service data
@@ -81,23 +79,6 @@ namespace BlackGui::Components
ui->wi_VatsimButtons->setVisible(visible);
}
void CNetworkDetailsComponent::onOverrideCredentialsToPilot()
{
CServer server;
const QObject *s = QObject::sender();
if (s == ui->pb_OverrideCredentialsOtherServers)
{
server = this->getCurrentOtherServer();
}
else if (s == ui->pb_OverrideCredentialsVatsim)
{
// the VATSIM server selected has no valid user credentials
server = m_networkSetup.getLastVatsimServer();
}
else { return; }
emit this->overridePilot(server.getUser());
}
void CNetworkDetailsComponent::onServerTabWidgetChanged(int index)
{
Q_UNUSED(index)

View File

@@ -90,9 +90,6 @@ namespace BlackGui::Components
//! Set the server buttons visible
void setServerButtonsVisible(bool visible);
//! Override credentials
void onOverrideCredentialsToPilot();
//! VATSIM data file was loaded
void onWebServiceDataRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState state, int number, const QUrl &url);

View File

@@ -103,22 +103,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pb_OverrideCredentialsVatsim">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>copy credentials to pilot section</string>
</property>
<property name="text">
<string> override pilot </string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -196,16 +180,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_OverrideCredentialsOtherServers">
<property name="toolTip">
<string>copy credentials to pilot section</string>
</property>
<property name="text">
<string> override pilot </string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -295,12 +269,10 @@
<tabstops>
<tabstop>tw_Network</tabstop>
<tabstop>comp_VatsimServers</tabstop>
<tabstop>pb_OverrideCredentialsVatsim</tabstop>
<tabstop>le_PartnerCallsign</tabstop>
<tabstop>comp_OtherServers</tabstop>
<tabstop>pb_RefreshOtherServers</tabstop>
<tabstop>pb_OtherServersGotoSettings</tabstop>
<tabstop>pb_OverrideCredentialsOtherServers</tabstop>
</tabstops>
<resources>
<include location="../../blackmisc/blackmisc.qrc"/>