summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2017-11-28 18:02:02 +0100
committerMike Gilbert <floppym@gentoo.org>2017-11-28 13:36:27 -0500
commit6635ba1924005ba2e0bb614a537d84e8fa74a51b (patch)
tree12a323fdb11b7f6cb546fe47f888a4cc80537550 /app-i18n/fcitx-qt5/files
parentnet-print/cups: Use correct perms patch. (diff)
downloadgentoo-6635ba1924005ba2e0bb614a537d84e8fa74a51b.tar.gz
gentoo-6635ba1924005ba2e0bb614a537d84e8fa74a51b.tar.bz2
gentoo-6635ba1924005ba2e0bb614a537d84e8fa74a51b.zip
app-i18n/*fcitx*: Delete old versions.
Diffstat (limited to 'app-i18n/fcitx-qt5/files')
-rw-r--r--app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch86
1 files changed, 0 insertions, 86 deletions
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
deleted file mode 100644
index 28cf78efc9c1..000000000000
--- a/app-i18n/fcitx-qt5/files/fcitx-qt5-1.0.5-ucs4.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-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)