[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/khtml/rendering
From:       Harri Porten <porten () kde ! org>
Date:       2008-12-22 1:22:07
Message-ID: 1229908927.695769.27765.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 900034 by porten:

Respect tab-changes-focus setting of KTextEdit. By default the Tab
key will change focus now. This is configurable through the context
menu and a kconfig setting (which does seem to lack a GUI so far).


 M  +13 -0     render_form.cpp  
 M  +1 -0      render_form.h  


--- trunk/KDE/kdelibs/khtml/rendering/render_form.cpp #900033:900034
@@ -1869,6 +1869,19 @@
     return ret;
 }
 
+void TextAreaWidget::keyPressEvent(QKeyEvent *e)
+{
+    // The ComboBoxWidget::keyPressEvent() comment about having to
+    // deal with events coming from EventPropagator::sendEvent()
+    // directly applies here, too.
+    if ((e->key() == Qt::Key_Tab || e->key() == Qt::Key_Backtab) &&
+        tabChangesFocus()) {
+        e->ignore();
+        return;
+    }
+    KTextEdit::keyPressEvent(e);
+}
+
 // -------------------------------------------------------------------------
 
 RenderTextArea::RenderTextArea(HTMLTextAreaElementImpl *element)
--- trunk/KDE/kdelibs/khtml/rendering/render_form.h #900033:900034
@@ -483,6 +483,7 @@
 
 protected:
     virtual bool event (QEvent *e );
+    virtual void keyPressEvent(QKeyEvent *e);
     virtual void scrollContentsBy(int dx, int dy);
 
 };
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic