QIcon::setIsMask: delete extra judgment

QIcon::detach can judgment if the d pointer is nullptr

Change-Id: I90fd5f50ed2565a5654b978c4603635e62677953
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 2a9c93a3483e60257d2625b70b395cc20dcc88ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Yang Yuyin 2021-03-10 09:41:15 +08:00 committed by Qt Cherry-pick Bot
parent bdf13bf3cb
commit bf89fa82a2

View File

@ -1377,7 +1377,6 @@ bool QIcon::hasThemeIcon(const QString &name)
*/
void QIcon::setIsMask(bool isMask)
{
if (d)
detach();
if (!d)
d = new QIconPrivate(new QPixmapIconEngine);