From 2c0d899b2aa8792ff6eb0eb190c28988a599c89c Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Wed, 17 Nov 2021 07:50:46 +0100 Subject: [PATCH] Fixed pixmap warning in ElidingLabel --- src/ElidingLabel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ElidingLabel.cpp b/src/ElidingLabel.cpp index 1aab918..ac52122 100644 --- a/src/ElidingLabel.cpp +++ b/src/ElidingLabel.cpp @@ -163,8 +163,8 @@ void CElidingLabel::resizeEvent(QResizeEvent *event) //============================================================================ QSize CElidingLabel::minimumSizeHint() const { -#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) - bool HasPixmap = !pixmap().isNull(); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + bool HasPixmap = !pixmap(Qt::ReturnByValue).isNull(); #else bool HasPixmap = (pixmap() != nullptr); #endif @@ -185,8 +185,8 @@ QSize CElidingLabel::minimumSizeHint() const //============================================================================ QSize CElidingLabel::sizeHint() const { -#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) - bool HasPixmap = !pixmap().isNull(); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + bool HasPixmap = !pixmap(Qt::ReturnByValue).isNull(); #else bool HasPixmap = (pixmap() != nullptr); #endif