on xenial help sign in
Merge trunk.
commite908bd426693a0ffdf06cfc29354bb51523e8099 authorMichał Sawicz <michal.sawicz@canonical.com> dateWed 5 Mar 2014, 10:06 (13 years ago) parent336c00321adca2
13 files changed+69−17
debian/changelog+16 plugins/Ubuntu/Gestures/DirectionalDragArea.cpp+1 plugins/Unity/Indicators/qml/MenuItemFactory.qml+1 po/km.po+5−5 qml/Greeter/Greeter.qml+4 qml/Greeter/GreeterContent.qml−1 qml/Shell.qml−2 tests/mocks/AccountsService/AccountsService.cpp+1−1 tests/mocks/Unity/Indicators/fakeindicatorsmodel.cpp−6 tests/mocks/Unity/Indicators/fakeindicatorsmodel.h−2 tests/mocks/Unity/Indicators/fakeplugin.cpp+3 tests/qmltests/Greeter/tst_Phone.qml+19 tests/qmltests/Greeter/tst_Tablet.qml+19
debian/changelog+16
@@ -1,3 +1,19 @@
1+unity8 (7.84+14.04.20140304-0ubuntu1) trusty; urgency=low
2+
3+ [ Michael Terry ]
4+ * Ensure that the selected() signal is emitted by the greeter on
5+ startup, fixing the background on startup for the first user in
6+ tablet mode.
7+
8+ [ Nick Dedekind ]
9+ * Remocked IndicatorModel to fix qt5.2.1 changes.
10+
11+ [ Albert Astals ]
12+ * Initialize m_distance (LP: #1285385)
13+ * import Ubuntu.Components so we can use UbuntuAnimation
14+
15+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 04 Mar 2014 11:43:04 +0000
16+
117unity8 (7.84+14.04.20140228-0ubuntu1) trusty; urgency=low
218
319 [ Michał Sawicz ]
plugins/Ubuntu/Gestures/DirectionalDragArea.cpp+1
@@ -109,6 +109,7 @@ private:
109109DirectionalDragArea::DirectionalDragArea(QQuickItem *parent)
110110 : QQuickItem(parent)
111111 , m_status(WaitingForTouch)
112+ , m_sceneDistance(0)
112113 , m_touchId(-1)
113114 , m_direction(Direction::Rightwards)
114115 , m_wideningAngle(0)
plugins/Unity/Indicators/qml/MenuItemFactory.qml+1
@@ -22,6 +22,7 @@ import Ubuntu.Settings.Menus 0.1 as Menus
2222import QMenuModel 0.1 as QMenuModel
2323import Utils 0.1 as Utils
2424import Ubuntu.Components.ListItems 0.1 as ListItems
25+import Ubuntu.Components 0.1
2526
2627Item {
2728 id: menuFactory
po/km.po+5−5
@@ -8,15 +8,15 @@ msgstr ""
88"Project-Id-Version: unity8\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-02-13 18:37+0000\n"
11−"PO-Revision-Date: 2014-02-12 07:06+0000\n"
11+"PO-Revision-Date: 2014-03-04 02:32+0000\n"
1212"Last-Translator: Khoem Sokhem <khoemsokhem@khmeros.info>\n"
1313"Language-Team: Khmer <km@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-02-19 05:44+0000\n"
19−"X-Generator: Launchpad (build 16916)\n"
18+"X-Launchpad-Export-Date: 2014-03-04 08:33+0000\n"
19+"X-Generator: Launchpad (build 16948)\n"
2020
2121#: plugins/Unity/Launcher/launcheritem.cpp:43
2222#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -108,11 +108,11 @@ msgstr[0] "ពិនិត្យ​មើល %1"
108108
109109#: qml/Dash/Previews/PreviewActionCombo.qml:34
110110msgid "More..."
111−msgstr ""
111+msgstr "ច្រើនជាង​..."
112112
113113#: qml/Dash/Previews/PreviewActionCombo.qml:34
114114msgid "Less..."
115−msgstr ""
115+msgstr "តិច​ជាង..."
116116
117117#: qml/Dash/Previews/PreviewRating.qml:114 qml/Dash/Previews/Reviews.qml:74
118118msgid "Add a review"
qml/Greeter/Greeter.qml+4
@@ -67,6 +67,10 @@ Showable {
6767
6868 source: required ? "GreeterContent.qml" : ""
6969
70+ onLoaded: {
71+ selected(currentIndex);
72+ }
73+
7074 Connections {
7175 target: greeterContentLoader.item
7276
qml/Greeter/GreeterContent.qml−1
@@ -96,7 +96,6 @@ MouseArea {
9696
9797 onLoaded: {
9898 item.currentIndex = greeterContentLoader.currentIndex;
99− selected(item.currentIndex);
10099 item.resetAuthentication();
101100 }
102101
qml/Shell.qml−2
@@ -421,7 +421,6 @@ FocusScope {
421421 Component.onCompleted: {
422422 if (LightDM.Users.count == 1) {
423423 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
424− greeter.selected(0)
425424 }
426425 }
427426 }
@@ -497,7 +496,6 @@ FocusScope {
497496 // If there are more users, the Greeter will handle that
498497 if (LightDM.Users.count == 1) {
499498 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
500− greeter.selected(0);
501499 }
502500 greeter.forceActiveFocus();
503501 removeApplicationFocus();
tests/mocks/AccountsService/AccountsService.cpp+1−1
@@ -20,7 +20,7 @@
2020
2121AccountsService::AccountsService(QObject* parent)
2222 : QObject(parent),
23− m_backgroundFile(TOP_SRCDIR "/graphics/phone_background.jpg"),
23+ m_backgroundFile(TOP_SRCDIR "/qml/graphics/phone_background.jpg"),
2424 m_statsWelcomeScreen(true)
2525{
2626}
tests/mocks/Unity/Indicators/fakeindicatorsmodel.cpp−6
@@ -20,12 +20,6 @@
2020#include "fakeindicatorsmodel.h"
2121#include "indicators.h"
2222
23−#include <paths.h>
24−
25−#include <QQmlContext>
26−#include <QQmlEngine>
27−#include <QDebug>
28−
2923FakeIndicatorsModel::FakeIndicatorsModel(QObject *parent)
3024 : QAbstractListModel(parent)
3125{
tests/mocks/Unity/Indicators/fakeindicatorsmodel.h−2
@@ -22,8 +22,6 @@
2222
2323#include <QAbstractListModel>
2424
25−class IndicatorsManager;
26−
2725class FakeIndicatorsModel : public QAbstractListModel
2826{
2927 Q_OBJECT
tests/mocks/Unity/Indicators/fakeplugin.cpp+3
@@ -33,12 +33,15 @@ void IndicatorsFakePlugin::registerTypes(const char * uri)
3333{
3434 Q_INIT_RESOURCE(indicators_fake);
3535
36+ // internal
3637 qmlRegisterType<FakeIndicatorsModel>(uri, 0, 1, "FakeIndicatorsModel");
3738
39+ // external
3840 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");
3941 qmlRegisterType<UnityMenuModelStack>(uri, 0, 1, "UnityMenuModelStack");
4042 qmlRegisterType<VisibleIndicatorsModel>(uri, 0, 1, "VisibleIndicatorsModel");
4143
44+ // external uncreatables
4245 qmlRegisterUncreatableType<MenuContentState>(uri, 0, 1, "MenuContentState", "Can't create MenuContentState class");
4346 qmlRegisterUncreatableType<ActionState>(uri, 0, 1, "ActionState", "Can't create ActionState class");
4447 qmlRegisterUncreatableType<NetworkActionState>(uri, 0, 1, "NetworkActionState", "Can't create NetworkActionState class");
tests/qmltests/Greeter/tst_Phone.qml+19
@@ -44,6 +44,17 @@ Item {
4444 }
4545 }
4646
47+ Component {
48+ id: greeterComponent
49+ Greeter {
50+ SignalSpy {
51+ objectName: "selectedSpy"
52+ target: parent
53+ signalName: "selected"
54+ }
55+ }
56+ }
57+
4758 SignalSpy {
4859 id: unlockSpy
4960 target: greeter
@@ -148,5 +159,13 @@ Item {
148159 tryCompareFunction(function() { return background.source.toString().indexOf(data.expected) !== -1; }, true)
149160 tryCompare(background, "status", Image.Ready)
150161 }
162+
163+ function test_initial_selected_signal() {
164+ var greeterObj = greeterComponent.createObject(this)
165+ var spy = findChild(greeterObj, "selectedSpy")
166+ spy.wait()
167+ tryCompare(spy, "count", 1)
168+ greeterObj.destroy()
169+ }
151170 }
152171}
tests/qmltests/Greeter/tst_Tablet.qml+19
@@ -31,6 +31,17 @@ Item {
3131 anchors.fill: parent
3232 }
3333
34+ Component {
35+ id: greeterComponent
36+ Greeter {
37+ SignalSpy {
38+ objectName: "selectedSpy"
39+ target: parent
40+ signalName: "selected"
41+ }
42+ }
43+ }
44+
3445 SignalSpy {
3546 id: unlockSpy
3647 target: greeter
@@ -335,5 +346,13 @@ Item {
335346 var userlist = findChild(greeter, "userList")
336347 compare(greeter.model.data(userlist.currentIndex, LightDM.UserRoles.NameRole), "has-password")
337348 }
349+
350+ function test_initial_selected_signal() {
351+ var greeterObj = greeterComponent.createObject(this)
352+ var spy = findChild(greeterObj, "selectedSpy")
353+ spy.wait()
354+ tryCompare(spy, "count", 1)
355+ greeterObj.destroy()
356+ }
338357 }
339358}