summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorYang Yuyin <yangyuyin@uniontech.com>2021-03-10 09:41:15 +0800
committerYang Yuyin <yangyuyin@uniontech.com>2021-03-11 16:58:45 +0800
commit2a9c93a3483e60257d2625b70b395cc20dcc88ce (patch)
treef2c54b9179594dd4e1ad94c992e2a1da9c62a6b6 /src/gui/image
parent346d30144a3d110eb5b0b1dd1902c72fafa794e2 (diff)
QIcon::setIsMask: delete extra judgment
QIcon::detach can judgment if the d pointer is nullptr Pick-to: 6.1 Change-Id: I90fd5f50ed2565a5654b978c4603635e62677953 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qicon.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index d3fe8791b7..2b607ac5be 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -1377,8 +1377,7 @@ bool QIcon::hasThemeIcon(const QString &name)
*/
void QIcon::setIsMask(bool isMask)
{
- if (d)
- detach();
+ detach();
if (!d)
d = new QIconPrivate(new QPixmapIconEngine);
d->is_mask = isMask;