From e4df00050daf862cdf4683d9cc543a1d835f0c60 Mon Sep 17 00:00:00 2001 From: Andre Siviero Date: Thu, 8 Jan 2015 01:10:35 -0200 Subject: [PATCH] Includes in alphabetical order, moved Player ReloadSettings() to Player init --- src/core/player.cpp | 7 +++++-- src/core/player.h | 2 +- src/ui/mainwindow.cpp | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/player.cpp b/src/core/player.cpp index 171847dd28..ec5038c3b8 100644 --- a/src/core/player.cpp +++ b/src/core/player.cpp @@ -29,10 +29,10 @@ #include +#include #include #include #include -#include #include "config.h" #include "core/application.h" @@ -62,7 +62,8 @@ Player::Player(Application* app, QObject* parent) last_state_(Engine::Empty), nb_errors_received_(0), volume_before_mute_(50), - last_pressed_previous_(QDateTime::currentDateTime()) { + last_pressed_previous_(QDateTime::currentDateTime()), + menu_previousmode_(PreviousBehaviour_DontRestart) { settings_.beginGroup("Player"); SetVolume(settings_.value("volume", 50).toInt()); @@ -89,6 +90,8 @@ void Player::Init() { engine_->SetVolume(settings_.value("volume", 50).toInt()); + ReloadSettings(); + #ifdef HAVE_LIBLASTFM lastfm_ = app_->scrobbler(); #endif diff --git a/src/core/player.h b/src/core/player.h index d9c7ce7c9c..2874050cc0 100644 --- a/src/core/player.h +++ b/src/core/player.h @@ -29,9 +29,9 @@ #include +#include #include #include -#include #include "config.h" #include "core/song.h" diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 5b7e8cb7fc..736762b2a7 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -216,7 +216,6 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd, int volume = app_->player()->GetVolume(); ui_->volume->setValue(volume); VolumeChanged(volume); - app_->player()->ReloadSettings(); // Initialise the global search widget StyleHelper::setBaseColor(palette().color(QPalette::Highlight).darker());