[konsole] add better workaround for kde#280896

Than Ngo than at fedoraproject.org
Mon Apr 2 11:06:26 UTC 2012


commit c10519f0bf506a22b61f7d7539cd8ea3929feeb3
Author: Than Ngo <than at redhat.com>
Date:   Mon Apr 2 13:06:13 2012 +0200

    add better workaround for kde#280896

 konsole-4.8.0-kdebug280896.patch |   21 -------------
 konsole-4.8.1-kde#280896.patch   |   62 ++++++++++++++++++++++++++++++++++++++
 konsole.spec                     |    7 +++-
 3 files changed, 67 insertions(+), 23 deletions(-)
---
diff --git a/konsole-4.8.1-kde#280896.patch b/konsole-4.8.1-kde#280896.patch
new file mode 100644
index 0000000..352adb2
--- /dev/null
+++ b/konsole-4.8.1-kde#280896.patch
@@ -0,0 +1,62 @@
+commit bf3e57e94b54c1c4337d7960e0fda0ef98156451
+Author: Kurt Hindenburg <kurt.hindenburg at gmail.com>
+Date:   Fri Mar 30 20:55:46 2012 -0400
+
+        A quick fix to get fonts to look OK w/ Qt4.8 and bidi off
+    
+        Hopefully a temp fix for this issue.  It would be better to find out
+        what happened with Qt4.8 font rendering.
+    
+        Thanks to people on bug report for research and info.
+    
+        CCBUG: 280896
+
+diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
+index 1076131..ac44da9 100644
+--- a/src/TerminalDisplay.cpp
++++ b/src/TerminalDisplay.cpp
+@@ -720,10 +720,18 @@ void TerminalDisplay::drawCharacters(QPainter& painter,
+         // Qt::LeftToRight for this widget
+         //
+         // This was discussed in: http://lists.kde.org/?t=120552223600002&r=1&w=2
+-        if (_bidiEnabled)
+-            painter.drawText(rect,0,text);
++        if (_bidiEnabled) {
++            painter.drawText(rect, 0, text);
++        }
+         else
+-            painter.drawText(rect,0,LTR_OVERRIDE_CHAR+text);
++        {
++            // See bug 280896 for more info
++#if QT_VERSION >= 0x040800
++            painter.drawText(rect, Qt::AlignBottom, LTR_OVERRIDE_CHAR + text);
++#else
++            painter.drawText(rect, 0, LTR_OVERRIDE_CHAR + text);
++#endif
++        }
+     }
+ }
+ 
+diff --git a/src/TerminalDisplay.h b/src/TerminalDisplay.h
+index 97b517e..c6f993e 100644
+--- a/src/TerminalDisplay.h
++++ b/src/TerminalDisplay.h
+@@ -398,7 +398,17 @@ public:
+      * Sets the status of the BiDi rendering inside the terminal display.
+      * Defaults to disabled.
+      */
+-    void setBidiEnabled(bool set) { _bidiEnabled=set; }
++    void setBidiEnabled(bool set) {
++        _bidiEnabled=set;
++        // See bug 280896 for more info
++#if QT_VERSION >= 0x040800
++        if (_bidiEnabled) {
++            setLineSpacing(0);
++        } else {
++            setLineSpacing(2);
++        }
++#endif
++    }
+     /**
+      * Returns the status of the BiDi rendering in this widget.
+      */
diff --git a/konsole.spec b/konsole.spec
index 3107deb..7964d26 100644
--- a/konsole.spec
+++ b/konsole.spec
@@ -1,7 +1,7 @@
 Name:    konsole
 Summary: KDE Terminal emulator
 Version: 4.8.2
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 # sources: MIT and LGPLv2 and LGPLv2+ and GPLv2+
 License: GPLv2 
@@ -16,7 +16,7 @@ Source0: ftp://ftp.kde.org/pub/kde/%{stable}/%{version}/src/%{name}-%{version}.t
 
 ## upstream patches
 # Some fonts get chopped with Qt 4.8, http://bugs.kde.org/280896
-Patch100: konsole-4.8.0-kdebug280896.patch
+Patch100: konsole-4.8.1-kde#280896.patch
 # https://projects.kde.org/projects/kde/kde-baseapps/konsole/repository/revisions/6cda78850fdbf7e155b73fe55fd5dfcfb8a3ff9d
 Patch101: konsole-4.8.2-kdebug297156.patch
 
@@ -88,6 +88,9 @@ desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/konsole.des
 
 
 %changelog
+* Mon Apr 02 2012 Than Ngo <than at redhat.com> - 4.8.2-3
+- add better workaround for kde#280896
+
 * Sun Apr 01 2012 Rex Dieter <rdieter at fedoraproject.org> 4.8.2-2
 - konsole crashes running 'ssh -t' (kde#297156)
 


More information about the scm-commits mailing list