From dbf6e2db3bb724669b60fdd22221ed023ec1d739 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 26 Aug 2022 16:59:25 +0200 Subject: 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. Pick-to: 6.4 Change-Id: I5cd61da2c755ec0f312c451f0ea966aa48399385 Reviewed-by: Richard Moe Gustavsen --- src/widgets/widgets/qcombobox.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/widgets/widgets/qcombobox.cpp') diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index e754d02f2a..d4a33c5dc0 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -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()) -- cgit v1.2.3