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:
parent
a1ba8b726e
commit
5eeec29295
@ -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();
|
containerBlocker.unblock();
|
||||||
viewBlocker.unblock();
|
viewBlocker.unblock();
|
||||||
modelBlocker.unblock();
|
modelBlocker.unblock();
|
||||||
|
|
||||||
if (!didFade)
|
|
||||||
#endif // QT_CONFIG(effects)
|
#endif // QT_CONFIG(effects)
|
||||||
// Fade should implicitly hide as well ;-)
|
d->container->hide();
|
||||||
d->container->hide();
|
|
||||||
}
|
}
|
||||||
#ifdef QT_KEYPAD_NAVIGATION
|
#ifdef QT_KEYPAD_NAVIGATION
|
||||||
if (QApplicationPrivate::keypadNavigationEnabled() && isEditable() && hasFocus())
|
if (QApplicationPrivate::keypadNavigationEnabled() && isEditable() && hasFocus())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user