FS#56949 - [gcin] gcin 2.8.5-2 cannot run in qutebrowser v1.0.4

Attached to Project: Community Packages
Opened by Shun-Yi Jheng (m157q.tw) - Thursday, 04 January 2018, 16:22 GMT
Last edited by Chih-Hsuan Yen (yan12125) - Thursday, 13 December 2018, 15:22 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Chih-Hsuan Yen (yan12125)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

I installed qutebrowser v1.0.4 and found that I could not use gcin in it.
(qutebrowser is an lightweight browser based on PyQt5)


Additional info:

* package version(s):
* gcin 2.8.5-2

* config and/or log files etc.

```
$ qutebrowser --version
qutebrowser v1.0.4
Git commit:
Backend: QtWebEngine (Chromium 61.0.3163.140)

CPython: 3.6.4
Qt: 5.10.0
PyQt: 5.9.2

sip: 4.19.6
colorama: 0.3.7
pypeg2: 2.15
jinja2: 2.10
pygments: 2.2.0
yaml: 3.12
cssutils: no
attr: 17.3.0
PyQt5.QtWebEngineWidgets: yes
PyQt5.QtWebKitWidgets: yes
pdf.js: no
sqlite: 3.21.0
QtNetwork SSL: OpenSSL 1.1.0g 2 Nov 2017

Style: QFusionStyle
Platform: Linux-4.14.8-1-ARCH-x86_64-with-arch, 64bit
Linux distribution: Arch Linux (arch)
Frozen: False
Imported from /usr/lib/python3.6/site-packages/qutebrowser
Qt library executable path: /usr/lib/qt/libexec, data path: /usr/share/qt
```

Steps to reproduce:

+ install gcin-2.8.5-2
+ install qutebrowser v1.0.4 (using Qt 5.10)
+ open qutebrowser
+ use Ctrl+Space or Ctrl+Shift, gcin won't show up.


Solution:

Here's [a thread on gcin forum discussed in Chinese](https://hyperrate.com/thread.php?tid=33785) about gcin doesn't work in applications using Qt 5.9.1, someone also reported it doesn't work in Qt 5.9.3 either, and I'm using Qt 5.10.0.

Someone posted the patch for this bug and it works for me. Here's the patch of PKGBUILD for this bug:

```
diff --git a/PKGBUILD.old b/PKGBUILD
index ca08fcb..7048c13 100644
--- a/PKGBUILD.old
+++ b/PKGBUILD
@@ -39,6 +39,12 @@ prepare() {
-e '/^MODVERSION=/a INCS+=-I/usr/include/qt/QtGui/$(MODVERSION) -I/usr/include/qt/QtCore/$(MODVERSION)' \
-i qt5-im/Makefile

+ # Patch to make gcin work in qt >= 5.9.x
+ # ref: <https://hyperrate.com/thread.php?tid=33785>
+ sed \
+ -e 's/org.qt-project.Qt.QPlatformInputContextFactoryInterface/&.5.1/' \
+ -i qt5-im/gcin-qt5.h.in
+
#  FS#45732 
patch -p1 -i ../qt-5.5.patch
```

I attached this patch below, hope this patch can be added soon.
This task depends upon

Closed by  Chih-Hsuan Yen (yan12125)
Thursday, 13 December 2018, 15:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in version 2.8.8, which is now in [community]. Thanks for the patch!
Comment by Shun-Yi Jheng (m157q.tw) - Thursday, 04 January 2018, 16:43 GMT
Sorry, the patch should be this one.


Comment by 張修銘 (cges30901) - Saturday, 02 June 2018, 14:45 GMT
I found that in gcin 2.8.5, there is a line in configure that version 2.8.4 doesn't have:

cp gcin-qt5.h.in gcin-qt5.h

The original patch (qt-5.5.patch) modifies content of gcin-qt5.h, but gcin-qt5.h is then replaced with gcin-qt5.h.in. That's why the patch doesn't work correctly.

Loading...