* [gentoo-commits] repo/gentoo:master commit in: app-i18n/fcitx-qt5/, app-i18n/fcitx-qt5/files/
@ 2015-12-22 2:32 Yixun Lan
0 siblings, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2015-12-22 2:32 UTC (permalink / raw
To: gentoo-commits
commit: 887f90fd1bb73ebc2fe508e581d2e8dfced48efa
Author: Jiajun Wang <amesists <AT> gmail <DOT> com>
AuthorDate: Thu Dec 10 08:17:51 2015 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Dec 22 02:31:38 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=887f90fd
app-i18n/fcitx-qt5: fix compatibility issue with qt5.5
Gentoo-Bug: 565942
Package-Manager: portage-2.2.26
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
...-qt5-1.0.2.ebuild => fcitx-qt5-1.0.2-r1.ebuild} | 2 ++
.../files/fcitx-qt5-qt-5.5-compatibility-fix.patch | 23 ++++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/app-i18n/fcitx-qt5/fcitx-qt5-1.0.2.ebuild b/app-i18n/fcitx-qt5/fcitx-qt5-1.0.2-r1.ebuild
similarity index 88%
rename from app-i18n/fcitx-qt5/fcitx-qt5-1.0.2.ebuild
rename to app-i18n/fcitx-qt5/fcitx-qt5-1.0.2-r1.ebuild
index f066264..0af11f2 100644
--- a/app-i18n/fcitx-qt5/fcitx-qt5-1.0.2.ebuild
+++ b/app-i18n/fcitx-qt5/fcitx-qt5-1.0.2-r1.ebuild
@@ -21,3 +21,5 @@ RDEPEND=">=app-i18n/fcitx-4.2.8
dev-qt/qtwidgets:5
kde-frameworks/extra-cmake-modules"
DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-qt-5.5-compatibility-fix.patch" )
diff --git a/app-i18n/fcitx-qt5/files/fcitx-qt5-qt-5.5-compatibility-fix.patch b/app-i18n/fcitx-qt5/files/fcitx-qt5-qt-5.5-compatibility-fix.patch
new file mode 100644
index 0000000..4bdd058
--- /dev/null
+++ b/app-i18n/fcitx-qt5/files/fcitx-qt5-qt-5.5-compatibility-fix.patch
@@ -0,0 +1,23 @@
+From 78c482b3fdfe558da74657893a3bcd1ece6d7758 Mon Sep 17 00:00:00 2001
+From: Weng Xuetian <wengxt@gmail.com>
+Date: Thu, 2 Jul 2015 20:02:17 -0700
+Subject: [PATCH] [qt5] fixes #6
+
+use macro instead of string literal and fix compatibility issue with qt5.5
+---
+ platforminputcontext/main.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/platforminputcontext/main.h b/platforminputcontext/main.h
+index 1492d72..9938da1 100644
+--- a/platforminputcontext/main.h
++++ b/platforminputcontext/main.h
+@@ -29,7 +29,7 @@ class QFcitxPlatformInputContextPlugin : public QPlatformInputContextPlugin
+ {
+ Q_OBJECT
+ public:
+- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "fcitx.json")
++ Q_PLUGIN_METADATA(IID QPlatformInputContextFactoryInterface_iid FILE "fcitx.json")
+ QStringList keys() const;
+ QFcitxPlatformInputContext *create(const QString& system, const QStringList& paramList);
+ };
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/fcitx-qt5/, app-i18n/fcitx-qt5/files/
@ 2016-03-24 14:43 Mike Gilbert
0 siblings, 0 replies; 3+ messages in thread
From: Mike Gilbert @ 2016-03-24 14:43 UTC (permalink / raw
To: gentoo-commits
commit: ed0c2deee9c8b4347a6f0677b7df927562a22b6b
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Mar 23 22:27:18 2016 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Mar 24 14:42:46 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed0c2dee
app-i18n/fcitx-qt5: Version bump (1.0.5).
app-i18n/fcitx-qt5/Manifest | 1 +
app-i18n/fcitx-qt5/fcitx-qt5-1.0.5.ebuild | 44 +++++++++++
.../fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch | 86 ++++++++++++++++++++++
3 files changed, 131 insertions(+)
diff --git a/app-i18n/fcitx-qt5/Manifest b/app-i18n/fcitx-qt5/Manifest
index 9fe4f27..c7fa740 100644
--- a/app-i18n/fcitx-qt5/Manifest
+++ b/app-i18n/fcitx-qt5/Manifest
@@ -1,2 +1,3 @@
DIST fcitx-qt5-1.0.2.tar.xz 53324 SHA256 b8073f07d9384878c616f6d2cea44fc739a3b5731b95b10b3133e0914d49f66d SHA512 f7075d5334e29fd00c54563182c9cc4027011503aa14d577aa2fb75eb8558c385d91c939f1f21e51850c9c64fc5c396aad5b32fdcc8ddd99c46ec74bd577255d WHIRLPOOL 35ae384cf13fdfdb86c34b7dbefbbe780a2c20ac220868824e25a0ba4368581c19d45cbc9447e1c2dd3236b0758ee9e4311dab1f348a524ca2d002d0b43c760c
DIST fcitx-qt5-1.0.4.tar.xz 53552 SHA256 b42a428008d9bf3a5d9140d63c9a475386480d598bb9ce3b78fad43879a50d1c SHA512 f5a2d3ed30bbbb8da3687dc12dd5be3038242ba40e6bef48483931aacfd9f200db9d24d0df03cb93058eedb3941ef6ecb92d874040eb60742f60a44beda77868 WHIRLPOOL c1dcf45eed09625721c175b1b09724f1f9934cb8cb3413df811009815d4231d2758c54a7b346cb29910c0ce156eb9906136d471359566eb288438cc1f5466710
+DIST fcitx-qt5-1.0.5.tar.xz 53584 SHA256 8cef90024ca84c3f607943b91f6bfe63fd077507bbe100e5a1936464095841de SHA512 f4da9ede8918cef7aa0dbacea534ab81024e3c6d812bedd287c4c4c9a8b9ca994d4708489c602967f3504ce057ec6e118674503f5d796883f1890e8ecc11c501 WHIRLPOOL 764190a5f523fc40ca5f937704d5bc1a7018232284f50b9b1b6a36b5dd41dfbebda5db337bdc49b08e601e94f51935f2a70d96dddbd4091744ec8c89a77f26b0
diff --git a/app-i18n/fcitx-qt5/fcitx-qt5-1.0.5.ebuild b/app-i18n/fcitx-qt5/fcitx-qt5-1.0.5.ebuild
new file mode 100644
index 0000000..8e71460
--- /dev/null
+++ b/app-i18n/fcitx-qt5/fcitx-qt5-1.0.5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/fcitx/fcitx-qt5"
+fi
+
+DESCRIPTION="Fcitx input method module for Qt 5"
+HOMEPAGE="https://fcitx-im.org/ https://github.com/fcitx/fcitx-qt5"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://download.fcitx-im.org/${PN}/${P}.tar.xz"
+fi
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Private headers of dev-qt/qtgui:5 used.
+RDEPEND=">=app-i18n/fcitx-4.2.8
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5=
+ dev-qt/qtwidgets:5
+ virtual/libintl
+ x11-libs/libxkbcommon"
+DEPEND="${RDEPEND}
+ kde-frameworks/extra-cmake-modules:5
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-ucs4.patch"
+)
+
+DOCS=()
diff --git a/app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch b/app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch
new file mode 100644
index 0000000..c237d10
--- /dev/null
+++ b/app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch
@@ -0,0 +1,86 @@
+https://github.com/fcitx/fcitx-qt5/commit/31ecc9f2f9c8eb77082044944bbb6740d35ae7c3
+https://github.com/fcitx/fcitx-qt5/commit/8fc110e6125d85d3c50112bc20a6ed36395b2b21
+
+--- platforminputcontext/qfcitxplatforminputcontext.cpp
++++ platforminputcontext/qfcitxplatforminputcontext.cpp
+@@ -254,6 +254,12 @@
+ anchor = var2.toInt();
+ else
+ anchor = cursor;
++
++ // adjust it to real character size
++ QVector<uint> tempUCS4 = text.leftRef(cursor).toUcs4();
++ cursor = tempUCS4.size();
++ tempUCS4 = text.leftRef(anchor).toUcs4();
++ anchor = tempUCS4.size();
+ if (data.surroundingText != text) {
+ data.surroundingText = text;
+ proxy->SetSurroundingText(text, cursor, anchor);
+@@ -388,6 +394,7 @@
+ delete data.proxy;
+ }
+ data.proxy = new FcitxQtInputContextProxy(m_connection->serviceName(), path, *m_connection->connection(), this);
++ data.proxy->setProperty("icData", qVariantFromValue(static_cast<void*>(&data)));
+ connect(data.proxy, SIGNAL(CommitString(QString)), this, SLOT(commitString(QString)));
+ connect(data.proxy, SIGNAL(ForwardKey(uint, uint, int)), this, SLOT(forwardKey(uint, uint, int)));
+ connect(data.proxy, SIGNAL(UpdateFormattedPreedit(FcitxQtFormattedPreeditList,int)), this, SLOT(updateFormattedPreedit(FcitxQtFormattedPreeditList,int)));
+@@ -480,15 +487,56 @@
+ update(Qt::ImCursorRectangle);
+ }
+
+-void QFcitxPlatformInputContext::deleteSurroundingText(int offset, uint nchar)
++void QFcitxPlatformInputContext::deleteSurroundingText(int offset, uint _nchar)
+ {
+ QObject *input = qApp->focusObject();
+ if (!input)
+ return;
+
+ QInputMethodEvent event;
+- event.setCommitString("", offset, nchar);
+- QCoreApplication::sendEvent(input, &event);
++
++ FcitxQtInputContextProxy *proxy = qobject_cast<FcitxQtInputContextProxy*>(sender());
++ if (!proxy) {
++ return;
++ }
++
++ FcitxQtICData *data = static_cast<FcitxQtICData*>(proxy->property("icData").value<void *>());
++ QVector<uint> ucsText = data->surroundingText.toUcs4();
++
++ int cursor = data->surroundingCursor;
++ // make nchar signed so we are safer
++ int nchar = _nchar;
++ // Qt's reconvert semantics is different from gtk's. It doesn't count the current
++ // selection. Discard selection from nchar.
++ if (data->surroundingAnchor < data->surroundingCursor) {
++ nchar -= data->surroundingCursor - data->surroundingAnchor;
++ offset += data->surroundingCursor - data->surroundingAnchor;
++ cursor = data->surroundingAnchor;
++ } else if (data->surroundingAnchor > data->surroundingCursor) {
++ nchar -= data->surroundingAnchor - data->surroundingCursor;
++ cursor = data->surroundingCursor;
++ }
++
++ // validates
++ if (nchar >= 0 && cursor + offset >= 0 && cursor + offset + nchar < ucsText.size()) {
++ // order matters
++ QVector<uint> replacedChars = ucsText.mid(cursor + offset, nchar);
++ nchar = QString::fromUcs4(replacedChars.data(), replacedChars.size()).size();
++
++ int start, len;
++ if (offset >= 0) {
++ start = cursor;
++ len = offset;
++ } else {
++ start = cursor;
++ len = -offset;
++ }
++
++ QVector<uint> prefixedChars = ucsText.mid(start, len);
++ offset = QString::fromUcs4(prefixedChars.data(), prefixedChars.size()).size() * (offset >= 0 ? 1 : -1);
++ event.setCommitString("", offset, nchar);
++ QCoreApplication::sendEvent(input, &event);
++ }
+ }
+
+ void QFcitxPlatformInputContext::forwardKey(uint keyval, uint state, int type)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/fcitx-qt5/, app-i18n/fcitx-qt5/files/
@ 2016-09-15 14:47 Mike Gilbert
0 siblings, 0 replies; 3+ messages in thread
From: Mike Gilbert @ 2016-09-15 14:47 UTC (permalink / raw
To: gentoo-commits
commit: e0955d04a6a4b181e1c4e69d02c56729b2b1d5be
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Sep 15 09:44:14 2016 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Sep 15 14:45:28 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0955d04
app-i18n/fcitx-qt5: Use EAPI="6".
app-i18n/fcitx-qt5/fcitx-qt5-1.0.5.ebuild | 2 +-
app-i18n/fcitx-qt5/fcitx-qt5-9999.ebuild | 2 +-
app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app-i18n/fcitx-qt5/fcitx-qt5-1.0.5.ebuild b/app-i18n/fcitx-qt5/fcitx-qt5-1.0.5.ebuild
index 206656b..e5907db 100644
--- a/app-i18n/fcitx-qt5/fcitx-qt5-1.0.5.ebuild
+++ b/app-i18n/fcitx-qt5/fcitx-qt5-1.0.5.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="5"
+EAPI="6"
inherit cmake-utils
diff --git a/app-i18n/fcitx-qt5/fcitx-qt5-9999.ebuild b/app-i18n/fcitx-qt5/fcitx-qt5-9999.ebuild
index 6af0341..edfd3da 100644
--- a/app-i18n/fcitx-qt5/fcitx-qt5-9999.ebuild
+++ b/app-i18n/fcitx-qt5/fcitx-qt5-9999.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="5"
+EAPI="6"
inherit cmake-utils
diff --git a/app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch b/app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch
index c237d10..28cf78e 100644
--- a/app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch
+++ b/app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch
@@ -1,8 +1,8 @@
https://github.com/fcitx/fcitx-qt5/commit/31ecc9f2f9c8eb77082044944bbb6740d35ae7c3
https://github.com/fcitx/fcitx-qt5/commit/8fc110e6125d85d3c50112bc20a6ed36395b2b21
---- platforminputcontext/qfcitxplatforminputcontext.cpp
-+++ platforminputcontext/qfcitxplatforminputcontext.cpp
+--- /platforminputcontext/qfcitxplatforminputcontext.cpp
++++ /platforminputcontext/qfcitxplatforminputcontext.cpp
@@ -254,6 +254,12 @@
anchor = var2.toInt();
else
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-15 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-22 2:32 [gentoo-commits] repo/gentoo:master commit in: app-i18n/fcitx-qt5/, app-i18n/fcitx-qt5/files/ Yixun Lan
-- strict thread matches above, loose matches on Subject: below --
2016-03-24 14:43 Mike Gilbert
2016-09-15 14:47 Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox