Skip to content

Commit 2c0d899

Browse files
Fixed pixmap warning in ElidingLabel
1 parent 1abe101 commit 2c0d899

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ElidingLabel.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ void CElidingLabel::resizeEvent(QResizeEvent *event)
163163
//============================================================================
164164
QSize CElidingLabel::minimumSizeHint() const
165165
{
166-
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
167-
bool HasPixmap = !pixmap().isNull();
166+
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
167+
bool HasPixmap = !pixmap(Qt::ReturnByValue).isNull();
168168
#else
169169
bool HasPixmap = (pixmap() != nullptr);
170170
#endif
@@ -185,8 +185,8 @@ QSize CElidingLabel::minimumSizeHint() const
185185
//============================================================================
186186
QSize CElidingLabel::sizeHint() const
187187
{
188-
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
189-
bool HasPixmap = !pixmap().isNull();
188+
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
189+
bool HasPixmap = !pixmap(Qt::ReturnByValue).isNull();
190190
#else
191191
bool HasPixmap = (pixmap() != nullptr);
192192
#endif

0 commit comments

Comments
 (0)