[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdelibs/KDE/4.11] kdecore/io: Make KLimitedIODevice::bytesAvailable return the numbers of bytesAval
From: Albert Astals Cid <aacid () kde ! org>
Date: 2013-11-30 21:44:40
Message-ID: E1VmsLA-0004RG-Ul () scm ! kde ! org
[Download RAW message or body]
Git commit 64a7238c3c082b174e47c3896d6eb0f5c52ab461 by Albert Astals Cid.
Committed on 30/11/2013 at 21:33.
Pushed by aacid into branch 'KDE/4.11'.
Make KLimitedIODevice::bytesAvailable return the numbers of bytesAvaliable to read
At the moment KLimitedIODevice::bytesAvailable is returning at least the size of the \
file, so QIODevice::atEnd never returns true because it thinks there are more bytes \
to read. This makes that if you feed an "invalid" svg like "<?xml version="1.0"?>" to \
the QImageReader it infinite loops believing there will be more stuff to read but \
then read() always returns 0 but then bytesAvailable says there are more and it stays \
there forever.
BUGS: 328182
FIXED-IN: 4.11.5
REVIEW: 114226
M +1 -1 kdecore/io/klimitediodevice.cpp
http://commits.kde.org/kdelibs/64a7238c3c082b174e47c3896d6eb0f5c52ab461
diff --git a/kdecore/io/klimitediodevice.cpp b/kdecore/io/klimitediodevice.cpp
index c93463b..9ec5901 100644
--- a/kdecore/io/klimitediodevice.cpp
+++ b/kdecore/io/klimitediodevice.cpp
@@ -71,7 +71,7 @@ bool KLimitedIODevice::seek( qint64 pos )
qint64 KLimitedIODevice::bytesAvailable() const
{
- return m_length + QIODevice::bytesAvailable();
+ return QIODevice::bytesAvailable();
}
bool KLimitedIODevice::isSequential() const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic