summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-10-20 09:08:39 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-10-20 09:08:39 (GMT)
commitc1a661638f8ad20f0db34d2589cebfa95cdbcdc1 (patch)
treec1b83ef2ed5498f127dafa0b06d96168f87448c3 /src/gui/kernel
parent6c1388ee5a3c4796d7ce09f0cbbc1700ab574ce4 (diff)
parent3d4804a229e6cb869aa03481dd871e756ffa35ae (diff)
downloadQt-c1a661638f8ad20f0db34d2589cebfa95cdbcdc1.zip
Qt-c1a661638f8ad20f0db34d2589cebfa95cdbcdc1.tar.gz
Qt-c1a661638f8ad20f0db34d2589cebfa95cdbcdc1.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 41d8098..f48c551 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -68,9 +68,6 @@
#include "private/qstylesheetstyle_p.h"
#include "private/qstyle_p.h"
#include "qmessagebox.h"
-#include "qlineedit.h"
-#include "qlistview.h"
-#include "qtextedit.h"
#include <QtGui/qgraphicsproxywidget.h>
#include "qinputcontext.h"
@@ -2501,6 +2498,8 @@ void QApplication::setActiveWindow(QWidget* act)
*/
QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool next)
{
+ uint focus_flag = qt_tab_all_widgets ? Qt::TabFocus : Qt::StrongFocus;
+
QWidget *f = toplevel->focusWidget();
if (!f)
f = toplevel;
@@ -2508,22 +2507,11 @@ QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool
QWidget *w = f;
QWidget *test = f->d_func()->focus_next;
while (test && test != f) {
- if ((test->focusPolicy() & Qt::TabFocus)
+ if ((test->focusPolicy() & focus_flag) == focus_flag
&& !(test->d_func()->extra && test->d_func()->extra->focus_proxy)
&& test->isVisibleTo(toplevel) && test->isEnabled()
&& !(w->windowType() == Qt::SubWindow && !w->isAncestorOf(test))
- && (toplevel->windowType() != Qt::SubWindow || toplevel->isAncestorOf(test))
- && (qt_tab_all_widgets
-#ifndef QT_NO_LINEEDIT
- || qobject_cast<QLineEdit*>(test)
-#endif
-#ifndef QT_NO_TEXTEDIT
- || qobject_cast<QTextEdit*>(test)
-#endif
-#ifndef QT_NO_ITEMVIEWS
- || qobject_cast<QListView*>(test)
-#endif
- )) {
+ && (toplevel->windowType() != Qt::SubWindow || toplevel->isAncestorOf(test))) {
w = test;
if (next)
break;