aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-01-29 14:40:56 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-01-29 14:42:19 +0100
commitbd2cdb9393938a9d27ff8bce38c23dd10f7064af (patch)
tree670ecf759ec6b5e248859633ccbbce08364f2753
parent276180caa8d97f7da9229e5b999365316940b959 (diff)
QZbarImage.h: byteCount is now obsolete
In file included from ./include/zbar/QZBarImage.h:29, from qt/QZBarThread.h:30, from qt/moc_QZBarThread.cpp:10: /usr/include/qt5/QtGui/qimage.h:222:44: note: declared here 222 | QT_DEPRECATED_X("Use sizeInBytes") int byteCount() const; Replace it as recommented by Qt warning. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--include/zbar/QZBarImage.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/zbar/QZBarImage.h b/include/zbar/QZBarImage.h
index b862c80..a246f50 100644
--- a/include/zbar/QZBarImage.h
+++ b/include/zbar/QZBarImage.h
@@ -54,7 +54,9 @@ public:
unsigned height = qimg.height();
set_size(width, height);
set_format(zbar_fourcc('B','G','R','4'));
-#if QT_VERSION >= 0x050000
+#if QT_VERSION >= QT_VERSION_CHECK(5,10,0)
+ unsigned long datalen = qimg.sizeInBytes();
+#elif QT_VERSION >= QT_VERSION_CHECK(5,0,0)
unsigned long datalen = qimg.byteCount();
#else
unsigned long datalen = qimg.numBytes();

Privacy Policy