diff options
author | Liang Qi <liang.qi@digia.com> | 2013-05-08 17:53:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-08 19:27:41 +0200 |
commit | 98229432d781253201699a04e606414767d5f2e6 (patch) | |
tree | 6b59c69701c861298d324a2deb88e2d6eb7e51ed /src | |
parent | 06385e88556985cfd1309f1c29f261be6f6a4c74 (diff) |
Revert "Mac: respect the system settings in Full Keyboard Access"
This breaks Qt Quick Controls activeFocusOnTab autotests.
This reverts commit 305616a60462b668c4d0b3d19302fa90469aceb5.
Change-Id: Ided59ebe99659b23e950e8269ccaa8d7d44a4fdb
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 35 | ||||
-rw-r--r-- | src/quick/items/qquickitem_p.h | 3 |
2 files changed, 1 insertions, 37 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 21d50580dd..5ad53e99b6 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -58,7 +58,6 @@ #include <QtCore/qdebug.h> #include <QtCore/qcoreevent.h> #include <QtCore/qnumeric.h> -#include <QtGui/qpa/qplatformtheme.h> #include <private/qqmlglobal_p.h> #include <private/qqmlengine_p.h> @@ -2035,35 +2034,6 @@ QQuickItem::~QQuickItem() /*! \internal -*/ -bool QQuickItemPrivate::qt_tab_all_widgets() -{ - if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) - return theme->themeHint(QPlatformTheme::TabAllWidgets).toBool(); - return true; -} - -/*! - \internal -*/ -bool QQuickItemPrivate::canAcceptTabFocus(QQuickItem *item) -{ - bool result = true; - -#ifndef QT_NO_ACCESSIBILITY - result = false; - if (QObject *acc = qmlAttachedPropertiesObject<QQuickAccessibleAttached>(item, false)) { - int role = acc->property("role").toInt(); - if (role == QAccessible::EditableText || role == QAccessible::Table || role == QAccessible::List) - result = true; - } -#endif - - return result; -} - -/*! - \internal \brief QQuickItemPrivate::focusNextPrev focuses the next/prev item in the tab-focus-chain \param item The item that currently has the focus \param forward The direction @@ -2089,8 +2059,6 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo Q_ASSERT(item); Q_ASSERT(item->activeFocusOnTab()); - bool all = QQuickItemPrivate::qt_tab_all_widgets(); - QQuickItem *from = 0; if (forward) { from = item->parentItem(); @@ -2153,8 +2121,7 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo } from = last; - } while (skip || !current->activeFocusOnTab() || !current->isEnabled() || !current->isVisible() - || !(all || QQuickItemPrivate::canAcceptTabFocus(current))); + } while (skip || !current->activeFocusOnTab() || !current->isEnabled() || !current->isVisible()); return current; } diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index c71da3c330..12a5165d9b 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -491,9 +491,6 @@ public: static bool focusNextPrev(QQuickItem *item, bool forward); static QQuickItem *nextPrevItemInTabFocusChain(QQuickItem *item, bool forward); - static bool qt_tab_all_widgets(); //todo: move to QGuiApplication? - static bool canAcceptTabFocus(QQuickItem *item); - qreal x; qreal y; qreal width; |