mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-18 20:04:16 -04:00
Simplified read/verify header process
Where possible, QIODevice::peek has been used instead of transactions or instead of using ungetchar() for sequential access devices and seek() for random access devices. Furthermore: - RAS format gained the ability of read on sequential devices. - Removed unused code in XCF (still related to ungetchar and sequential devices). - These changes should prevent errors like the ones fixed by MR !258
This commit is contained in:
committed by
Albert Astals Cid
parent
fee0165bef
commit
97120b2537
@ -121,10 +121,8 @@ public:
|
||||
|
||||
bool peek(QIODevice *d)
|
||||
{
|
||||
d->startTransaction();
|
||||
auto ok = read(d);
|
||||
d->rollbackTransaction();
|
||||
return ok;
|
||||
m_rawHeader = d->peek(512);
|
||||
return isValid();
|
||||
}
|
||||
|
||||
bool jumpToImageData(QIODevice *d) const
|
||||
|
Reference in New Issue
Block a user