mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Replace INetwork::CConnectionStatus with proper value object
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
#include "blackcore/context/contextaudio.h"
|
||||
#include "blackcore/context/contextnetwork.h"
|
||||
#include "blackcore/context/contextsimulator.h"
|
||||
#include "blackcore/network.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackcore/corefacadeconfig.h"
|
||||
#include "blackmisc/audio/notificationsounds.h"
|
||||
@@ -304,17 +303,16 @@ void SwiftGuiStd::onKickedFromNetwork(const QString &kickMessage)
|
||||
// this->displayInOverlayWindow(CStatusMessage(this, CStatusMessage::SeverityError, msgText));
|
||||
}
|
||||
|
||||
void SwiftGuiStd::onConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to)
|
||||
void SwiftGuiStd::onConnectionStatusChanged(const CConnectionStatus &from, const CConnectionStatus &to)
|
||||
{
|
||||
Q_UNUSED(from);
|
||||
this->updateGuiStatusInformation();
|
||||
|
||||
// sounds
|
||||
switch (to)
|
||||
switch (to.getConnectionStatus())
|
||||
{
|
||||
case INetwork::Connected: this->playNotifcationSound(CNotificationSounds::NotificationLogin); break;
|
||||
case INetwork::Disconnected: this->playNotifcationSound(CNotificationSounds::NotificationLogoff); break;
|
||||
case INetwork::DisconnectedError: this->playNotifcationSound(CNotificationSounds::NotificationError); break;
|
||||
case CConnectionStatus::Connected: this->playNotifcationSound(CNotificationSounds::NotificationLogin); break;
|
||||
case CConnectionStatus::Disconnected: this->playNotifcationSound(CNotificationSounds::NotificationLogoff); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "blackgui/managedstatusbar.h"
|
||||
#include "blackgui/guiactionbind.h"
|
||||
#include "blackcore/actionbind.h"
|
||||
#include "blackcore/network.h"
|
||||
#include "blackmisc/network/connectionstatus.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/simulation/autopublishdata.h"
|
||||
#include "blackmisc/audio/notificationsounds.h"
|
||||
@@ -209,7 +209,7 @@ private:
|
||||
//! Connection status changed
|
||||
//! \param from old status
|
||||
//! \param to new status
|
||||
void onConnectionStatusChanged(BlackCore::INetwork::ConnectionStatus from, BlackCore::INetwork::ConnectionStatus to);
|
||||
void onConnectionStatusChanged(const BlackMisc::Network::CConnectionStatus &from, const BlackMisc::Network::CConnectionStatus &to);
|
||||
|
||||
//
|
||||
// GUI related functions
|
||||
|
||||
Reference in New Issue
Block a user