diff options
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 5ba579895f..dcfc53290a 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -4212,8 +4212,22 @@ QInputDeviceManager *QGuiApplicationPrivate::inputDeviceManager() return m_inputDeviceManager; } +/*! + \fn template <typename QNativeInterface> QNativeInterface *QGuiApplication::nativeInterface() const + + Returns a native interface of the given type for the application. + + This function provides access to platform specific functionality + of QGuiApplication, as defined in the QNativeInterface namespace: + + \annotatedlist native-interfaces-qguiapplication + + If the requested interface is not available a \nullptr is returned. + */ + void *QGuiApplication::resolveInterface(const char *name, int revision) const { + using namespace QNativeInterface; using namespace QNativeInterface::Private; auto *platformIntegration = QGuiApplicationPrivate::platformIntegration(); @@ -4222,6 +4236,9 @@ void *QGuiApplication::resolveInterface(const char *name, int revision) const #if defined(Q_OS_WIN) QT_NATIVE_INTERFACE_RETURN_IF(QWindowsApplication, platformIntegration); #endif +#if QT_CONFIG(xcb) + QT_NATIVE_INTERFACE_RETURN_IF(QX11Application, platformNativeInterface()); +#endif return QCoreApplication::resolveInterface(name, revision); } |