Merge lp:~abreu-alexandre/cordova-ubuntu/fix-icu-dev-version into lp:cordova-ubuntu/2.8

Proposed by Robert Bruce Park
Status: Rejected
Rejected by: Robert Bruce Park
Proposed branch: lp:~abreu-alexandre/cordova-ubuntu/fix-icu-dev-version
Merge into: lp:cordova-ubuntu/2.8
Diff against target: 78 lines (+6/-25)
2 files modified
debian/control (+0/-1)
src/plugins/globalization.cpp (+6/-24)
To merge this branch: bzr merge lp:~abreu-alexandre/cordova-ubuntu/fix-icu-dev-version
Reviewer Review Type Date Requested Status
Robert Bruce Park (community) Disapprove
Review via email: mp+203800@code.launchpad.net

Commit message

Rip out ICU, which was conflicting with an incompatible version of ICU pulled in by Qt itself.

To post a comment you must log in.
Revision history for this message
Robert Bruce Park (robru) wrote :

dholbach and I both tested that this allows the tests to run.

review: Approve
Revision history for this message
Robert Bruce Park (robru) wrote :

nm, no change rebuild has same results...

review: Disapprove

Unmerged revisions

253. By Alexandre Abreu

remove icu references for now

252. By Alexandre Abreu

Fix icu dev version pulled

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-10-16 21:11:15 +0000
3+++ debian/control 2014-01-29 17:38:55 +0000
4@@ -5,7 +5,6 @@
5 Build-Depends: cmake,
6 debhelper (>= 9),
7 libx11-dev,
8- libicu-dev,
9 pkg-config,
10 qtbase5-dev,
11 qtchooser,
12
13=== modified file 'src/plugins/globalization.cpp'
14--- src/plugins/globalization.cpp 2013-08-30 10:50:41 +0000
15+++ src/plugins/globalization.cpp 2014-01-29 17:38:55 +0000
16@@ -1,7 +1,5 @@
17
18 #include <ctime> //TODO: switch to QTimeZone (QT 5.1)
19-#include <unicode/decimfmt.h>
20-#include <unicode/timezone.h>
21
22 #include "globalization.h"
23
24@@ -232,25 +230,13 @@
25 this->callback(ecId, QString("new GlobalizationError(%1, 'parsing error')").arg(Globalization::PARSING_ERROR));
26 }
27
28-static QString ustr2qstr(UnicodeString &ustr) {
29- std::string res;
30- ustr.toUTF8String(res);
31-
32- return QString(res.c_str());
33-}
34-
35 void Globalization::getNumberPattern(int scId, int ecId, int type) {
36 Q_UNUSED(ecId);
37- UErrorCode status = U_ZERO_ERROR;
38- icu::DecimalFormat icu(status);
39-
40- icu::UnicodeString pattern;
41- icu.toPattern(pattern);
42
43 QLocale locale;
44 QVariantMap obj;
45
46- obj.insert("pattern", ustr2qstr(pattern));
47+ obj.insert("pattern", "#,##0.###");
48
49 switch ((NumberType)type) {
50 case Globalization::DECIMAL:
51@@ -264,8 +250,8 @@
52 break;
53 };
54
55- obj.insert("fraction", icu.getMaximumFractionDigits());
56- obj.insert("rounding", icu.getRoundingIncrement());
57+ obj.insert("fraction", 0);
58+ obj.insert("rounding", 0);
59 obj.insert("positive", QString(locale.positiveSign()));
60 obj.insert("negative", QString(locale.negativeSign()));
61 obj.insert("decimal", QString(locale.decimalPoint()));
62@@ -303,13 +289,9 @@
63 break;
64 };
65
66- UnicodeString result;
67- QSharedPointer<TimeZone> timezone = QSharedPointer<TimeZone>(TimeZone::createDefault());
68- timezone->getDisplayName(inDayLightSavingsTime(), TimeZone::SHORT, result);
69-
70- res.insert("timezone", ustr2qstr(result));
71- res.insert("utc_offset", timezone->getRawOffset() / 1000 + timezone->getDSTSavings() / 1000);
72- res.insert("dst_offset", timezone->getDSTSavings() / 1000);
73+ res.insert("timezone", "");
74+ res.insert("utc_offset", 0);
75+ res.insert("dst_offset", 0);
76
77 this->cb(scId, res);
78 }

Subscribers

People subscribed via source and target branches