Skip to content

Commit c37d644

Browse files
committed
refactor: Remove unused function
1 parent 3a8a697 commit c37d644

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

src/MainWindow.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
445445

446446
#endif
447447

448-
if (_trayIcon->isVisible() && !_allowCloseEvent)
448+
if (_trayIcon->isVisible())
449449
{
450450
hide();
451451
event->ignore();
@@ -463,12 +463,6 @@ void MainWindow::resizeEvent(QResizeEvent *event)
463463
AppConfig::instance().setBytes(AppConfig::LastWindowGeometry, saveGeometry());
464464
}
465465

466-
void MainWindow::shutdown()
467-
{
468-
_allowCloseEvent = true;
469-
this->close();
470-
}
471-
472466
// Systray
473467
void MainWindow::raiseWindow()
474468
{

src/MainWindow.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public slots:
7171
void onRelinkRequested();
7272
void raiseWindow();
7373
void launchFirstRunSetup();
74-
void shutdown();
7574

7675
private slots:
7776
void applyConfig();
@@ -126,7 +125,6 @@ private slots:
126125
IAudioService* _audioService = nullptr;
127126

128127
bool _blockApply = false;
129-
bool _allowCloseEvent = false;
130128

131129
QString _currentImpulseResponse = "";
132130
QString _currentVdc = "";

src/interface/TrayIcon.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ QMenu* TrayIcon::buildAvailableActions()
207207
emit loadReverbPreset("off");
208208
});
209209
reverbMenu->addAction(reverbOff);
210-
for (auto preset : PresetProvider::Reverb::getPresetNames())
210+
for (const auto& preset : PresetProvider::Reverb::getPresetNames())
211211
{
212212
QAction *newEntry = new QAction(preset);
213213
connect(newEntry, &QAction::triggered, this, [this, preset]() {
@@ -220,7 +220,7 @@ QMenu* TrayIcon::buildAvailableActions()
220220

221221
QMenu *eqMenu = new QMenu(tr("&Equalizer presets"), menuOwner);
222222

223-
for (auto preset : PresetProvider::EQ::EQ_LOOKUP_TABLE().keys())
223+
for (const auto& preset : PresetProvider::EQ::EQ_LOOKUP_TABLE().keys())
224224
{
225225
QAction *newEntry = new QAction(preset);
226226
connect(newEntry, &QAction::triggered, this, [this, preset]() {
@@ -238,7 +238,7 @@ QMenu* TrayIcon::buildAvailableActions()
238238
});
239239
bs2bMenu->addAction(bs2bOff);
240240

241-
for (auto preset : PresetProvider::BS2B::BS2B_LOOKUP_TABLE().toStdMap())
241+
for (const auto& preset : PresetProvider::BS2B::BS2B_LOOKUP_TABLE().toStdMap())
242242
{
243243
QAction *newEntry = new QAction(preset.first);
244244
connect(newEntry, &QAction::triggered, this, [this, preset]() {
@@ -274,7 +274,7 @@ QMenu* TrayIcon::buildDefaultActions()
274274
connect(quitAction, &QAction::triggered, qApp, &QCoreApplication::quit);
275275
quitAction->setProperty("tag", "quit");
276276

277-
QMenu *menu = new QMenu();
277+
QMenu *menu = new QMenu();
278278
menu->addAction(tray_disableAction);
279279
menu->addMenu(tray_presetMenu);
280280
menu->addSeparator();

0 commit comments

Comments
 (0)