Skip to content

Commit

Permalink
refactor: Remove unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ltoenning committed Mar 17, 2024
1 parent 9f1d948 commit 6200d10
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
10 changes: 0 additions & 10 deletions src/blackgui/components/audionotificationcomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "blackgui/components/audionotificationcomponent.h"
#include "blackgui/guiapplication.h"
#include "blackcore/context/contextaudio.h"
#include "blackmisc/audio/audiodeviceinfo.h"
#include "blackmisc/audio/notificationsounds.h"
#include "blackmisc/audio/audiosettings.h"
#include "blackmisc/sequence.h"
Expand Down Expand Up @@ -82,15 +81,6 @@ namespace BlackGui::Components
CAudioNotificationComponent::~CAudioNotificationComponent()
{}

bool CAudioNotificationComponent::playNotificationSounds() const
{
return ui->cb_SetupAudioPTTClickDown->isChecked() || ui->cb_SetupAudioPTTClickUp->isChecked() ||
ui->cb_SetupAudioNotificationTextMessageFrequency->isChecked() || ui->cb_SetupAudioNotificationTextMessageUnicom->isChecked() ||
ui->cb_SetupAudioNotificationTextMessagePrivate->isChecked() || ui->cb_SetupAudioNotificationTextMessageSupervisor->isChecked() ||
ui->cb_SetupAudioNotificationTextCallsignMentioned->isChecked() ||
ui->cb_SetupAfvBlocked->isChecked() || ui->cb_SetupAfvClicked->isChecked() || ui->cb_SetupAudioNotificationLogin->isChecked() || ui->cb_SetupAudioNotificationLogoff->isChecked();
}

void CAudioNotificationComponent::reloadSettings()
{
const CSettings as(m_audioSettings.getThreadLocal());
Expand Down
5 changes: 1 addition & 4 deletions src/blackgui/components/audionotificationcomponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ namespace BlackGui::Components
explicit CAudioNotificationComponent(QWidget *parent = nullptr);

//! Destructor
virtual ~CAudioNotificationComponent() override;

//! Play any sounds?
bool playNotificationSounds() const;
~CAudioNotificationComponent() override;

private:
//! Init
Expand Down
8 changes: 1 addition & 7 deletions src/blackgui/components/settingscomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ namespace BlackGui::Components
connect(ui->pb_DataLoadAndCaches, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
}

CSettingsComponent::~CSettingsComponent()
{}

bool CSettingsComponent::playNotificationSounds() const
{
return ui->comp_AudioNotification->playNotificationSounds();
}
CSettingsComponent::~CSettingsComponent() = default; // declared in cpp to avoid incomplete type of Ui::CSettingsComponent

CSpecializedSimulatorSettings CSettingsComponent::getSimulatorSettings(const CSimulatorInfo &simulator) const
{
Expand Down
14 changes: 1 addition & 13 deletions src/blackgui/components/settingscomponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ namespace BlackGui::Components
explicit CSettingsComponent(QWidget *parent = nullptr);

//! Destructor
virtual ~CSettingsComponent();

//! \copydoc CAudioNotificationComponent::playNotificationSounds
bool playNotificationSounds() const;
~CSettingsComponent() override;

//! Settings for given simulator
BlackMisc::Simulation::Settings::CSpecializedSimulatorSettings getSimulatorSettings(const BlackMisc::Simulation::CSimulatorInfo &simulator) const;
Expand All @@ -70,15 +67,6 @@ namespace BlackGui::Components
//! Change the windows opacity 0..100
void changedWindowsOpacity(int opacity);

//! Update interval changed (ATC)
void changedAtcStationsUpdateInterval(int seconds);

//! Update interval changed (aircrafts)
void changedAircraftUpdateInterval(int seconds);

//! Update interval changed (users)
void changedUsersUpdateInterval(int seconds);

private:
//! An overview button was clicked
void onOverviewButtonClicked();
Expand Down

0 comments on commit 6200d10

Please sign in to comment.