return app_fonts();
}
-QWidgetList *QApplicationPrivate::popupWidgets = 0; // has keyboard input focus
+QWidgetList *QApplicationPrivate::popupWidgets = Q_NULLPTR; // has keyboard input focus
-QDesktopWidget *qt_desktopWidget = 0; // root window widgets
+QDesktopWidget *qt_desktopWidget = Q_NULLPTR; // root window widgets
#ifndef QT_NO_CLIPBOARD
-QClipboard *qt_clipboard = 0; // global clipboard object
+QClipboard *qt_clipboard = Q_NULLPTR; // global clipboard object
#endif
-QWidgetList * qt_modal_stack=0; // stack of modal widgets
+QWidgetList *qt_modal_stack = Q_NULLPTR; // stack of modal widgets
/*!
\internal
sendSpontaneousEvent(qApp, &appDeactivate);
}
- if (QApplicationPrivate::popupWidgets == 0) { // !inPopupMode()
+ if (!QApplicationPrivate::popupWidgets) { // !inPopupMode()
// then focus events
if (!QApplicationPrivate::active_window && QApplicationPrivate::focus_widget) {
QApplicationPrivate::setFocusWidget(0, Qt::ActiveWindowFocusReason);
bool QApplicationPrivate::inPopupMode() const
{
- return QApplicationPrivate::popupWidgets != 0;
+ return QApplicationPrivate::popupWidgets != Q_NULLPTR;
}
/*!
}
if (QApplicationPrivate::popupWidgets->count() == 0) { // this was the last popup
delete QApplicationPrivate::popupWidgets;
- QApplicationPrivate::popupWidgets = 0;
+ QApplicationPrivate::popupWidgets = Q_NULLPTR;
if (!qt_nograb() && popupGrabOk) { // grabbing not disabled
Display *dpy = X11->display;
if (popup->geometry().contains(QPoint(mouseGlobalXPos, mouseGlobalYPos))
if (type == 0) // don't send event
return false;
- if (qApp->d_func()->inPopupMode()) { // in popup mode
+ QWidget *popup = qApp->activePopupWidget();
+ if (popup) { // in popup mode
QWidget *activePopupWidget = qApp->activePopupWidget();
- QWidget *popup = qApp->activePopupWidget();
if (popup != this) {
if (event->type == LeaveNotify)
return false;
\sa show() hide() isVisible()
*/
-bool QWidget::isVisibleTo(QWidget* ancestor) const
+bool QWidget::isVisibleTo(const QWidget* ancestor) const
{
if (!ancestor)
return isVisible();
bool restoreGeometry(const QByteArray &geometry);
void adjustSize();
bool isVisible() const;
- bool isVisibleTo(QWidget*) const;
- // ### Qt 5: bool isVisibleTo(_const_ QWidget *) const
+ bool isVisibleTo(const QWidget*) const;
inline bool isHidden() const;
bool isMinimized() const;