diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-08-13 10:46:51 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-08-13 10:46:51 +0000 |
| commit | 6cf6bc2f667ea229d3864a8767982bdecab7b146 (patch) | |
| tree | afd9602f80bad18e6c69d74feb9d85c561cf65ff /src/qmmpui/playlistmodel.h | |
| parent | 90dedc4493d21f3057d86ce4289eee6471a243b5 (diff) | |
| download | qmmp-6cf6bc2f667ea229d3864a8767982bdecab7b146.tar.gz qmmp-6cf6bc2f667ea229d3864a8767982bdecab7b146.tar.bz2 qmmp-6cf6bc2f667ea229d3864a8767982bdecab7b146.zip | |
coding style fixes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9472 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlistmodel.h')
| -rw-r--r-- | src/qmmpui/playlistmodel.h | 22 |
1 files changed, 7 insertions, 15 deletions
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 @@ -48,14 +48,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. */ inline bool isValid()const @@ -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<int> 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 <PlayListTrack*> 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; |
