on xenial help sign in
[ Michael Terry ]

* Fix path in launcher mock after moving our mock icons, to avoid a lot of "icon not found" warnings during qmluitests. * Fix the testMultiGreeter qmluitest. Incoming method variables are apparently read-only in Qt5.3. (LP: #1332488) [ CI bot ] * Resync trunk [ Michał Sawicz ] * Adapt scope mock to new api and quiet unused variable warnings. * Fix dynamic overlay height. (LP: #1334879) * Don't center items in CardVerticalJournal, kind of beats the purpose... Also don't bind unnecessarily. [ Ying-Chun Liu ] * Fix LP:1330957 Fix some failed test cases. (LP: #1330957) [ Albert Astals ] * Don't seem to need this waitForRendering And makes test fail in 5.3 [ Alberto Aguirre ] * Update Powerd plugin and Shell.qml to accommodate changes in the display power state notification.

commit7eb41076cc4490914dac32da9737c0a53def7fdc authorRodney Dawes <rodney.dawes@canonical.com> dateFri 27 Jun 2014, 11:08 (12 years ago) parent125e6339ecb67c
22 files changed+102−61
debian/changelog+33 debian/control+1−1 plugins/Dash/CardCreator.js+7−4 plugins/Powerd/Powerd.cpp+16−16 plugins/Powerd/Powerd.h+8−8 po/es.po+7−7 qml/Dash/CardVerticalJournal.qml−3 qml/Greeter/LoginList.qml+4−4 qml/Shell.qml+1−1 tests/mocks/AccountsService/AccountsService.cpp+3−1 tests/mocks/AccountsService/CMakeLists.txt−2 tests/mocks/Powerd/Powerd.h+7−7 tests/mocks/Unity/Launcher/CMakeLists.txt−2 tests/mocks/Unity/Launcher/MockLauncherItem.cpp+3−1 tests/mocks/Unity/fake_categories.cpp+1−1 tests/mocks/Unity/fake_scope.cpp+5 tests/mocks/Unity/fake_scope.h+2 tests/plugins/Dash/cardcreator/1.res+1 tests/plugins/Dash/cardcreator/3.res+1 tests/plugins/Dash/cardcreator/5.res+1−1 tests/qmltests/Components/tst_LazyImage.qml−1 tests/qmltests/tst_Shell.qml+1−1
debian/changelog+33
@@ -1,3 +1,36 @@
1+unity8 (7.89+14.10.20140627-0ubuntu1) utopic; urgency=low
2+
3+ [ Michael Terry ]
4+ * Fix path in launcher mock after moving our mock icons, to avoid a
5+ lot of "icon not found" warnings during qmluitests.
6+ * Fix the testMultiGreeter qmluitest. Incoming method variables are
7+ apparently read-only in Qt5.3. (LP: #1332488)
8+
9+ [ CI bot ]
10+ * Resync trunk
11+
12+ [ Michał Sawicz ]
13+ * Adapt scope mock to new api and quiet unused variable warnings.
14+ * Fix dynamic overlay height. (LP: #1334879)
15+ * Don't center items in CardVerticalJournal, kind of beats the
16+ purpose... Also don't bind unnecessarily.
17+
18+ [ Ying-Chun Liu ]
19+ * Fix LP:1330957 Fix some failed test cases. (LP: #1330957)
20+
21+ [ Albert Astals ]
22+ * Don't seem to need this waitForRendering And makes test fail in 5.3
23+
24+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 27 Jun 2014 08:47:58 +0000
25+
26+unity8 (7.89+14.10.20140624.1-0ubuntu1) utopic; urgency=low
27+
28+ [ Alberto Aguirre ]
29+ * Update Powerd plugin and Shell.qml to accommodate changes in the
30+ display power state notification.
31+
32+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 24 Jun 2014 17:11:08 +0000
33+
134unity8 (7.89+14.10.20140624-0ubuntu1) utopic; urgency=low
235
336 [ Ying-Chun Liu ]
debian/control+1−1
@@ -18,7 +18,7 @@ Build-Depends: cmake,
1818 libpulse-dev,
1919 libqmenumodel-dev (>= 0.2.7),
2020 libqt5xmlpatterns5-dev,
21− libunity-api-dev (>= 7.82),
21+ libunity-api-dev (>= 7.83),
2222 libunity-mir-dev,
2323 libusermetricsoutput1-dev,
2424 libxcb1-dev,
plugins/Dash/CardCreator.js+7−4
@@ -113,7 +113,7 @@ var kOverlayLoaderCode = 'Loader { \n\
113113 visible: showHeader && status == Loader.Ready; \n\
114114 sourceComponent: ShaderEffect { \n\
115115 id: overlay; \n\
116− height: fixedHeaderHeight > 0 ? fixedHeaderHeight + units.gu(1) * 2 : headerHeight; \n\
116+ height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
117117 opacity: 0.6; \n\
118118 property var source: ShaderEffectSource { \n\
119119 id: shaderSource; \n\
@@ -363,11 +363,11 @@ function cardString(template, components) {
363363 }
364364 }
365365 var headerLeftAnchor;
366− var headerLeftAnchorHasMagin = false;
366+ var headerLeftAnchorHasMargin = false;
367367 if (isHorizontal && hasArt) {
368368 headerLeftAnchor = 'left: artShapeHolder.right; \n\
369369 leftMargin: units.gu(1);\n';
370− headerLeftAnchorHasMagin = true;
370+ headerLeftAnchorHasMargin = true;
371371 } else {
372372 headerLeftAnchor = 'left: parent.left;\n';
373373 }
@@ -392,7 +392,7 @@ function cardString(template, components) {
392392 if (!hasHeaderRow) {
393393 anchors += headerLeftAnchor;
394394 anchors += headerVerticalAnchors;
395− if (!headerLeftAnchorHasMagin) {
395+ if (!headerLeftAnchorHasMargin) {
396396 anchors += 'leftMargin: units.gu(1);\n'
397397 }
398398 } else {
@@ -444,6 +444,9 @@ function cardString(template, components) {
444444 titleAnchors = "right: parent.right;";
445445 titleAnchors += headerLeftAnchor;
446446 titleAnchors += headerVerticalAnchors;
447+ if (!headerLeftAnchorHasMargin) {
448+ titleAnchors += 'leftMargin: units.gu(1);\n'
449+ }
447450 }
448451 subtitleAnchors = 'left: titleLabel.left; \n\
449452 leftMargin: titleLabel.leftMargin; \n\
plugins/Powerd/Powerd.cpp+16−16
@@ -19,35 +19,35 @@
1919#include "Powerd.h"
2020#include <QDBusPendingCall>
2121
22−void autoBrightnessChanged(GSettings *settings, const gchar *key, QDBusInterface *powerd)
22+void autoBrightnessChanged(GSettings *settings, const gchar *key, QDBusInterface *unityScreen)
2323{
2424 bool value = g_settings_get_boolean(settings, key);
25− powerd->asyncCall("userAutobrightnessEnable", QVariant(value));
25+ unityScreen->asyncCall("userAutobrightnessEnable", QVariant(value));
2626}
2727
2828Powerd::Powerd(QObject* parent)
2929 : QObject(parent),
30− powerd(NULL)
30+ unityScreen(NULL)
3131{
32− powerd = new QDBusInterface("com.canonical.powerd",
33− "/com/canonical/powerd",
34− "com.canonical.powerd",
35− QDBusConnection::SM_BUSNAME(), this);
32+ unityScreen = new QDBusInterface("com.canonical.Unity.Screen",
33+ "/com/canonical/Unity/Screen",
34+ "com.canonical.Unity.Screen",
35+ QDBusConnection::SM_BUSNAME(), this);
3636
37− powerd->connection().connect("com.canonical.powerd",
38− "/com/canonical/powerd",
39− "com.canonical.powerd",
40− "DisplayPowerStateChange",
41− this,
42− SIGNAL(displayPowerStateChange(int, unsigned int)));
37+ unityScreen->connection().connect("com.canonical.Unity.Screen",
38+ "/com/canonical/Unity/Screen",
39+ "com.canonical.Unity.Screen",
40+ "DisplayPowerStateChange",
41+ this,
42+ SIGNAL(displayPowerStateChange(int, int)));
4343
4444 systemSettings = g_settings_new("com.ubuntu.touch.system");
45− g_signal_connect(systemSettings, "changed::auto-brightness", G_CALLBACK(autoBrightnessChanged), powerd);
46− autoBrightnessChanged(systemSettings, "auto-brightness", powerd);
45+ g_signal_connect(systemSettings, "changed::auto-brightness", G_CALLBACK(autoBrightnessChanged), unityScreen);
46+ autoBrightnessChanged(systemSettings, "auto-brightness", unityScreen);
4747}
4848
4949Powerd::~Powerd()
5050{
51− g_signal_handlers_disconnect_by_data(systemSettings, powerd);
51+ g_signal_handlers_disconnect_by_data(systemSettings, unityScreen);
5252 g_object_unref(systemSettings);
5353}
plugins/Powerd/Powerd.h+8−8
@@ -28,15 +28,15 @@ class Powerd: public QObject
2828{
2929 Q_OBJECT
3030 Q_ENUMS(Status)
31− Q_FLAGS(DisplayFlag DisplayFlags)
31+ Q_ENUMS(DisplayStateChangeReason)
3232
3333public:
34− enum DisplayFlag {
35− UseProximity = 1, // Use proximity sensor to override screen state
36− DisableAutoBrightness = 2, // Force autobrightness to be disabled
37− Bright = 4, // Request the screen to stay bright
34+ enum DisplayStateChangeReason {
35+ Unknown = 0,
36+ Inactivity = 1, // Display changed state due to inactivity
37+ PowerKey = 2, // Display changed state due to user pressing power key
38+ Proximity = 3, // Display changed state due to proximity events
3839 };
39− Q_DECLARE_FLAGS(DisplayFlags, DisplayFlag)
4040
4141 enum Status {
4242 Off,
@@ -47,10 +47,10 @@ public:
4747 ~Powerd();
4848
4949Q_SIGNALS:
50− void displayPowerStateChange(int status, unsigned int flags);
50+ void displayPowerStateChange(int status, int reason);
5151
5252private:
53− QDBusInterface *powerd;
53+ QDBusInterface *unityScreen;
5454 GSettings *systemSettings;
5555};
5656
po/es.po+7−7
@@ -8,14 +8,14 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-06-13 09:55+0200\n"
11−"PO-Revision-Date: 2014-06-02 06:28+0000\n"
12−"Last-Translator: benjisp94 <benjisp94@gmail.com>\n"
11+"PO-Revision-Date: 2014-06-26 03:08+0000\n"
12+"Last-Translator: Adolfo Jayme <fitoschido@gmail.com>\n"
1313"Language-Team: Spanish <es@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-06-17 06:51+0000\n"
18−"X-Generator: Launchpad (build 17045)\n"
17+"X-Launchpad-Export-Date: 2014-06-27 07:13+0000\n"
18+"X-Generator: Launchpad (build 17077)\n"
1919
2020#: plugins/Unity/Launcher/launcheritem.cpp:43
2121#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -83,7 +83,7 @@ msgstr "Llamada de emergencia"
8383
8484#: qml/Components/Lockscreen.qml:231
8585msgid "OK"
86−msgstr ""
86+msgstr "Aceptar"
8787
8888#: qml/Components/PageHeader.qml:365
8989msgid "Recent searches"
@@ -100,11 +100,11 @@ msgstr "Hola"
100100
101101#: qml/Components/PinLockscreen.qml:198
102102msgid "CANCEL"
103−msgstr ""
103+msgstr "CANCELAR"
104104
105105#: qml/Components/PinLockscreen.qml:216
106106msgid "DONE"
107−msgstr ""
107+msgstr "HECHO"
108108
109109#: qml/Components/SeeMore.qml:35
110110msgid "See more"
qml/Dash/CardVerticalJournal.qml−3
@@ -67,11 +67,8 @@ DashRenderer {
6767 id: loader
6868 sourceComponent: cardTool.cardComponent
6969 width: cardTool.cardWidth
70− anchors.horizontalCenter: parent.horizontalCenter
7170 onLoaded: {
7271 item.objectName = "delegate" + index;
73− item.width = Qt.binding(function() { return cardTool.cardWidth; });
74− item.height = Qt.binding(function() { return cardTool.cardHeight; });
7572 item.fixedArtShapeSize = Qt.binding(function() { return cardTool.artShapeSize; });
7673 item.fixedHeaderHeight = Qt.binding(function() { return cardTool.headerHeight; });
7774 item.cardData = Qt.binding(function() { return model; });
qml/Greeter/LoginList.qml+4−4
@@ -257,13 +257,13 @@ Item {
257257
258258 onShowMessage: {
259259 // inefficient, but we only rarely deal with messages
260− text = text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n/g, "<br>");
260+ var html = text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n/g, "<br>")
261261 if (isError)
262− text = "<font color=\"#df382c\">" + text + "</font>"
262+ html = "<font color=\"#df382c\">" + html + "</font>"
263263 if (infoLabel.text == "")
264− infoLabel.text = text;
264+ infoLabel.text = html
265265 else
266− infoLabel.text = infoLabel.text + "<br>" + text;
266+ infoLabel.text = infoLabel.text + "<br>" + html
267267 }
268268
269269 onShowPrompt: {
qml/Shell.qml+1−1
@@ -452,7 +452,7 @@ FocusScope {
452452 onDisplayPowerStateChange: {
453453 // We ignore any display-off signals when the proximity sensor
454454 // is active. This usually indicates something like a phone call.
455− if (status == Powerd.Off && (flags & Powerd.UseProximity) == 0) {
455+ if (status == Powerd.Off && reason != Powerd.Proximity) {
456456 greeter.showNow();
457457 }
458458
tests/mocks/AccountsService/AccountsService.cpp+3−1
@@ -18,9 +18,11 @@
1818
1919#include "AccountsService.h"
2020
21+#include <paths.h>
22+
2123AccountsService::AccountsService(QObject* parent)
2224 : QObject(parent),
23− m_backgroundFile(TOP_SRCDIR "/qml/graphics/phone_background.jpg"),
25+ m_backgroundFile(qmlDirectory() + "graphics/phone_background.jpg"),
2426 m_statsWelcomeScreen(true)
2527{
2628}
tests/mocks/AccountsService/CMakeLists.txt−2
@@ -1,5 +1,3 @@
1−add_definitions(-DTOP_SRCDIR="${CMAKE_SOURCE_DIR}")
2−
31add_library(MockAccountsService-qml MODULE
42 AccountsService.cpp
53 plugin.cpp
tests/mocks/Powerd/Powerd.h+7−7
@@ -25,15 +25,15 @@ class Powerd: public QObject
2525{
2626 Q_OBJECT
2727 Q_ENUMS(Status)
28− Q_FLAGS(DisplayFlag DisplayFlags)
28+ Q_ENUMS(DisplayStateChangeReason)
2929
3030public:
31− enum DisplayFlag {
32− UseProximity = 1, // Use proximity sensor to override screen state
33− DisableAutoBrightness = 2, // Force autobrightness to be disabled
34− Bright = 4, // Request the screen to stay bright
31+ enum DisplayStateChangeReason {
32+ Unknown = 0,
33+ Inactivity = 1, // Display changed state due to inactivity
34+ PowerKey = 2, // Display changed state due to user pressing power key
35+ Proximity = 3, // Display changed state due to proximity events
3536 };
36− Q_DECLARE_FLAGS(DisplayFlags, DisplayFlag)
3737
3838 enum Status {
3939 Off,
@@ -43,7 +43,7 @@ public:
4343 explicit Powerd(QObject *parent = 0);
4444
4545Q_SIGNALS:
46− void displayPowerStateChange(int status, unsigned int flags);
46+ void displayPowerStateChange(int status, int reason);
4747};
4848
4949#endif
tests/mocks/Unity/Launcher/CMakeLists.txt−2
@@ -1,7 +1,5 @@
11pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=3)
22
3−add_definitions(-DTOP_SRCDIR="${CMAKE_SOURCE_DIR}")
4−
53include_directories(
64 ${CMAKE_CURRENT_SOURCE_DIR}
75)
tests/mocks/Unity/Launcher/MockLauncherItem.cpp+3−1
@@ -20,6 +20,8 @@
2020#include "MockLauncherItem.h"
2121#include "MockQuickListModel.h"
2222
23+#include <paths.h>
24+
2325using namespace unity::shell::launcher;
2426
2527MockLauncherItem::MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent):
@@ -27,7 +29,7 @@ MockLauncherItem::MockLauncherItem(const QString &appId, const QString& desktopF
2729 m_appId(appId),
2830 m_desktopFile(desktopFile),
2931 m_name(name),
30− m_icon(TOP_SRCDIR "/graphics/applicationIcons/" + icon + ".png"),
32+ m_icon(qmlDirectory() + "graphics/applicationIcons/" + icon + ".png"),
3133 m_pinned(false),
3234 m_running(false),
3335 m_recent(false),
tests/mocks/Unity/fake_categories.cpp+1−1
@@ -50,7 +50,7 @@ void Categories::addSpecialCategory(QString const& categoryId, QString const& na
5050 }
5151}
5252
53−bool Categories::overrideCategoryJson(QString const& categoryId, QString const& json)
53+bool Categories::overrideCategoryJson(QString const& /* categoryId */, QString const& /* json */)
5454{
5555 qFatal("Using un-implemented Categories::overrideCategoryJson");
5656}
tests/mocks/Unity/fake_scope.cpp+5
@@ -155,6 +155,11 @@ bool Scope::hasDepartments() const
155155 return true;
156156}
157157
158+QVariantMap Scope::customizations() const
159+{
160+ return QVariantMap();
161+}
162+
158163unity::shell::scopes::DepartmentInterface* Scope::getDepartment(const QString& id)
159164{
160165 if (id.isEmpty())
tests/mocks/Unity/fake_scope.h+2
@@ -64,6 +64,8 @@ public:
6464 Q_INVOKABLE unity::shell::scopes::DepartmentInterface* getDepartment(const QString& id) override;
6565 Q_INVOKABLE void loadDepartment(const QString& id) override;
6666
67+ QVariantMap customizations() const override;
68+
6769protected:
6870
6971 QString m_id;
tests/plugins/Dash/cardcreator/1.res+1
@@ -68,6 +68,7 @@ Label {
6868 anchors { right: parent.right;left: parent.left;
6969top: artShapeHolder.bottom;
7070 topMargin: units.gu(1);
71+leftMargin: units.gu(1);
7172 }
7273 elide: Text.ElideRight;
7374 fontSize: "small";
tests/plugins/Dash/cardcreator/3.res+1
@@ -68,6 +68,7 @@ Label {
6868 anchors { right: parent.right;left: parent.left;
6969top: artShapeHolder.bottom;
7070 topMargin: units.gu(1);
71+leftMargin: units.gu(1);
7172}
7273 elide: Text.ElideRight;
7374 fontSize: "small";
tests/plugins/Dash/cardcreator/5.res+1−1
@@ -73,7 +73,7 @@ Loader {
7373 visible: showHeader && status == Loader.Ready;
7474 sourceComponent: ShaderEffect {
7575 id: overlay;
76− height: fixedHeaderHeight > 0 ? fixedHeaderHeight + units.gu(1) * 2 : headerHeight;
76+ height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
7777 opacity: 0.6;
7878 property var source: ShaderEffectSource {
7979 id: shaderSource;
tests/qmltests/Components/tst_LazyImage.qml−1
@@ -152,7 +152,6 @@ Rectangle {
152152
153153 function test_lazyimage(data) {
154154 data.func();
155− waitForRendering(baseRect);
156155
157156 if (data.transition) {
158157 // wait for the transition to complete
tests/qmltests/tst_Shell.qml+1−1
@@ -195,7 +195,7 @@ Item {
195195 tryCompare(mainApp, "state", ApplicationInfo.Running);
196196
197197 // Try to suspend while proximity is engaged...
198− Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
198+ Powerd.displayPowerStateChange(Powerd.Off, Powerd.Proximity);
199199 tryCompare(greeter, "showProgress", 0);
200200
201201 // Now really suspend