Merge lp:~lukas-kde/unity8/loadQtCatalog into lp:unity8

Proposed by Lukáš Tinkl
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 2661
Merged at revision: 2693
Proposed branch: lp:~lukas-kde/unity8/loadQtCatalog
Merge into: lp:unity8
Diff against target: 146 lines (+30/-12)
5 files modified
debian/control (+1/-0)
src/Dash/main.cpp (+9/-1)
src/Panel/Indicators/client/indicatorsclient.cpp (+10/-8)
src/Panel/Indicators/client/indicatorsclient.h (+0/-2)
src/main.cpp (+10/-1)
To merge this branch: bzr merge lp:~lukas-kde/unity8/loadQtCatalog
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+309414@code.launchpad.net

Commit message

Enable loading the main Qt catalog which in turn allows for using RTL languages

Description of the change

Enable loading the main Qt catalog which in turn allows for using RTL languages

See http://doc.qt.io/qt-5/qtquick-positioning-righttoleft.html#default-layout-direction for explanation why

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2661
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2449/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3217
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1844
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1844
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/1844
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3245
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3100
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3100/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3100
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3100/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3100
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3100/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3100
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3100/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3100
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3100/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3100
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3100/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3100
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3100/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3100
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3100/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3100
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3100/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2449/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass? If not, please explain why.
Not really, but they seem unrelated

review: Approve
lp:~lukas-kde/unity8/loadQtCatalog updated
2662. By Lukáš Tinkl

merge trunk

2663. By Lukáš Tinkl

merge trunk

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 2016-10-27 12:25:58 +0000
3+++ debian/control 2016-11-07 13:22:29 +0000
4@@ -156,6 +156,7 @@
5 qml-module-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
6 qtdeclarative5-ubuntu-settings-components (>= 0.7),
7 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
8+ qttranslations5-l10n,
9 ubuntu-thumbnailer-impl-0,
10 ubuntu-wallpapers,
11 unity-application-impl-22,
12
13=== modified file 'src/Dash/main.cpp'
14--- src/Dash/main.cpp 2016-07-19 09:53:25 +0000
15+++ src/Dash/main.cpp 2016-11-07 13:22:29 +0000
16@@ -1,5 +1,5 @@
17 /*
18- * Copyright (C) 2014 Canonical, Ltd.
19+ * Copyright (C) 2014-2016 Canonical, Ltd.
20 *
21 * Authors:
22 * Michael Zanetti <michael.zanetti@canonical.com>
23@@ -26,6 +26,9 @@
24 #include <QLibrary>
25 #include <libintl.h>
26 #include <QQmlApplicationEngine>
27+#include <QTranslator>
28+#include <QLibraryInfo>
29+#include <QLocale>
30
31 #include <paths.h>
32 #include "../qmldebuggerutils.h"
33@@ -81,6 +84,11 @@
34 }
35 }
36
37+ QTranslator qtTranslator;
38+ if (qtTranslator.load(QLocale(), QStringLiteral("qt_"), qgetenv("SNAP"), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
39+ application->installTranslator(&qtTranslator);
40+ }
41+
42 bindtextdomain("unity8", translationDirectory().toUtf8().data());
43 textdomain("unity8");
44
45
46=== modified file 'src/Panel/Indicators/client/indicatorsclient.cpp'
47--- src/Panel/Indicators/client/indicatorsclient.cpp 2015-09-23 15:14:01 +0000
48+++ src/Panel/Indicators/client/indicatorsclient.cpp 2016-11-07 13:22:29 +0000
49@@ -1,5 +1,5 @@
50 /*
51- * Copyright 2013 Canonical Ltd.
52+ * Copyright 2013-2016 Canonical Ltd.
53 *
54 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
56@@ -26,6 +26,9 @@
57 #include <QQmlContext>
58 #include <QQmlEngine>
59 #include <QDebug>
60+#include <QTranslator>
61+#include <QLibraryInfo>
62+#include <QLocale>
63
64 IndicatorsClient::IndicatorsClient(int &argc, char **argv)
65 : QObject(0),
66@@ -33,6 +36,11 @@
67 {
68 m_application = new QApplication(argc, argv);
69
70+ QTranslator qtTranslator;
71+ if (qtTranslator.load(QLocale(), QStringLiteral("qt_"), qgetenv("SNAP"), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
72+ m_application->installTranslator(&qtTranslator);
73+ }
74+
75 QStringList args = m_application->arguments();
76
77 m_view = new QQuickView;
78@@ -53,8 +61,7 @@
79 if (geometryArg.size() == 2) {
80 m_view->resize(geometryArg.at(0).toInt(), geometryArg.at(1).toInt());
81 }
82- }
83- else {
84+ } else {
85 //Usable size on desktop
86 m_view->setMinimumSize(QSize(480, 720));
87 }
88@@ -69,11 +76,6 @@
89 delete m_application;
90 }
91
92-void IndicatorsClient::setupUI()
93-{
94-
95-}
96-
97 int IndicatorsClient::run()
98 {
99 m_view->show();
100
101=== modified file 'src/Panel/Indicators/client/indicatorsclient.h'
102--- src/Panel/Indicators/client/indicatorsclient.h 2013-06-07 12:51:16 +0000
103+++ src/Panel/Indicators/client/indicatorsclient.h 2016-11-07 13:22:29 +0000
104@@ -38,8 +38,6 @@
105 private:
106 QApplication *m_application;
107 QQuickView *m_view;
108-
109- void setupUI();
110 };
111
112 #endif
113
114=== modified file 'src/main.cpp'
115--- src/main.cpp 2016-07-19 09:53:25 +0000
116+++ src/main.cpp 2016-11-07 13:22:29 +0000
117@@ -1,5 +1,5 @@
118 /*
119- * Copyright (C) 2012-2015 Canonical, Ltd.
120+ * Copyright (C) 2012-2016 Canonical, Ltd.
121 *
122 * This program is free software; you can redistribute it and/or modify
123 * it under the terms of the GNU General Public License as published by
124@@ -19,6 +19,10 @@
125 #include "qmldebuggerutils.h"
126 #include "UnixSignalHandler.h"
127
128+#include <QTranslator>
129+#include <QLibraryInfo>
130+#include <QLocale>
131+
132 int main(int argc, const char *argv[])
133 {
134 qSetMessagePattern("[%{time yyyy-MM-dd:hh:mm:ss.zzz}] %{if-category}%{category}: %{endif}%{message}");
135@@ -40,6 +44,11 @@
136 });
137 signalHandler.setupUnixSignalHandlers();
138
139+ QTranslator qtTranslator;
140+ if (qtTranslator.load(QLocale(), QStringLiteral("qt_"), qgetenv("SNAP"), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
141+ application->installTranslator(&qtTranslator);
142+ }
143+
144 int result = application->exec();
145
146 application->destroyResources();

Subscribers

People subscribed via source and target branches