Merge lp:~xnox/ubuntu-keyboard/libpinyin4 into lp:ubuntu-keyboard

Proposed by Dimitri John Ledkov
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 101
Merged at revision: 116
Proposed branch: lp:~xnox/ubuntu-keyboard/libpinyin4
Merge into: lp:ubuntu-keyboard
Diff against target: 65 lines (+16/-9)
2 files modified
debian/control (+1/-1)
src/lib/logic/pinyinadapter.cpp (+15/-8)
To merge this branch: bzr merge lp:~xnox/ubuntu-keyboard/libpinyin4
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Günter Schwann (community) Approve
Review via email: mp+193859@code.launchpad.net

This proposal supersedes a proposal from 2013-11-04.

Commit message

Port to libpinyin4-dev API. (LP: #1247840)

Description of the change

Port to libpinyin4-dev API. (LP: #1247840)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Posted in a previous version of this proposal

99 trunk merges borked lp:ubuntu-keyboard

- depends on gdb, yet gdb build-dep is not declared
- depends on running dbus, which is not available in sbuild/chroot.

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Posted in a previous version of this proposal

Also reported https://bugs.launchpad.net/ubuntu-ci-services-itself/+bug/1247992 the upstream merger is build this package with trusty-proposed enabled.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:99
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~xnox/ubuntu-keyboard/libpinyin4/+merge/193859/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/ubuntu-keyboard-ci/210/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/ubuntu-keyboard-trusty-amd64-ci/38/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/ubuntu-keyboard-trusty-armhf-ci/38/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/ubuntu-keyboard-trusty-i386-ci/38/console

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/ubuntu-keyboard-ci/210/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:100
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~xnox/ubuntu-keyboard/libpinyin4/+merge/193859/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/ubuntu-keyboard-ci/217/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/ubuntu-keyboard-trusty-amd64-ci/45/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/ubuntu-keyboard-trusty-armhf-ci/45/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/ubuntu-keyboard-trusty-i386-ci/45/console

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/ubuntu-keyboard-ci/217/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Günter Schwann (schwann) wrote :

code looks good

Revision history for this message
Günter Schwann (schwann) wrote :

WARNING: bool MIMPluginManagerPrivate::loadPlugin(const QDir&, const QString&) Error loading plugin from "/usr/lib/maliit/plugins/libubuntu-keyboard-plugin.so" "Cannot load library /usr/lib/maliit/plugins/libubuntu-keyboard-plugin.so: (libpinyin.so.4: cannot open shared object file: No such file or directory)"

So I was able to install the package, without needing to upgrade to the new version of libpinyin4

review: Needs Fixing
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

From the package information, it clearly states that libpinyin4 is a dependency. Please check that you have correctly installed all produced packages and their dependencies.

dpkg-deb -I ubuntu-keyboard_0.99.trunk.phablet2+14.04.20131105.1-0ubuntu1_armhf.deb
 new debian package, version 2.0.
 size 224694 bytes: control archive=1035 bytes.
      32 bytes, 1 lines conffiles
    1339 bytes, 20 lines control
     244 bytes, 3 lines md5sums
 Package: ubuntu-keyboard
 Version: 0.99.trunk.phablet2+14.04.20131105.1-0ubuntu1
 Architecture: armhf
 Maintainer: Ubuntu Developers <email address hidden>
 Installed-Size: 713
 Depends: maliit-framework (>= 0.99.0+git20130615+97e8335-0ubuntu3), qtdeclarative5-window-plugin, ubuntu-keyboard-data (>= 0.99.trunk.phablet2+14.04.20131105.1-0ubuntu1), libc6 (>= 2.4), libgcc1 (>= 1:4.4.0), libglib2.0-0 (>= 2.12.0), libgsettings-qt1, libhunspell-1.3-0, libmaliit-plugins0, libpinyin4 (>= 0.9.93), libpresage1 (>= 0.8.3), libqt5core5 (>= 5.0.2), libqt5gui5 (>= 5.0.2), libqt5network5 (>= 5.0.2), libqt5qml5, libqt5quick5, libstdc++6 (>= 4.4.0), libubuntu-application-api1 (>= 0.18.1daily13.06.21)

Revision history for this message
Günter Schwann (schwann) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2013-11-07 16:07:36 +0000
3+++ debian/control 2013-11-12 23:09:13 +0000
4@@ -10,7 +10,7 @@
5 libglib2.0-dev,
6 libgsettings-qt-dev,
7 libhunspell-dev,
8- libpinyin2-dev,
9+ libpinyin4-dev,
10 libplatform-api1-dev,
11 libpresage-dev,
12 libxml2-utils,
13
14=== modified file 'src/lib/logic/pinyinadapter.cpp'
15--- src/lib/logic/pinyinadapter.cpp 2013-08-19 20:44:22 +0000
16+++ src/lib/logic/pinyinadapter.cpp 2013-11-12 23:09:13 +0000
17@@ -57,8 +57,8 @@
18 std::cout << std::endl;
19 #endif
20
21- m_array = g_array_new(FALSE, FALSE, sizeof(lookup_candidate_t));
22- pinyin_get_candidates(m_instance, 0, m_array);
23+
24+ pinyin_guess_candidates(m_instance, 0);
25
26 pinyin_guess_sentence(m_instance);
27
28@@ -66,16 +66,20 @@
29 pinyin_get_sentence(m_instance, &sentence);
30
31 candidates.clear();
32- for (unsigned int i = 0 ; i < m_array->len; i ++ )
33+ guint len = 0;
34+ pinyin_get_n_candidate(m_instance, &len);
35+ for (unsigned int i = 0 ; i < len; i ++ )
36 {
37- lookup_candidate_t token = g_array_index(m_array, lookup_candidate_t, i);
38- char* word = NULL;
39+ lookup_candidate_t * candidate = NULL;
40+ pinyin_get_candidate(m_instance, i, &candidate);
41+
42+ const char* word = NULL;
43+ pinyin_get_candidate_string(m_instance, candidate, &word);
44+
45 // Translate the token to utf-8 phrase.
46- pinyin_translate_token(m_instance, token.m_token, &word);
47 if (word) {
48 candidates.append(QString(word));
49 }
50- g_free(word);
51 }
52
53 QString unicode(sentence);
54@@ -91,7 +95,10 @@
55 void PinyinAdapter::wordCandidateSelected(const QString& word)
56 {
57 Q_UNUSED(word)
58- pinyin_choose_candidate(m_instance, 0, &g_array_index(m_array, lookup_candidate_t, 1));
59+
60+ lookup_candidate_t * candidate = NULL;
61+ pinyin_get_candidate(m_instance, 1, &candidate);
62+ pinyin_choose_candidate(m_instance, 0, candidate);
63 }
64
65 void PinyinAdapter::reset()

Subscribers

People subscribed via source and target branches