summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qxbmhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qxbmhandler.cpp')
-rw-r--r--src/gui/image/qxbmhandler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
index 24d86e116d..65a5b63bc7 100644
--- a/src/gui/image/qxbmhandler.cpp
+++ b/src/gui/image/qxbmhandler.cpp
@@ -97,6 +97,8 @@ static bool read_xbm_header(QIODevice *device, int& w, int& h)
if (r1.indexIn(sbuf) == 0 &&
r2.indexIn(sbuf, r1.matchedLength()) == r1.matchedLength())
w = QByteArray(&buf[r1.matchedLength()]).trimmed().toInt();
+ else
+ return false;
// "#define .._height <num>"
readBytes = device->readLine(buf, buflen);
@@ -109,6 +111,8 @@ static bool read_xbm_header(QIODevice *device, int& w, int& h)
if (r1.indexIn(sbuf) == 0 &&
r2.indexIn(sbuf, r1.matchedLength()) == r1.matchedLength())
h = QByteArray(&buf[r1.matchedLength()]).trimmed().toInt();
+ else
+ return false;
// format error
if (w <= 0 || w > 32767 || h <= 0 || h > 32767)
@@ -352,10 +356,12 @@ void QXbmHandler::setOption(ImageOption option, const QVariant &value)
fileName = value.toString();
}
+#if QT_DEPRECATED_SINCE(5, 13)
QByteArray QXbmHandler::name() const
{
return "xbm";
}
+#endif
QT_END_NAMESPACE