summaryrefslogtreecommitdiffstats
path: root/src/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-01-28 13:43:32 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-01-31 16:01:30 +0100
commitb3b244669a16b49f037bd4b8b1faa9d677c2b900 (patch)
tree5806330917dac0c0d4b253e927127a5085f74233 /src/designer
parent435a7e914aacc571bfab8a7af808761f920b7bf8 (diff)
Qt Designer: Fix deprecation warning about const QPixmap* QLabel::pixmap()
Fix warning: shared\iconselector.cpp: In member function 'void qdesigner_internal::IconThemeEditor::updatePreview(const QString&)': shared\iconselector.cpp:594:64: warning: 'const QPixmap* QLabel::pixmap() const' is deprecated: Use the other overload which returns QPixmap by-value [-Wdeprecated-declarations] const QPixmap *currentPixmap = d->m_themeLabel->pixmap(); Change-Id: Ib15a354133f65b5a55edfe5e11a046aa675ac0a2 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Diffstat (limited to 'src/designer')
-rw-r--r--src/designer/src/lib/shared/iconselector.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/designer/src/lib/shared/iconselector.cpp b/src/designer/src/lib/shared/iconselector.cpp
index 05aaa9c98..ccfdc5c18 100644
--- a/src/designer/src/lib/shared/iconselector.cpp
+++ b/src/designer/src/lib/shared/iconselector.cpp
@@ -591,8 +591,7 @@ void IconThemeEditor::updatePreview(const QString &t)
{
// Update preview label with icon.
if (t.isEmpty() || !QIcon::hasThemeIcon(t)) { // Empty
- const QPixmap *currentPixmap = d->m_themeLabel->pixmap();
- if (currentPixmap == nullptr || currentPixmap->cacheKey() != d->m_emptyPixmap.cacheKey())
+ if (d->m_themeLabel->pixmap(Qt::ReturnByValue).cacheKey() != d->m_emptyPixmap.cacheKey())
d->m_themeLabel->setPixmap(d->m_emptyPixmap);
} else {
const QIcon icon = QIcon::fromTheme(t);