aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/mpris
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-08-12 21:03:34 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-08-12 21:03:34 +0000
commit7ef8d11baeaf1847ba7f1df5d858f8cffea9300d (patch)
treea741fb49db8834efd4b46d760b89082547eb2a9d /src/plugins/General/mpris
parent6f301f5880f7efce76ed46e7b502830642b87370 (diff)
downloadqmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.gz
qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.bz2
qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.zip
coding style fixes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9470 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/mpris')
-rw-r--r--src/plugins/General/mpris/player2object.cpp9
-rw-r--r--src/plugins/General/mpris/player2object.h6
2 files changed, 7 insertions, 8 deletions
diff --git a/src/plugins/General/mpris/player2object.cpp b/src/plugins/General/mpris/player2object.cpp
index 666c9511e..211109d03 100644
--- a/src/plugins/General/mpris/player2object.cpp
+++ b/src/plugins/General/mpris/player2object.cpp
@@ -32,8 +32,6 @@
Player2Object::Player2Object(QObject *parent) : QDBusAbstractAdaptor(parent)
{
- m_prev_track = nullptr;
- m_previous_pos = 0;
m_core = SoundCore::instance();
m_player = MediaPlayer::instance();
m_pl_manager = m_player->playListManager();
@@ -334,9 +332,10 @@ void Player2Object::checkSeeking(qint64 elapsed)
void Player2Object::playTrack(PlayListTrack *item)
{
- m_pl_manager->selectPlayList((PlayListModel*)sender());
- m_pl_manager->activatePlayList((PlayListModel*)sender());
- disconnect(sender(), SIGNAL(trackAdded(PlayListTrack*)), this, SLOT(playTrack(PlayListTrack*)));
+ PlayListModel *model = qobject_cast<PlayListModel*>(sender());
+ m_pl_manager->selectPlayList(model);
+ m_pl_manager->activatePlayList(model);
+ disconnect(model, SIGNAL(trackAdded(PlayListTrack*)), this, SLOT(playTrack(PlayListTrack*)));
if(!m_pl_manager->currentPlayList()->setCurrent(item))
return;
m_core->stop();
diff --git a/src/plugins/General/mpris/player2object.h b/src/plugins/General/mpris/player2object.h
index af69844a4..dc271e630 100644
--- a/src/plugins/General/mpris/player2object.h
+++ b/src/plugins/General/mpris/player2object.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010-2015 by Ilya Kotov *
+ * Copyright (C) 2010-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -111,8 +111,8 @@ private:
QmmpUiSettings *m_ui_settings;
QMap<QString, QVariant> m_props;
QDBusObjectPath m_trackID;
- PlayListTrack *m_prev_track;
- qint64 m_previous_pos;
+ PlayListTrack *m_prev_track = nullptr;
+ qint64 m_previous_pos = 0;
};