// need to force the resting of the icon after changing parents
if (testAttribute(Qt::WA_SetWindowIcon))
- d->setWindowIcon_sys(true);
+ d->setWindowIcon_sys();
+
if (isWindow() && !d->topData()->iconText.isEmpty())
d->setWindowIconText_helper(d->topData()->iconText);
if (isWindow() && !d->topData()->caption.isEmpty())
if (!extra->topextra) {
QTLWExtra* x = extra->topextra = new QTLWExtra;
x->icon = 0;
- x->iconPixmap = 0;
x->backingStore = 0;
x->sharedPainter = 0;
x->incw = x->inch = 0;
deleteTLSysExtra();
extra->topextra->backingStoreTracker.destroy();
delete extra->topextra->icon;
- delete extra->topextra->iconPixmap;
delete extra->topextra->backingStore;
delete extra->topextra;
}
d->extra->topextra->icon = new QIcon();
*d->extra->topextra->icon = icon;
- delete d->extra->topextra->iconPixmap;
- d->extra->topextra->iconPixmap = 0;
-
d->setWindowIcon_sys();
d->setWindowIcon_helper();
}
// Regular pointers (keep them together to avoid gaps on 64 bits architectures).
QIcon *icon; // widget icon
- QPixmap *iconPixmap;
QWidgetBackingStoreTracker backingStoreTracker;
QBackingStore *backingStore;
QPainter *sharedPainter;
bool close_helper(CloseMode mode);
void setWindowIcon_helper();
- void setWindowIcon_sys(bool forceReset = false);
+ void setWindowIcon_sys();
void setWindowOpacity_sys(qreal opacity);
void adjustQuitOnCloseAttribute();
}
-void QWidgetPrivate::setWindowIcon_sys(bool /*forceReset*/)
+void QWidgetPrivate::setWindowIcon_sys()
{
+ Q_Q(QWidget);
+ if (QWindow *window = q->windowHandle())
+ window->setWindowIcon(q->windowIcon());
}
void QWidgetPrivate::setWindowIconText_sys(const QString &iconText)