diff options
Diffstat (limited to 'src/gui/kernel/qplatformintegration.cpp')
-rw-r--r-- | src/gui/kernel/qplatformintegration.cpp | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index 1e40489222..130b479c64 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -6,6 +6,7 @@ #include <qpa/qplatformfontdatabase.h> #include <qpa/qplatformclipboard.h> #include <qpa/qplatformaccessibility.h> +#include <qpa/qplatformkeymapper.h> #include <qpa/qplatformtheme.h> #include <QtGui/private/qguiapplication_p.h> #include <QtGui/private/qpixmap_raster_p.h> @@ -151,7 +152,7 @@ QPlatformServices *QPlatformIntegration::services() const /*! \enum QPlatformIntegration::Capability - Capabilities are used to determing specific features of a platform integration + Capabilities are used to determine specific features of a platform integration \value ThreadedPixmaps The platform uses a pixmap implementation that is reentrant and can be used from multiple threads, like the raster paint engine and QImage based @@ -228,6 +229,11 @@ QPlatformServices *QPlatformIntegration::services() const \value ScreenWindowGrabbing The platform supports grabbing window on screen. On Wayland, this capability can be reported as \c false. The default implementation of hasCapability() returns \c true. + + \value BackingStoreStaticContents The platform backingstore supports static contents. + On resize of the backingstore the static contents region is provided, and the backing + store is expected to propagate the static content to the resized backing store, without + clients needing to repaint the static content region. */ /*! @@ -342,7 +348,22 @@ QPlatformInputContext *QPlatformIntegration::inputContext() const return nullptr; } -#ifndef QT_NO_ACCESSIBILITY +/*! + Accessor for the platform integration's key mapper. + + Default implementation returns a default QPlatformKeyMapper. + + \sa QPlatformKeyMapper +*/ +QPlatformKeyMapper *QPlatformIntegration::keyMapper() const +{ + static QPlatformKeyMapper *keyMapper = nullptr; + if (!keyMapper) + keyMapper = new QPlatformKeyMapper; + return keyMapper; +} + +#if QT_CONFIG(accessibility) /*! Returns the platforms accessibility. @@ -393,7 +414,7 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const case UseRtlExtensions: return QVariant(false); case SetFocusOnTouchRelease: - return QVariant(false); + return QPlatformTheme::defaultThemeHint(QPlatformTheme::SetFocusOnTouchRelease); case MousePressAndHoldInterval: return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval); case TabFocusBehavior: @@ -408,6 +429,16 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const return QPlatformTheme::defaultThemeHint(QPlatformTheme::WheelScrollLines); case MouseQuickSelectionThreshold: return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseQuickSelectionThreshold); + case MouseDoubleClickDistance: + return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickDistance); + case FlickStartDistance: + return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickStartDistance); + case FlickMaximumVelocity: + return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickMaximumVelocity); + case FlickDeceleration: + return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickDeceleration); + case UnderlineShortcut: + return true; } return 0; @@ -561,7 +592,21 @@ void QPlatformIntegration::setApplicationIcon(const QIcon &icon) const Q_UNUSED(icon); } -#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) +/*! + \since 6.5 + + Should set the application's badge to \a number. + + If the number is 0 the badge should be cleared. + + \sa QGuiApplication::setBadge() +*/ +void QPlatformIntegration::setApplicationBadge(qint64 number) +{ + Q_UNUSED(number); +} + +#if QT_CONFIG(vulkan) || defined(Q_QDOC) /*! Factory function for QPlatformVulkanInstance. The \a instance parameter is a |