Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
QWidget *QApplication::activePopupWidget()
{
- if (QApplicationPrivate::popupWidgets && !QApplicationPrivate::popupWidgets->isEmpty())
+ if (QApplicationPrivate::popupWidgets)
QApplicationPrivate::popupWidgets->last();
return Q_NULLPTR;
}
if (type == 0) // don't send event
return false;
- QWidget *popup = qApp->activePopupWidget();
- if (popup) { // in popup mode
- QWidget *activePopupWidget = qApp->activePopupWidget();
+ if (QApplicationPrivate::popupWidgets) { // in popup mode
+ QWidget *popup = QApplicationPrivate::popupWidgets->last();
+ QWidget *activePopupWidget = QApplicationPrivate::popupWidgets->last();
if (popup != this) {
if (event->type == LeaveNotify)
return false;