[ibus-qt/f14/master] Fixed Bug 655530 - Selected text gets deleted in KDE

Takao Fujiwara fujiwara at fedoraproject.org
Thu Nov 25 06:10:42 UTC 2010


commit 6712abfc159a91aee3cc7c9aa28a973e7477dd6f
Author: Takao Fujiwara <tfujiwar at redhat.com>
Date:   Thu Nov 25 14:58:52 2010 +0900

    Fixed Bug 655530 - Selected text gets deleted in KDE

 ibus-qt-HEAD.patch |   39 +++++++++++++++++++++++++++++++++++++++
 ibus-qt.spec       |   12 +++++++-----
 2 files changed, 46 insertions(+), 5 deletions(-)
---
diff --git a/ibus-qt-HEAD.patch b/ibus-qt-HEAD.patch
index 8b13789..2d0f98e 100644
--- a/ibus-qt-HEAD.patch
+++ b/ibus-qt-HEAD.patch
@@ -1 +1,40 @@
+From 282bf68d2064972fd24de109e0280fd48c299c9c Mon Sep 17 00:00:00 2001
+From: Peng Huang <shawn.p.huang at gmail.com>
+Date: Thu, 25 Nov 2010 14:22:12 +0900
+Subject: [PATCH] Fix selected text be deleted problem.
+
+---
+ qtim/ibus-input-context.cpp |   13 ++++++++++++-
+ 1 files changed, 12 insertions(+), 1 deletions(-)
+
+diff --git a/qtim/ibus-input-context.cpp b/qtim/ibus-input-context.cpp
+index c47fce6..fdfd34a 100644
+--- a/qtim/ibus-input-context.cpp
++++ b/qtim/ibus-input-context.cpp
+@@ -722,11 +722,22 @@ IBusInputContext::displayPreeditText (const TextPointer &text, uint cursor_pos,
+ void
+ IBusInputContext::slotUpdatePreeditText (const TextPointer &text, uint cursor_pos, bool visible)
+ {
++    // set visible to false, if text is empty
++    visible = visible && !text->text ().isEmpty ();
++
++    // set cursor at end, if pos is greater than the text length
++    if (cursor_pos > (uint)text->text ().length ())
++        cursor_pos = text->text ().length ();
++
++    bool update = (m_preedit_visible != visible) || visible;
++
+     m_preedit = text;
+     m_preedit_visible = visible;
+     m_preedit_cursor_pos = cursor_pos;
+ 
+-    displayPreeditText (m_preedit, m_preedit_cursor_pos, visible);
++    if (update) {
++        displayPreeditText (m_preedit, m_preedit_cursor_pos, visible);
++    }
+ }
+ 
+ void
+-- 
+1.7.2.1
 
diff --git a/ibus-qt.spec b/ibus-qt.spec
index 1ae220a..0547336 100644
--- a/ibus-qt.spec
+++ b/ibus-qt.spec
@@ -2,14 +2,14 @@
 
 Name:       ibus-qt
 Version:    1.3.1
-Release:    2%{?dist}
+Release:    3%{?dist}
 Summary:    Qt IBus library and Qt input method plugin
 License:    GPLv2+
 Group:      System Environment/Libraries
 URL:        http://code.google.com/p/ibus/
 Source0:    http://ibus.googlecode.com/files/%{name}-%{version}-Source.tar.gz
 
-# Patch0:     ibus-qt-HEAD.patch
+Patch0:     ibus-qt-HEAD.patch
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  cmake
@@ -41,7 +41,7 @@ The ibus-qt-docs package contains developer documentation for ibus qt library.
 
 %prep
 %setup -q -n %{name}-%{version}-Source
-# %patch0 -p1
+%patch0 -p1
 
 %build
 %cmake \
@@ -83,8 +83,10 @@ rm -rf $RPM_BUILD_ROOT
 %doc docs/html
 
 %changelog
-* Wed Sep 08 2010 Takao Fujiwara <tfujiwar at redhat.com> - 1.3.1-2
-- Fix Bug 631043 s/qt-devel/qt4-devel/ in BuildRequires
+* Thu Nov 25 2010 Takao Fujiwara <tfujiwar at redhat.com> - 1.3.1-3
+- Fixed Bug 631043 - s/qt-devel/qt4-devel/ in BuildRequires
+- Added ibus-qt-HEAD.patch
+  Fixed Bug 655530 - Selected text gets deleted in KDE
 
 * Mon Aug 23 2010 Takao Fujiwara <tfujiwar at redhat.com> - 1.3.1-1
 - Update to 1.3.1.


More information about the scm-commits mailing list