From 6cf6bc2f667ea229d3864a8767982bdecab7b146 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Thu, 13 Aug 2020 10:46:51 +0000 Subject: coding style fixes git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9472 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlistmodel.h | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'src/qmmpui/playlistmodel.h') diff --git a/src/qmmpui/playlistmodel.h b/src/qmmpui/playlistmodel.h index 11b8c34ca..d4e177714 100644 --- a/src/qmmpui/playlistmodel.h +++ b/src/qmmpui/playlistmodel.h @@ -47,14 +47,6 @@ class PlayListTask; */ struct SimpleSelection { - /*! - * Constructs an empty selection model. - */ - SimpleSelection() - { - m_bottom = -1; - m_top = 1; - } /*! * Returns \p true if this selection is valid; otherwise returns returns \p false. */ @@ -76,8 +68,8 @@ struct SimpleSelection { return m_bottom - m_top + 1; } - int m_bottom; /*!< Bottom of the selection */ - int m_top; /*!< Top of the selection */ + int m_bottom = -1; /*!< Bottom of the selection */ + int m_top = 1; /*!< Top of the selection */ QList m_selected_indexes; /*!< Selected items numbers */ }; /*! @brief The PlayListModel class provides a data model for the playlist. @@ -109,7 +101,7 @@ public: * @param name Playlist name. * @param parent QObject parent */ - PlayListModel(const QString &name, QObject *parent = nullptr); + explicit PlayListModel(const QString &name, QObject *parent = nullptr); /*! * Object destructor. */ @@ -594,13 +586,13 @@ private slots: void onTaskFinished(); private: - PlayListTrack* m_current_track; - PlayListTrack* m_stop_track; - int m_current; + PlayListTrack* m_current_track = nullptr; + PlayListTrack* m_stop_track = nullptr; + int m_current = 0; SimpleSelection m_selection; /*!< This flyweight object represents current selection. */ QQueue m_queued_songs; /*!< Songs in play queue. */ PlayState* m_play_state; /*!< Current playing state (Normal or Shuffle) */ - qint64 m_total_duration; + qint64 m_total_duration = 0; FileLoader *m_loader; QString m_name; PlayListContainer *m_container; -- cgit v1.2.3-13-gbd6f