Cocoa: Make sure no invisible proxy icon button is created
If the icon is null, don't force creation. Task-number: QTBUG-30064 Change-Id: If639714f667fedfcc67a3393a7d75111a7dbff3f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
f5ea183cc6
commit
21f6ab2860
@ -471,6 +471,8 @@ void QCocoaWindow::setWindowIcon(const QIcon &icon)
|
||||
|
||||
NSButton *iconButton = [m_nsWindow standardWindowButton:NSWindowDocumentIconButton];
|
||||
if (iconButton == nil) {
|
||||
if (icon.isNull())
|
||||
return;
|
||||
NSString *title = QCFString::toNSString(window()->title());
|
||||
[m_nsWindow setRepresentedURL:[NSURL fileURLWithPath:title]];
|
||||
iconButton = [m_nsWindow standardWindowButton:NSWindowDocumentIconButton];
|
||||
|
Loading…
Reference in New Issue
Block a user