mozc: update to 2.26.4472.102.

sgn: Correct the version, it's 2.26.4472.102 not 2.26.4472.100
Close: #32646
This commit is contained in:
Artem Zhurikhin 2021-08-23 18:21:23 +03:00 committed by Đoàn Trần Công Danh
parent 733aeaedbb
commit 4b3647c824
2 changed files with 5 additions and 204 deletions

View file

@ -1,200 +0,0 @@
--- a/mozc/src/gui/word_register_dialog/word_register_dialog.cc
+++ b/mozc/src/gui/word_register_dialog/word_register_dialog.cc
@@ -94,7 +94,7 @@ QString GetEnv(const char *envname) {
return QString::fromUtf16(reinterpret_cast<const ushort *>(buffer.get()));
} else {
// This is a fallback just in case.
- return QString::fromUcs4(reinterpret_cast<const uint *>(buffer.get()));
+ return QString::fromUcs4(reinterpret_cast<const unsigned *>(buffer.get()));
}
}
return QLatin1String("");
--- a/mozc/src/unix/fcitx/surrounding_text_util.cc
+++ b/mozc/src/unix/fcitx/surrounding_text_util.cc
@@ -41,10 +41,10 @@
namespace mozc {
namespace fcitx {
-bool SurroundingTextUtil::GetSafeDelta(uint from, uint to, int32 *delta) {
+bool SurroundingTextUtil::GetSafeDelta(unsigned from, unsigned to, int32 *delta) {
DCHECK(delta);
- static_assert(sizeof(int64) >= sizeof(uint),
+ static_assert(sizeof(int64) >= sizeof(unsigned),
"int64 must be sufficient to store a guint value.");
static_assert(sizeof(int64) == sizeof(llabs(0)),
"|llabs(0)| must returns a 64-bit integer.");
@@ -113,8 +113,8 @@ bool SearchAnchorPosForward(
const std::string &surrounding_text,
const std::string &selected_text,
size_t selected_chars_len,
- uint cursor_pos,
- uint *anchor_pos) {
+ unsigned cursor_pos,
+ unsigned *anchor_pos) {
ConstChar32Iterator iter(surrounding_text);
// Move |iter| to cursor pos.
@@ -137,15 +137,15 @@ bool SearchAnchorPosBackward(
const std::string &surrounding_text,
const std::string &selected_text,
size_t selected_chars_len,
- uint cursor_pos,
- uint *anchor_pos) {
+ unsigned cursor_pos,
+ unsigned *anchor_pos) {
if (cursor_pos < selected_chars_len) {
return false;
}
ConstChar32Iterator iter(surrounding_text);
// Skip |iter| to (potential) anchor pos.
- const uint skip_count = cursor_pos - selected_chars_len;
+ const unsigned skip_count = cursor_pos - selected_chars_len;
DCHECK_LE(skip_count, cursor_pos);
if (!Skip(&iter, skip_count)) {
return false;
@@ -164,8 +164,8 @@ bool SearchAnchorPosBackward(
bool SurroundingTextUtil::GetAnchorPosFromSelection(
const std::string &surrounding_text,
const std::string &selected_text,
- uint cursor_pos,
- uint *anchor_pos) {
+ unsigned cursor_pos,
+ unsigned *anchor_pos) {
DCHECK(anchor_pos);
if (surrounding_text.empty()) {
@@ -196,8 +196,8 @@ bool GetSurroundingText(FcitxInstance* i
return false;
}
- uint cursor_pos = 0;
- uint anchor_pos = 0;
+ unsigned cursor_pos = 0;
+ unsigned anchor_pos = 0;
char* str = NULL;
if (!FcitxInstanceGetSurroundingText(instance, ic, &str, &cursor_pos, &anchor_pos)) {
@@ -211,7 +211,7 @@ bool GetSurroundingText(FcitxInstance* i
const char* primary = NULL;
if ((primary = FcitxClipboardGetPrimarySelection(instance, NULL)) != NULL) {
- uint new_anchor_pos = 0;
+ unsigned new_anchor_pos = 0;
const std::string primary_text(primary);
if (SurroundingTextUtil::GetAnchorPosFromSelection(
surrounding_text, primary_text,
--- a/mozc/src/unix/fcitx/surrounding_text_util.h
+++ b/mozc/src/unix/fcitx/surrounding_text_util.h
@@ -55,7 +55,7 @@ class SurroundingTextUtil {
// Returns true when neither |abs(delta)| nor |-delta| does not cause
// integer overflow, that is, |delta| is in a safe range.
// Returns false otherwise.
- static bool GetSafeDelta(uint from, uint to, int32 *delta);
+ static bool GetSafeDelta(unsigned from, unsigned to, int32 *delta);
// Returns true if
// 1. |surrounding_text| contains |selected_text|
@@ -71,8 +71,8 @@ class SurroundingTextUtil {
static bool GetAnchorPosFromSelection(
const std::string &surrounding_text,
const std::string &selected_text,
- uint cursor_pos,
- uint *anchor_pos);
+ unsigned cursor_pos,
+ unsigned *anchor_pos);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(SurroundingTextUtil);
--- a/mozc/src/unix/fcitx5/surrounding_text_util.cc
+++ b/mozc/src/unix/fcitx5/surrounding_text_util.cc
@@ -43,10 +43,10 @@ namespace fcitx {
using namespace mozc;
-bool SurroundingTextUtil::GetSafeDelta(uint from, uint to, int32 *delta) {
+bool SurroundingTextUtil::GetSafeDelta(unsigned from, unsigned to, int32 *delta) {
DCHECK(delta);
- static_assert(sizeof(int64) >= sizeof(uint),
+ static_assert(sizeof(int64) >= sizeof(unsigned),
"int64 must be sufficient to store a guint value.");
static_assert(sizeof(int64) == sizeof(llabs(0)),
"|llabs(0)| must returns a 64-bit integer.");
@@ -110,8 +110,8 @@ bool StartsWith(ConstChar32Iterator *ite
// Otherwise returns false.
bool SearchAnchorPosForward(const std::string &surrounding_text,
const std::string &selected_text,
- size_t selected_chars_len, uint cursor_pos,
- uint *anchor_pos) {
+ size_t selected_chars_len, unsigned cursor_pos,
+ unsigned *anchor_pos) {
ConstChar32Iterator iter(surrounding_text);
// Move |iter| to cursor pos.
if (!Skip(&iter, cursor_pos)) {
@@ -131,15 +131,15 @@ bool SearchAnchorPosForward(const std::s
// Otherwise returns false.
bool SearchAnchorPosBackward(const std::string &surrounding_text,
const std::string &selected_text,
- size_t selected_chars_len, uint cursor_pos,
- uint *anchor_pos) {
+ size_t selected_chars_len, unsigned cursor_pos,
+ unsigned *anchor_pos) {
if (cursor_pos < selected_chars_len) {
return false;
}
ConstChar32Iterator iter(surrounding_text);
// Skip |iter| to (potential) anchor pos.
- const uint skip_count = cursor_pos - selected_chars_len;
+ const unsigned skip_count = cursor_pos - selected_chars_len;
DCHECK_LE(skip_count, cursor_pos);
if (!Skip(&iter, skip_count)) {
return false;
@@ -157,7 +157,7 @@ bool SearchAnchorPosBackward(const std::
bool SurroundingTextUtil::GetAnchorPosFromSelection(
const std::string &surrounding_text, const std::string &selected_text,
- uint cursor_pos, uint *anchor_pos) {
+ unsigned cursor_pos, unsigned *anchor_pos) {
DCHECK(anchor_pos);
if (surrounding_text.empty()) {
@@ -187,13 +187,13 @@ bool GetSurroundingText(InputContext *ic
}
const auto surrounding_text = ic->surroundingText().text();
- uint cursor_pos = ic->surroundingText().cursor();
- uint anchor_pos = ic->surroundingText().anchor();
+ unsigned cursor_pos = ic->surroundingText().cursor();
+ unsigned anchor_pos = ic->surroundingText().anchor();
if (cursor_pos == anchor_pos && clipboard) {
std::string primary = clipboard->call<IClipboard::primary>(ic);
if (!primary.empty()) {
- uint new_anchor_pos = 0;
+ unsigned new_anchor_pos = 0;
if (SurroundingTextUtil::GetAnchorPosFromSelection(
surrounding_text, primary, cursor_pos, &new_anchor_pos)) {
anchor_pos = new_anchor_pos;
--- a/mozc/src/unix/fcitx5/surrounding_text_util.h
+++ b/mozc/src/unix/fcitx5/surrounding_text_util.h
@@ -56,7 +56,7 @@ class SurroundingTextUtil {
// Returns true when neither |abs(delta)| nor |-delta| does not cause
// integer overflow, that is, |delta| is in a safe range.
// Returns false otherwise.
- static bool GetSafeDelta(uint from, uint to, int32 *delta);
+ static bool GetSafeDelta(unsigned from, unsigned to, int32 *delta);
// Returns true if
// 1. |surrounding_text| contains |selected_text|
@@ -71,7 +71,7 @@ class SurroundingTextUtil {
// Otherwise returns false.
static bool GetAnchorPosFromSelection(const std::string &surrounding_text,
const std::string &selected_text,
- uint cursor_pos, uint *anchor_pos);
+ unsigned cursor_pos, unsigned *anchor_pos);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(SurroundingTextUtil);

View file

@ -1,9 +1,10 @@
# Template file for 'mozc'
pkgname=mozc
# src/data/version/mozc_version_template.bzl
version=2.26.4416.102
# revision is always 102, template always says 100 ;)
version=2.26.4472.102
revision=1
_commit=86b2623896042dd6e123371fb582314c6988888b
_commit=439a610ac6b6a92375b4a8188d6c9ef45ea591dd
_abseil=20210324.1
create_wrksrc=yes
build_wrksrc=mozc/src
@ -13,7 +14,7 @@ makedepends="gtk+-devel ibus-devel libzinnia-devel protobuf-devel qt5-devel
fcitx-devel libfcitx5-devel"
depends="tegaki-zinnia-japanese>=0.3 mozc-base-${version}_${revision}"
short_desc="Japanese IME (Open Source version of Google Japanese Input)"
maintainer="Matthias von Faber <mvf@gmx.eu>"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="BSD-3-Clause"
homepage="https://github.com/google/mozc"
distfiles="
@ -22,7 +23,7 @@ distfiles="
${DEBIAN_SITE}/main/g/gyp/gyp_0.1+20200513gitcaa6002.orig.tar.gz
https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/e5b3425575734c323e1d947009dd74709437b684.tar.gz
"
checksum="68614d1283e52b3d7035f76e587ed057a3292d6dc25d61100122dc0fd8942c15
checksum="1c04e8548a15d88710c9e4469d21b13ea05d62ffda6be7859837503895b5a39b
441db7c09a0565376ecacf0085b2d4c2bbedde6115d7773551bc116212c2a8d6
8d531bc7d3302461d76a32367453cec60ed08b455f27a53d8f313d81761713a8
0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1"