diff options
author | Aapo Haapanen <aapo.haapanen@nokia.com> | 2011-09-26 11:47:50 (GMT) |
---|---|---|
committer | Aapo Haapanen <aapo.haapanen@nokia.com> | 2011-09-26 11:47:50 (GMT) |
commit | 7c626d2a9152a20f965d877c2de92e04bdfe3571 (patch) | |
tree | d664285f087fcd586da82cba79e06d4533481555 /src/xmlpatterns/api/qxmlquery.cpp | |
parent | 8d9e63130767858287331d7e19d732919d620607 (diff) | |
parent | 26341f6060434b6cbc08d98df34c2d2aee56a70c (diff) | |
download | Qt-7c626d2a9152a20f965d877c2de92e04bdfe3571.zip Qt-7c626d2a9152a20f965d877c2de92e04bdfe3571.tar.gz Qt-7c626d2a9152a20f965d877c2de92e04bdfe3571.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-flex
Diffstat (limited to 'src/xmlpatterns/api/qxmlquery.cpp')
-rw-r--r-- | src/xmlpatterns/api/qxmlquery.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xmlpatterns/api/qxmlquery.cpp b/src/xmlpatterns/api/qxmlquery.cpp index e69fe50..e5e901d 100644 --- a/src/xmlpatterns/api/qxmlquery.cpp +++ b/src/xmlpatterns/api/qxmlquery.cpp @@ -988,7 +988,12 @@ bool setFocusHelper(QXmlQuery *const queryInstance, const QXmlItem focusItem(focusResult.next()); if(focusItem.isNull() || focusResult.hasError()) + { + /* The previous focus must be cleared in error situations. + * Otherwise the query may be left in an inconsistent state. */ + queryInstance->setFocus(QXmlItem()); return false; + } else { queryInstance->setFocus(focusItem); |