QComboBox: remove dead code

We used to explicitly fade out combobox popups on macOS, but even the
cocoa platform plugin no longer implements a fadeWindow function.

Change-Id: I5cd61da2c755ec0f312c451f0ea966aa48399385
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit dbf6e2db3bb724669b60fdd22221ed023ec1d739)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Volker Hilsheimer 2022-08-26 16:59:25 +02:00 committed by Qt Cherry-pick Bot
parent a1ba8b726e
commit 5eeec29295

View File

@ -2837,30 +2837,11 @@ void QComboBox::hidePopup()
}
}
// Fade out.
bool needFade = style()->styleHint(QStyle::SH_Menu_FadeOutOnHide);
bool didFade = false;
if (needFade) {
#if defined(Q_OS_MAC)
QPlatformNativeInterface *platformNativeInterface = QGuiApplication::platformNativeInterface();
int at = platformNativeInterface->metaObject()->indexOfMethod("fadeWindow()");
if (at != -1) {
QMetaMethod windowFade = platformNativeInterface->metaObject()->method(at);
windowFade.invoke(platformNativeInterface, Q_ARG(QWindow *, d->container->windowHandle()));
didFade = true;
}
#endif // Q_OS_MAC
// Other platform implementations welcome :-)
}
containerBlocker.unblock();
viewBlocker.unblock();
modelBlocker.unblock();
if (!didFade)
#endif // QT_CONFIG(effects)
// Fade should implicitly hide as well ;-)
d->container->hide();
d->container->hide();
}
#ifdef QT_KEYPAD_NAVIGATION
if (QApplicationPrivate::keypadNavigationEnabled() && isEditable() && hasFocus())