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:
parent
bdf13bf3cb
commit
bf89fa82a2
@ -1377,8 +1377,7 @@ bool QIcon::hasThemeIcon(const QString &name)
|
|||||||
*/
|
*/
|
||||||
void QIcon::setIsMask(bool isMask)
|
void QIcon::setIsMask(bool isMask)
|
||||||
{
|
{
|
||||||
if (d)
|
detach();
|
||||||
detach();
|
|
||||||
if (!d)
|
if (!d)
|
||||||
d = new QIconPrivate(new QPixmapIconEngine);
|
d = new QIconPrivate(new QPixmapIconEngine);
|
||||||
d->is_mask = isMask;
|
d->is_mask = isMask;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user