[arch-commits] Commit in kdelibs/trunk (3 files)

Andrea Scarpino andrea at archlinux.org
Tue Jul 12 17:46:50 UTC 2011


    Date: Tuesday, July 12, 2011 @ 13:46:50
  Author: andrea
Revision: 131295

Fix regressions in KLineEdit BUG#277457 BUG#246513

Added:
  kdelibs/trunk/fix-lineedit-clear-button.patch
  kdelibs/trunk/fix-lineedit-completion-tab.patch
Modified:
  kdelibs/trunk/PKGBUILD

-----------------------------------+
 PKGBUILD                          |   14 +++++++--
 fix-lineedit-clear-button.patch   |   30 +++++++++++++++++++
 fix-lineedit-completion-tab.patch |   56 ++++++++++++++++++++++++++++++++++++
 3 files changed, 97 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-07-12 17:46:49 UTC (rev 131294)
+++ PKGBUILD	2011-07-12 17:46:50 UTC (rev 131295)
@@ -4,7 +4,7 @@
 
 pkgname=kdelibs
 pkgver=4.6.5
-pkgrel=1
+pkgrel=2
 pkgdesc="KDE Core Libraries"
 arch=('i686' 'x86_64')
 url='http://www.kde.org'
@@ -20,11 +20,15 @@
 install='kdelibs.install'
 source=("http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2"
         'kde-applications-menu.patch' 'archlinux-menu.patch'
-        'abs-syntax-highlight.patch')
+        'abs-syntax-highlight.patch'
+        'fix-lineedit-clear-button.patch'
+        'fix-lineedit-completion-tab.patch')
 sha1sums=('9bb948769a3a5d4d5b6c65e84a8cf570bd7bc120'
           '86ee8c8660f19de8141ac99cd6943964d97a1ed7'
           '63a850ab4196b9d06934f2b4a13acd9f7739bc67'
-          'd994f262356af5b9e4e9619646e471bd98c91efb')
+          'd994f262356af5b9e4e9619646e471bd98c91efb'
+          '3deae3fc6733624759ad8bf5a1560d9a2f792d73'
+          'a5f223b61499fa03043def0b3a45b1712cc72d70')
 
 build() {
        cd ${srcdir}/${pkgname}-${pkgver}
@@ -36,6 +40,10 @@
        # add syntax highlightning for PKGBUILD and .install files
        patch -p1 -i $srcdir/abs-syntax-highlight.patch
 
+       # Already fixed upstream
+       patch -p1 -i "${srcdir}"/fix-lineedit-clear-button.patch
+       patch -p1 -i "${srcdir}"/fix-lineedit-completion-tab.patch
+
        cd ${srcdir}
        mkdir build
        cd build

Added: fix-lineedit-clear-button.patch
===================================================================
--- fix-lineedit-clear-button.patch	                        (rev 0)
+++ fix-lineedit-clear-button.patch	2011-07-12 17:46:50 UTC (rev 131295)
@@ -0,0 +1,30 @@
+commit 0b7201c1fe4f12dc7b17abbf19047864d1cca302
+Author: Andrea Iacovitti <aiacovitti at libero.it>
+Date:   Sat Jul 9 19:51:40 2011 +0200
+
+    Fix regression about input text clearButton stopping to work on khtml forms
+    BUG: 246513
+    FIXED-IN: 4.7.0
+
+diff --git a/kdeui/widgets/klineedit.cpp b/kdeui/widgets/klineedit.cpp
+index 7382806..8f1c8a4 100644
+--- a/kdeui/widgets/klineedit.cpp
++++ b/kdeui/widgets/klineedit.cpp
+@@ -1116,7 +1116,7 @@ void KLineEdit::mousePressEvent( QMouseEvent* e )
+     if  ( (e->button() == Qt::LeftButton ||
+            e->button() == Qt::MidButton ) &&
+           d->clearButton ) {
+-        d->clickInClear = d->clearButton == childAt( e->pos() );
++        d->clickInClear = ( d->clearButton == childAt(e->pos()) || d->clearButton->underMouse() );
+ 
+         if ( d->clickInClear ) {
+             d->possibleTripleClick = false;
+@@ -1145,7 +1145,7 @@ void KLineEdit::mousePressEvent( QMouseEvent* e )
+ void KLineEdit::mouseReleaseEvent( QMouseEvent* e )
+ {
+     if ( d->clickInClear ) {
+-        if ( d->clearButton == childAt( e->pos() ) ) {
++        if ( d->clearButton == childAt(e->pos()) || d->clearButton->underMouse() ) {
+             QString newText;
+             if ( e->button() == Qt::MidButton ) {
+                 newText = QApplication::clipboard()->text( QClipboard::Selection );

Added: fix-lineedit-completion-tab.patch
===================================================================
--- fix-lineedit-completion-tab.patch	                        (rev 0)
+++ fix-lineedit-completion-tab.patch	2011-07-12 17:46:50 UTC (rev 131295)
@@ -0,0 +1,56 @@
+--- kdelibs/khtml/rendering/render_form.cpp
++++ kdelibs/khtml/rendering/render_form.cpp
+@@ -1012,11 +1012,11 @@
+ // -----------------------------------------------------------------------------
+ 
+ RenderLineEdit::RenderLineEdit(HTMLInputElementImpl *element)
+-    : RenderFormElement(element)
++    : RenderFormElement(element), m_blockElementUpdates(false)
+ {
+     LineEditWidget *edit = new LineEditWidget(element, view(), view()->widget());
+     connect(edit,SIGNAL(returnPressed()), this, SLOT(slotReturnPressed()));
+-    connect(edit,SIGNAL(textEdited(QString)),this,SLOT(slotTextEdited(QString)));
++    connect(edit,SIGNAL(textChanged(QString)),this,SLOT(slotTextChanged(QString)));
+ 
+     if(element->inputType() == HTMLInputElementImpl::PASSWORD)
+         edit->setEchoMode( QLineEdit::Password );
+@@ -1142,17 +1142,21 @@
+     }
+ 
+     if (element()->value().string() != widget()->text()) {
++        m_blockElementUpdates = true;
+         int pos = widget()->cursorPosition();
+         widget()->setText(element()->value().string());
+         widget()->setCursorPosition(pos);
++        m_blockElementUpdates = false;
+     }
+     widget()->setReadOnly(element()->readOnly());
+ 
+     RenderFormElement::updateFromElement();
+ }
+ 
+-void RenderLineEdit::slotTextEdited(const QString &string)
++void RenderLineEdit::slotTextChanged(const QString &string)
+ {
++    if (m_blockElementUpdates) return;
++
+     // don't use setValue here!
+     element()->m_value = string;
+     element()->m_unsubmittedFormChange = true;
+--- kdelibs/khtml/rendering/render_form.h
++++ kdelibs/khtml/rendering/render_form.h
+@@ -282,12 +282,13 @@
+     void setSelectionRange(long start, long end);
+ public Q_SLOTS:
+     void slotReturnPressed();
+-    void slotTextEdited(const QString &string);
++    void slotTextChanged(const QString &string);
+ protected:
+ 
+ private:
+     virtual bool isEditable() const { return true; }
+     virtual bool canHaveBorder() const { return true; }
++    bool m_blockElementUpdates;
+ };
+ 
+ // -------------------------------------------------------------------------




More information about the arch-commits mailing list