Skip to content

Commit

Permalink
Includes in alphabetical order, moved Player ReloadSettings() to Play…
Browse files Browse the repository at this point in the history
…er init
  • Loading branch information
asiviero committed Jan 8, 2015
1 parent 1120f97 commit e4df000
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/core/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

#include <memory>

#include <QSettings>
#include <QSortFilterProxyModel>
#include <QtDebug>
#include <QtConcurrentRun>
#include <QSettings>

#include "config.h"
#include "core/application.h"
Expand Down Expand Up @@ -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());
Expand All @@ -89,6 +90,8 @@ void Player::Init() {

engine_->SetVolume(settings_.value("volume", 50).toInt());

ReloadSettings();

#ifdef HAVE_LIBLASTFM
lastfm_ = app_->scrobbler();
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/core/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

#include <memory>

#include <QDateTime>
#include <QObject>
#include <QSettings>
#include <QDateTime>

#include "config.h"
#include "core/song.h"
Expand Down
1 change: 0 additions & 1 deletion src/ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit e4df000

Please sign in to comment.