22 Commits

Author SHA1 Message Date
Ahmad Samir
f5d574b3ad clang-tidy: one declaration per line; braces around statements
clang-tidy checks:
readability-isolate-declaration and readability-braces-around-statements

KF task: https://phabricator.kde.org/T14729

GIT_SILENT
2021-08-13 15:13:21 +02:00
Ahmad Samir
1169859b07 Run clang-format on all cpp/h files
NO_CHANGELOG
2021-03-08 20:15:33 +02:00
Ahmad Samir
e3ab850712 Add a trailing comma to enum
Should help produce better diffs and clang-format won't squash the enum
on one line.

GIT_SILENT
2021-03-08 20:14:42 +02:00
Andreas Cord-Landwehr
f4281984c1 Adapt license to LGPL-2.0-or-later
According to relicensecheck Brad is OK with changing LGPLv2 to LGPLv2+,
which is required to be compatible with the LGPL-2.1-or-later licensed
source files.
2020-07-21 09:26:47 +00:00
Albert Astals Cid
645daec1ef ras: Don't overread input on malformed files 2019-04-17 20:03:52 +02:00
Albert Astals Cid
20100a1e0e ras: fix crash on broken files
Replace QVector::operator[] with QVector::value() since we can't know for
sure the values will be on range so use value() that gives us a 0 if the
index is not on range

oss-fuzz/13462
2019-03-01 23:33:35 +01:00
Albert Astals Cid
156bac5e54 ras: protect the palette QVector too
oss-fuzz/13068
2019-02-13 23:50:36 +01:00
Albert Astals Cid
d79c11d280 ras: tweak max file check
better to do - 32 than + 32 otherwise we may overflow

oss-fuzz/13017
2019-02-11 22:57:33 +01:00
Albert Astals Cid
4a8da73f0e ras: tweak max size that "fits" in a QVector
oss-fuzz/12951
2019-02-07 22:14:22 +01:00
Albert Astals Cid
039d7d8fbe ras: don't assert because we try to allicate a huge vector
oss-fuzz/12915
2019-02-06 22:06:58 +01:00
Albert Astals Cid
b072484dbb ras: Protect against divide by zero
oss-fuzz/12905
2019-02-05 19:51:24 +01:00
Albert Astals Cid
1a31500e55 ras: fail gracefully on height*width*bpp > length
oss-fuzz/12822
2019-02-03 13:38:44 +01:00
Albert Astals Cid
8e48d67568 Uncomment the qdebug includes
i've wasted enough time uncommenting and commenting them again
2019-01-31 01:37:09 +01:00
Albert Astals Cid
de7a9a8457 ras: Fix assert because of ColorMapLength being too big
oss-fuzz/12785
2019-01-31 01:03:17 +01:00
Albert Astals Cid
e34f53d6ae ras: Return false if allocating the image failed
Probably because it's too huge
2019-01-29 12:32:23 +01:00
Laurent Montel
e5b226e804 Remove not necessary QtCore and co 2018-03-11 13:49:26 +01:00
Martin Koller
7f2c44add4 Use brace-initializer instead of nullptr in returning 0-QFlags
Differential Revision: https://phabricator.kde.org/D9182
2017-12-05 19:34:30 +01:00
Kevin Funk
740fe5df0e Use nullptr everywhere
Differential Revision: https://phabricator.kde.org/D3987
2017-01-16 09:44:17 +01:00
Albert Astals Cid
55af097749 Don't warn the user/developer about something he can't fix
image formats are loaded via qimage/qimagereader and friends, the user/developer does not choose which ones will be used so giving him a warning about sequential devices not being supported is not going to help anyone, only spam their shell/logs.

REVIEW: 123156
Acked by David Edmundson
2015-03-29 23:21:17 +02:00
Alex Merry
c9ca1f1862 Rename headers to end with _p.h
Frameworks have a convention of naming uninstalled headers in src/ with
a _p at the end of the name, to make it clear they are not part of the
API. None of the headers in KImageFormats are installed, so it is not
really necessary to follow this convention, but we follow it anyway for
the benefit of both humans and tools (like kapidox).
2014-08-03 18:08:49 +01:00
David Faure
02b5e97197 Code reformatted using kde-dev-scripts/astyle-kdelibs.
Use git blame -w 47df948 to show authorship as it was before this commit.
2013-12-18 09:54:11 +01:00
Jenkins CI
47df9483fd Move kimageformats code to the root directory. 2013-12-18 00:45:18 +00:00