diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-08-24 07:57:52 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-08-24 07:57:52 +0000 |
| commit | 35804feb8272a8f6a9e6003787d88fe915575b12 (patch) | |
| tree | 5dd5b18363185ae774c6f34504e5da545c377467 /src/qmmpui | |
| parent | 0d48ae801429d3513e26ad322489d04a9c83e197 (diff) | |
| download | qmmp-35804feb8272a8f6a9e6003787d88fe915575b12.tar.gz qmmp-35804feb8272a8f6a9e6003787d88fe915575b12.tar.bz2 qmmp-35804feb8272a8f6a9e6003787d88fe915575b12.zip | |
fixed warnings
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3655 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui')
| -rw-r--r-- | src/qmmpui/groupedcontainer.cpp | 2 | ||||
| -rw-r--r-- | src/qmmpui/normalcontainer.cpp | 2 | ||||
| -rw-r--r-- | src/qmmpui/playstate.cpp | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/qmmpui/groupedcontainer.cpp b/src/qmmpui/groupedcontainer.cpp index c30b08fce..52f86a301 100644 --- a/src/qmmpui/groupedcontainer.cpp +++ b/src/qmmpui/groupedcontainer.cpp @@ -128,7 +128,7 @@ PlayListItem *GroupedContainer::item(int index) const { if(index >= count() || index < 0) { - qWarning("PlayListItem: index is out of range"); + qWarning("GroupedContainer: index is out of range"); return 0; } return m_items.at(index); diff --git a/src/qmmpui/normalcontainer.cpp b/src/qmmpui/normalcontainer.cpp index 9a939f83b..1be508521 100644 --- a/src/qmmpui/normalcontainer.cpp +++ b/src/qmmpui/normalcontainer.cpp @@ -95,7 +95,7 @@ PlayListItem *NormalContainer::item(int index) const { if(index >= count() || index < 0) { - qWarning("PlayListItem: index is out of range"); + qWarning("NormalContainer index is out of range"); return 0; } return m_items.at(index); diff --git a/src/qmmpui/playstate.cpp b/src/qmmpui/playstate.cpp index 1cd44b72d..f16f4c85c 100644 --- a/src/qmmpui/playstate.cpp +++ b/src/qmmpui/playstate.cpp @@ -120,7 +120,9 @@ bool NormalPlayState::next() return false; } - if(m_model->track((m_model->currentIndex() + 1))) + if(m_model->currentIndex() + 1 >= m_model->count()) + return false; + else if(m_model->track((m_model->currentIndex() + 1))) return m_model->setCurrent(m_model->currentIndex() + 1); else if(m_model->currentIndex() + 2 > m_model->count() - 1) return false; |
