mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
Use Q_FALLTHROUGH
This commit is contained in:
parent
7be2757c36
commit
b040cf0f96
@ -145,6 +145,9 @@ struct TgaHeaderInfo {
|
|||||||
switch (tga.image_type) {
|
switch (tga.image_type) {
|
||||||
case TGA_TYPE_RLE_INDEXED:
|
case TGA_TYPE_RLE_INDEXED:
|
||||||
rle = true;
|
rle = true;
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
|
||||||
|
Q_FALLTHROUGH();
|
||||||
|
#endif
|
||||||
// no break is intended!
|
// no break is intended!
|
||||||
case TGA_TYPE_INDEXED:
|
case TGA_TYPE_INDEXED:
|
||||||
pal = true;
|
pal = true;
|
||||||
@ -152,6 +155,9 @@ struct TgaHeaderInfo {
|
|||||||
|
|
||||||
case TGA_TYPE_RLE_RGB:
|
case TGA_TYPE_RLE_RGB:
|
||||||
rle = true;
|
rle = true;
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
|
||||||
|
Q_FALLTHROUGH();
|
||||||
|
#endif
|
||||||
// no break is intended!
|
// no break is intended!
|
||||||
case TGA_TYPE_RGB:
|
case TGA_TYPE_RGB:
|
||||||
rgb = true;
|
rgb = true;
|
||||||
@ -159,6 +165,9 @@ struct TgaHeaderInfo {
|
|||||||
|
|
||||||
case TGA_TYPE_RLE_GREY:
|
case TGA_TYPE_RLE_GREY:
|
||||||
rle = true;
|
rle = true;
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
|
||||||
|
Q_FALLTHROUGH();
|
||||||
|
#endif
|
||||||
// no break is intended!
|
// no break is intended!
|
||||||
case TGA_TYPE_GREY:
|
case TGA_TYPE_GREY:
|
||||||
grey = true;
|
grey = true;
|
||||||
|
@ -1323,7 +1323,9 @@ bool XCFImageFormat::initializeImage(XCFImage &xcf_image)
|
|||||||
image.fill(qRgb(255, 255, 255));
|
image.fill(qRgb(255, 255, 255));
|
||||||
break;
|
break;
|
||||||
} // else, fall through to 32-bit representation
|
} // else, fall through to 32-bit representation
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
|
||||||
|
Q_FALLTHROUGH();
|
||||||
|
#endif
|
||||||
case RGBA_GIMAGE:
|
case RGBA_GIMAGE:
|
||||||
image = QImage(xcf_image.width, xcf_image.height, QImage::Format_ARGB32);
|
image = QImage(xcf_image.width, xcf_image.height, QImage::Format_ARGB32);
|
||||||
if (image.isNull()) {
|
if (image.isNull()) {
|
||||||
@ -1343,7 +1345,9 @@ bool XCFImageFormat::initializeImage(XCFImage &xcf_image)
|
|||||||
image.fill(255);
|
image.fill(255);
|
||||||
break;
|
break;
|
||||||
} // else, fall through to 32-bit representation
|
} // else, fall through to 32-bit representation
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
|
||||||
|
Q_FALLTHROUGH();
|
||||||
|
#endif
|
||||||
case GRAYA_GIMAGE:
|
case GRAYA_GIMAGE:
|
||||||
image = QImage(xcf_image.width, xcf_image.height, QImage::Format_ARGB32);
|
image = QImage(xcf_image.width, xcf_image.height, QImage::Format_ARGB32);
|
||||||
if (image.isNull()) {
|
if (image.isNull()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user