From 417a2210725f4aad83688b494fbc9d45342c134a Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Thu, 9 Apr 2015 23:36:38 +0200 Subject: Expose ItemViewActivateItemOnSingleClick in QStyleHints This completes support for ItemViewActivateItemOnSingleClick in QPlatformIntegration and exposes the setting in QStyleHints. Based on the review process, the public name used is 'singleClickActivation' for brevity, as well as to avoid con- fusion over alluding to "item views" in the Qt Quick context. KDE Plasma intends to use this via Qt.styleHints to have Qt Quick-based UI correctly implement the global single vs. double click user preference for item activation. [ChangeLog][QtGui] Added QStyleHints::singleClickActivation to access whether the platform expects item activation to occur on single clicks rather than double clicks. Change-Id: I0916e9e68c3a157f95053da8227b2612803653f7 Reviewed-by: Friedemann Kleint --- src/gui/kernel/qplatformtheme.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/kernel/qplatformtheme.cpp') diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp index aa49d64309..36a71fe2da 100644 --- a/src/gui/kernel/qplatformtheme.cpp +++ b/src/gui/kernel/qplatformtheme.cpp @@ -434,6 +434,8 @@ QVariant QPlatformTheme::themeHint(ThemeHint hint) const return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskCharacter); case QPlatformTheme::MousePressAndHoldInterval: return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MousePressAndHoldInterval); + case QPlatformTheme::ItemViewActivateItemOnSingleClick: + return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ItemViewActivateItemOnSingleClick); default: return QPlatformTheme::defaultThemeHint(hint); } -- cgit v1.2.3