MCPcopy Create free account
hub / github.com/Greedysky/TTKMusicPlayer / currentFilePath

Method currentFilePath

TTKModule/musicapplication.cpp:138–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138QString MusicApplication::currentFilePath() const
139{
140 if(m_playlist->currentIndex() < 0 || m_currentPlaylistRow < 0)
141 {
142 return {};
143 }
144
145 const MusicPlayItem &item = m_playlist->currentItem();
146 const MusicSongItemList &items = m_songTreeWidget->items();
147
148 if(0 <= m_currentPlaylistRow && m_currentPlaylistRow < items.count())
149 {
150 const MusicSongList &songs = items[m_currentPlaylistRow].m_songs;
151 const int index = m_songTreeWidget->mapSongIndexByFilePath(m_currentPlaylistRow, item.m_path);
152 return (index != -1) ? songs[index].path() : QString();
153 }
154 return {};
155}
156
157bool MusicApplication::checkMusicListCurrentIndex() const
158{

Callers 2

addSongToLovestListMethod · 0.80
songListSortByMethod · 0.80

Calls 7

QStringClass · 0.85
currentItemMethod · 0.80
itemsMethod · 0.80
pathMethod · 0.80
currentIndexMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected