void QGuiApplicationPrivate::createPlatformIntegration()
{
- Q_Q(QGuiApplication);
-
// Use the Qt menus by default. Platform plugins that
// want to enable a native menu implementation can clear
// this flag.
- q->setAttribute(Qt::AA_DontUseNativeMenuBar, true);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
// Load the platform integration
QString platformPluginPath = QLatin1String(qgetenv("QT_QPA_PLATFORM_PLUGIN_PATH"));
*/
bool QPlatformInputContext::inputMethodAccepted() const
{
- Q_D(const QPlatformInputContext);
- return d->s_inputMethodAccepted;
+ return QPlatformInputContextPrivate::s_inputMethodAccepted;
}
bool QPlatformInputContextPrivate::s_inputMethodAccepted = false;
void QPlatformInputContextPrivate::setInputMethodAccepted(bool accepted)
{
- s_inputMethodAccepted = accepted;
+ QPlatformInputContextPrivate::s_inputMethodAccepted = accepted;
}
void QApplicationPrivate::notifyLayoutDirectionChange()
{
- Q_Q(QApplication);
- QWidgetList list = q->topLevelWidgets();
+ QWidgetList list = QApplication::topLevelWidgets();
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
QEvent ev(QEvent::ApplicationLayoutDirectionChange);
- q->sendEvent(w, &ev);
+ QCoreApplication::sendEvent(w, &ev);
}
}
void QApplicationPrivate::notifyActiveWindowChange(QWindow *previous)
{
Q_UNUSED(previous);
- Q_Q(QApplication);
QWindow *wnd = QGuiApplicationPrivate::focus_window;
if (inPopupMode()) // some delayed focus event to ignore
return;
QWidget *tlw = qt_tlw_for_window(wnd);
- q->setActiveWindow(tlw);
+ QApplication::setActiveWindow(tlw);
}
static void ungrabKeyboardForPopup(QWidget *popup)
void QApplicationPrivate::closePopup(QWidget *popup)
{
- Q_Q(QApplication);
if (!popupWidgets)
return;
popupWidgets->removeAll(popup);
fw->setFocus(Qt::PopupFocusReason);
} else {
QFocusEvent e(QEvent::FocusIn, Qt::PopupFocusReason);
- q->sendEvent(fw, &e);
+ QCoreApplication::sendEvent(fw, &e);
}
}
}