QDir::Files | QDir::Readable,
QDir::Name);
m_currentIndex = 0;
-foreach(const QFileInfo &f, entryList)
-{
- qDebug() << f.absoluteFilePath();
-}
}
int DirectoryPlaylist::indexOfFile(const QString &file) const
void DirectoryPlaylist::next()
{
+ if (entryList.isEmpty())
+ return;
+
++m_currentIndex;
if (m_currentIndex == count())
m_currentIndex = 0;
void DirectoryPlaylist::previous()
{
+ if (entryList.isEmpty())
+ return;
+
--m_currentIndex;
if (m_currentIndex == -1)
m_currentIndex = count() - 1;