diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-08-05 05:11:41 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-08-05 05:11:41 (GMT) |
commit | 2ee9d1cd0b7ee5b8973a286f56943a61350cdc67 (patch) | |
tree | a476794114e42909897a6223e2cbd1787054e2ba /src | |
parent | 1ca575eaf7c166f823b82132110ea066be819540 (diff) | |
parent | 563b5891e2f918f901ffefe29872dfac1b9a60e7 (diff) | |
download | Qt-2ee9d1cd0b7ee5b8973a286f56943a61350cdc67.zip Qt-2ee9d1cd0b7ee5b8973a286f56943a61350cdc67.tar.gz Qt-2ee9d1cd0b7ee5b8973a286f56943a61350cdc67.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitem.cpp | 13 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeexpression.cpp | 4 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 2 |
4 files changed, 7 insertions, 17 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 50998eb..5b74129 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -2406,18 +2406,7 @@ void QDeclarativeItemPrivate::focusChanged(bool flag) Q_Q(QDeclarativeItem); if (!(flags & QGraphicsItem::ItemIsFocusScope) && parent) emit q->activeFocusChanged(flag); //see also QDeclarativeItemPrivate::subFocusItemChange() - - bool inScope = false; - QGraphicsItem *p = parent; - while (p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) { - inScope = true; - break; - } - p = p->parentItem(); - } - if (!inScope) - emit q->focusChanged(flag); + emit q->focusChanged(flag); } /*! \internal */ diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp index 585fb69..6fc4df0 100644 --- a/src/declarative/qml/qdeclarativeexpression.cpp +++ b/src/declarative/qml/qdeclarativeexpression.cpp @@ -143,16 +143,12 @@ void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, void *ex } else { -#if !defined(Q_OS_SYMBIAN) //XXX Why doesn't this work? if (!dd->cachedPrograms.at(progIdx)) { dd->cachedPrograms[progIdx] = new QScriptProgram(expression, url, line); } expressionFunction = evalInObjectScope(ctxt, me, *dd->cachedPrograms.at(progIdx), &expressionContext); -#else - expressionFunction = evalInObjectScope(ctxt, me, expression, &expressionContext); -#endif expressionFunctionMode = ExplicitContext; expressionFunctionValid = true; diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 1626d83..ff3dc1f 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -3259,8 +3259,12 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim QGraphicsItem *p = parent; while (p) { if (p->flags() & QGraphicsItem::ItemIsFocusScope) { + QGraphicsItem *oldFocusScopeItem = p->d_ptr->focusScopeItem; p->d_ptr->focusScopeItem = q_ptr; if (!p->focusItem() && !focusFromShow) { + if (oldFocusScopeItem) + oldFocusScopeItem->d_ptr->focusScopeItemChange(false); + focusScopeItemChange(true); // If you call setFocus on a child of a focus scope that // doesn't currently have a focus item, then stop. return; @@ -5595,6 +5599,7 @@ void QGraphicsItemPrivate::subFocusItemChange() */ void QGraphicsItemPrivate::focusScopeItemChange(bool isSubFocusItem) { + Q_UNUSED(isSubFocusItem); } /*! diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 3303800..e164baf 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -474,7 +474,7 @@ int qt_antialiasing_threshold = -1; static int drag_time = 500; #ifdef Q_OS_SYMBIAN // The screens are a bit too small to for your thumb when using only 4 pixels drag distance. -static int drag_distance = 8; +static int drag_distance = 12; #else static int drag_distance = 4; #endif |