mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refactor(ui): Remove manual pilot overwrite functionality
This functionality was rarely known.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user