From 1e1097d7d0ecbc5c48a2cc2ccfd3d4c262013da0 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 2 Mar 2012 07:58:56 +0000 Subject: fixed QIODevice warning git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2668 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmp/soundcore.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qmmp/soundcore.cpp b/src/qmmp/soundcore.cpp index 4dccb3c1c..856f035e5 100644 --- a/src/qmmp/soundcore.cpp +++ b/src/qmmp/soundcore.cpp @@ -232,7 +232,7 @@ void SoundCore::startNextSource() InputSource *s = m_sources.dequeue(); m_url = s->url(); - if(s->ioDevice() && !s->ioDevice()->open(QIODevice::ReadOnly)) + if(s->ioDevice() && !s->ioDevice()->isOpen() && !s->ioDevice()->open(QIODevice::ReadOnly)) { qWarning("SoundCore: input error: %s", qPrintable(s->ioDevice()->errorString())); m_url.clear(); @@ -272,9 +272,7 @@ void SoundCore::startNextSource() } else { - m_sources.prepend(s); //try for next engine - if(s->ioDevice()) - s->ioDevice()->close(); + m_sources.prepend(s); //try next engine m_nextState = ANOTHER_ENGINE; if(state() == Qmmp::Stopped || state() == Qmmp::Buffering) { -- cgit v1.2.3-13-gbd6f