on xenial help sign in
Merge from trunk
cbc5044Michael Terry
cmake/modules/QmlTest.cmake+3
@@ -153,7 +153,9 @@ endmacro(add_qml_test_internal)
153
153
154macro(add_binary_qml_test CLASS_NAME LD_PATH DEPS ENVVAR)
154macro(add_binary_qml_test CLASS_NAME LD_PATH DEPS ENVVAR)
155 set(testCommand
155 set(testCommand
156+ ${ENVVAR}
156 LD_LIBRARY_PATH=${LD_PATH}
157 LD_LIBRARY_PATH=${LD_PATH}
158+ dbus-launch
157 ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_NAME}TestExec
159 ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_NAME}TestExec
158 -o ${CMAKE_BINARY_DIR}/test${CLASS_NAME}.xml,xunitxml
160 -o ${CMAKE_BINARY_DIR}/test${CLASS_NAME}.xml,xunitxml
159 -o -,txt)
161 -o -,txt)
@@ -171,6 +173,7 @@ macro(add_binary_qml_test CLASS_NAME LD_PATH DEPS ENVVAR)
171 ${ENVVAR}
173 ${ENVVAR}
172 LD_LIBRARY_PATH=${LD_PATH}
174 LD_LIBRARY_PATH=${LD_PATH}
173 xvfb-run --server-args "-screen 0 1024x768x24" --auto-servernum
175 xvfb-run --server-args "-screen 0 1024x768x24" --auto-servernum
176+ dbus-launch
174 ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_NAME}TestExec
177 ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_NAME}TestExec
175 -o ${CMAKE_BINARY_DIR}/test${CLASS_NAME}.xml,xunitxml
178 -o ${CMAKE_BINARY_DIR}/test${CLASS_NAME}.xml,xunitxml
176 -o -,txt)
179 -o -,txt)
debian/changelog+46
@@ -1,3 +1,49 @@
1+unity8 (8.02+15.04.20150109.2-0ubuntu1) vivid; urgency=low
2+
3+ [ Michał Sawicz ]
4+ * We don't need the SIGSTOP in main() any more.
5+ * Add a test to make sure the shell always starts disabled until it is
6+ enabled by a complete PAM interaction.
7+
8+ [ Leo Arias ]
9+ * Added an autopilot test for the edges demo.
10+
11+ [ Nick Dedekind ]
12+ * Unhook Lights interface from indicator widgets (LP: #1385331)
13+
14+ [ Albert Astals ]
15+ * Fix going to scopes when the Manage Dash is open (LP: #1403464)
16+ * QSortFilterProxyModelQML -> UnitySortFilterProxyModelQML
17+ * Clip the Scopes List header
18+ * Fix ScopesList not being under finger
19+ * Make waitForRendering with no item fail instead of crash
20+ * Disable Dash horizontal scroll while Navigation InverseMouseArea is
21+ pressed (LP: #1403048)
22+ * Test: Make sure the mouse area is enabled before clicking into it
23+ * Test: We actually need to click on the customBackButton and not on
24+ backButton
25+ * Test: By default mouseX act on the middle
26+
27+ [ Michael Terry ]
28+ * Don't block handling power events on loading the greeter's qml and
29+ the background image.
30+ * Show OSK above the wizard. (LP: #1401213)
31+ * Unify the name of the Greeter DBus test, make it use our standard
32+ binary test macro (which also nicely exports xml results), and make
33+ the test a little more robust against timing issues.
34+ * Add a test to make sure the shell always starts disabled until it is
35+ enabled by a complete PAM interaction.
36+
37+ [ Martin Pitt ]
38+ * tests: Fix Notify.Notification.add_action invocation to work also
39+ with unpatched libnotify API. (LP: #1223401)
40+
41+ [ Rodney Dawes ]
42+ * Depend on :native version of g++ to allow cross-compiling to work.
43+ (LP: #1353855)
44+
45+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 09 Jan 2015 10:43:06 +0000
46+
1unity8 (8.02+15.04.20141216.1-0ubuntu1) vivid; urgency=low
47unity8 (8.02+15.04.20141216.1-0ubuntu1) vivid; urgency=low
2
48
3 [ Ubuntu daily release ]
49 [ Ubuntu daily release ]
debian/control+7−5
@@ -10,8 +10,10 @@ Build-Depends: cmake,
10 gsettings-ubuntu-schemas (>= 0.0.2+14.10.20140815),
10 gsettings-ubuntu-schemas (>= 0.0.2+14.10.20140815),
11# We rely on C++11 features, and to prevent from ABI breaks
11# We rely on C++11 features, and to prevent from ABI breaks
12# in libstdc++ causing us issues, we explicitly select a G++
12# in libstdc++ causing us issues, we explicitly select a G++
13−# version.
13+# version. To allow cross-compiling to work, we also must
14+# append :native to g++-4.9 so we don't try to run armhf g++
15+# on an x86 CPU for eaxmple, when cross-compiling.
14− g++-4.9,
16+ g++-4.9:native,
15 libconnectivity-qt1-dev,
17 libconnectivity-qt1-dev,
16 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
18 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
17 libgl1-mesa-dri,
19 libgl1-mesa-dri,
@@ -22,7 +24,7 @@ Build-Depends: cmake,
22 libpam0g-dev,
24 libpam0g-dev,
23 libpay2-dev,
25 libpay2-dev,
24 libpulse-dev,
26 libpulse-dev,
25− libqmenumodel-dev (>= 0.2.8),
27+ libqmenumodel-dev (>= 0.2.9),
26 libqt5xmlpatterns5-dev,
28 libqt5xmlpatterns5-dev,
27 libsystemsettings-dev,
29 libsystemsettings-dev,
28 libunity-api-dev (>= 7.94),
30 libunity-api-dev (>= 7.94),
@@ -61,7 +63,7 @@ X-Ubuntu-Use-Langpack: yes
61
63
62Package: indicators-client
64Package: indicators-client
63Architecture: amd64 armhf i386
65Architecture: amd64 armhf i386
64−Depends: qmenumodel-qml (>= 0.2.8),
66+Depends: qmenumodel-qml (>= 0.2.9),
65 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.1.1239) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.1.1239),
67 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.1.1239) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.1.1239),
66 unity8 (= ${binary:Version}),
68 unity8 (= ${binary:Version}),
67 ${misc:Depends},
69 ${misc:Depends},
@@ -85,7 +87,7 @@ Provides: indicator-renderer,
85Depends: gsettings-desktop-schemas,
87Depends: gsettings-desktop-schemas,
86 libcap2-bin,
88 libcap2-bin,
87 libglib2.0-bin,
89 libglib2.0-bin,
88− qmenumodel-qml (>= 0.2.8),
90+ qmenumodel-qml (>= 0.2.9),
89 qml-module-qt-labs-folderlistmodel,
91 qml-module-qt-labs-folderlistmodel,
90 qml-module-qtquick-xmllistmodel,
92 qml-module-qtquick-xmllistmodel,
91 qtdeclarative5-gsettings1.0,
93 qtdeclarative5-gsettings1.0,
plugins/LightDM/CMakeLists.txt+1−1
@@ -15,7 +15,7 @@ include_directories(
15)
15)
16
16
17set(QMLPLUGIN_SRC
17set(QMLPLUGIN_SRC
18− ../Utils/qsortfilterproxymodelqml.cpp # FIXME evaluate a more generic approach for using other plugins
18+ ../Utils/unitysortfilterproxymodelqml.cpp # FIXME evaluate a more generic approach for using other plugins
19 DBusGreeter.cpp
19 DBusGreeter.cpp
20 DBusGreeterList.cpp
20 DBusGreeterList.cpp
21 Greeter.cpp
21 Greeter.cpp
plugins/LightDM/UsersModel.cpp+1−1
@@ -58,7 +58,7 @@ QVariant MangleModel::data(const QModelIndex &index, int role) const
58// **** Now we continue with actual UsersModel class ****
58// **** Now we continue with actual UsersModel class ****
59
59
60UsersModel::UsersModel(QObject* parent)
60UsersModel::UsersModel(QObject* parent)
61− : QSortFilterProxyModelQML(parent)
61+ : UnitySortFilterProxyModelQML(parent)
62{
62{
63 setModel(new MangleModel(this));
63 setModel(new MangleModel(this));
64 setSortCaseSensitivity(Qt::CaseInsensitive);
64 setSortCaseSensitivity(Qt::CaseInsensitive);
plugins/LightDM/UsersModel.h+2−2
@@ -23,10 +23,10 @@
23#ifndef UNITY_USERSMODEL_H
23#ifndef UNITY_USERSMODEL_H
24#define UNITY_USERSMODEL_H
24#define UNITY_USERSMODEL_H
25
25
26−#include <qsortfilterproxymodelqml.h>
26+#include <unitysortfilterproxymodelqml.h>
27#include <QtCore/QObject>
27#include <QtCore/QObject>
28
28
29−class UsersModel : public QSortFilterProxyModelQML
29+class UsersModel : public UnitySortFilterProxyModelQML
30{
30{
31 Q_OBJECT
31 Q_OBJECT
32
32
plugins/Lights/Lights.cpp+9−24
@@ -44,12 +44,20 @@ Lights::~Lights()
44
44
45void Lights::setState(Lights::State newState)
45void Lights::setState(Lights::State newState)
46{
46{
47+ if (!init()) {
48+ qWarning() << "No lights device";
49+ return;
50+ }
51+
47 if (m_state != newState) {
52 if (m_state != newState) {
48 if (newState == Lights::On) {
53 if (newState == Lights::On) {
49 turnOn();
54 turnOn();
50 } else {
55 } else {
51 turnOff();
56 turnOff();
52 }
57 }
58+
59+ m_state = newState;
60+ Q_EMIT stateChanged(m_state);
53 }
61 }
54}
62}
55
63
@@ -115,6 +123,7 @@ bool Lights::init()
115 err = module->methods->open(module, LIGHT_ID_NOTIFICATIONS, &device);
123 err = module->methods->open(module, LIGHT_ID_NOTIFICATIONS, &device);
116 if (err == 0) {
124 if (err == 0) {
117 m_lightDevice = (light_device_t*)device;
125 m_lightDevice = (light_device_t*)device;
126+ turnOff();
118 return true;
127 return true;
119 } else {
128 } else {
120 qWarning() << "Failed to access notification lights";
129 qWarning() << "Failed to access notification lights";
@@ -127,15 +136,6 @@ bool Lights::init()
127
136
128void Lights::turnOn()
137void Lights::turnOn()
129{
138{
130− if (!init()) {
131− qWarning() << "No lights device";
132− return;
133− }
134−
135− if (m_state == Lights::On) {
136− return;
137− }
138−
139 // pulse
139 // pulse
140 light_state_t state;
140 light_state_t state;
141 memset(&state, 0, sizeof(light_state_t));
141 memset(&state, 0, sizeof(light_state_t));
@@ -147,23 +147,11 @@ void Lights::turnOn()
147
147
148 if (m_lightDevice->set_light(m_lightDevice, &state) != 0) {
148 if (m_lightDevice->set_light(m_lightDevice, &state) != 0) {
149 qWarning() << "Failed to turn the light off";
149 qWarning() << "Failed to turn the light off";
150− } else {
151− m_state = Lights::On;
152− Q_EMIT stateChanged(m_state);
153 }
150 }
154}
151}
155
152
156void Lights::turnOff()
153void Lights::turnOff()
157{
154{
158− if (!init()) {
159− qWarning() << "No lights device";
160− return;
161− }
162−
163− if (m_state == Lights::Off) {
164− return;
165− }
166−
167 light_state_t state;
155 light_state_t state;
168 memset(&state, 0, sizeof(light_state_t));
156 memset(&state, 0, sizeof(light_state_t));
169 state.color = 0x00000000;
157 state.color = 0x00000000;
@@ -174,8 +162,5 @@ void Lights::turnOff()
174
162
175 if (m_lightDevice->set_light(m_lightDevice, &state) != 0) {
163 if (m_lightDevice->set_light(m_lightDevice, &state) != 0) {
176 qWarning() << "Failed to turn the light off";
164 qWarning() << "Failed to turn the light off";
177− } else {
178− m_state = Lights::Off;
179− Q_EMIT stateChanged(m_state);
180 }
165 }
181}
166}
plugins/Unity/Indicators/CMakeLists.txt+3−1
@@ -16,14 +16,16 @@ include_directories(
16)
16)
17
17
18set(IndicatorsQML_SOURCES
18set(IndicatorsQML_SOURCES
19+ actionrootstate.cpp
19 indicator.cpp
20 indicator.cpp
20 indicators.h
21 indicators.h
21 indicatorsmanager.cpp
22 indicatorsmanager.cpp
22 indicatorsmodel.cpp
23 indicatorsmodel.cpp
23 menucontentactivator.cpp
24 menucontentactivator.cpp
25+ modelactionrootstate.cpp
24 modelprinter.cpp
26 modelprinter.cpp
25 plugin.cpp
27 plugin.cpp
26− rootactionstate.cpp
28+ rootstateparser.cpp
27 sharedunitymenumodel.cpp
29 sharedunitymenumodel.cpp
28 unitymenumodelcache.cpp
30 unitymenumodelcache.cpp
29 unitymenumodelstack.cpp
31 unitymenumodelstack.cpp
plugins/Unity/Indicators/Indicators.qmltypes+18−7
@@ -7,6 +7,14 @@ import QtQuick.tooling 1.1
7// 'qmlplugindump -notrelocatable Unity.Indicators 0.1 plugins'
7// 'qmlplugindump -notrelocatable Unity.Indicators 0.1 plugins'
8
8
9Module {
9Module {
10+ Component {
11+ name: "ActionRootState"
12+ prototype: "RootStateObject"
13+ exports: ["Unity.Indicators/ActionRootState 0.1"]
14+ exportMetaObjectRevisions: [0]
15+ Property { name: "actionGroup"; type: "QDBusActionGroup"; isPointer: true }
16+ Property { name: "actionName"; type: "string" }
17+ }
10 Component {
18 Component {
11 name: "ActionState"
19 name: "ActionState"
12 prototype: "QObject"
20 prototype: "QObject"
@@ -23,7 +31,6 @@ Module {
23 }
31 }
24 }
32 }
25 }
33 }
26− Component { name: "ActionStateParser"; prototype: "QObject" }
27 Component {
34 Component {
28 name: "FlatMenuProxyModelRole"
35 name: "FlatMenuProxyModelRole"
29 prototype: "QObject"
36 prototype: "QObject"
@@ -146,6 +153,14 @@ Module {
146 exportMetaObjectRevisions: [0]
153 exportMetaObjectRevisions: [0]
147 Property { name: "active"; type: "bool"; isReadonly: true }
154 Property { name: "active"; type: "bool"; isReadonly: true }
148 }
155 }
156+ Component {
157+ name: "ModelActionRootState"
158+ prototype: "RootStateObject"
159+ exports: ["Unity.Indicators/ModelActionRootState 0.1"]
160+ exportMetaObjectRevisions: [0]
161+ Property { name: "menu"; type: "UnityMenuModel"; isPointer: true }
162+ Signal { name: "indexChanged" }
163+ }
149 Component {
164 Component {
150 name: "ModelPrinter"
165 name: "ModelPrinter"
151 prototype: "QObject"
166 prototype: "QObject"
@@ -192,11 +207,8 @@ Module {
192 }
207 }
193 Component { name: "QIdentityProxyModel"; prototype: "QAbstractProxyModel" }
208 Component { name: "QIdentityProxyModel"; prototype: "QAbstractProxyModel" }
194 Component {
209 Component {
195− name: "RootActionState"
210+ name: "RootStateObject"
196− prototype: "ActionStateParser"
211+ prototype: "QObject"
197− exports: ["Unity.Indicators/RootActionState 0.1"]
198− exportMetaObjectRevisions: [0]
199− Property { name: "menu"; type: "UnityMenuModel"; isPointer: true }
200 Property { name: "valid"; type: "bool"; isReadonly: true }
212 Property { name: "valid"; type: "bool"; isReadonly: true }
201 Property { name: "title"; type: "string"; isReadonly: true }
213 Property { name: "title"; type: "string"; isReadonly: true }
202 Property { name: "leftLabel"; type: "string"; isReadonly: true }
214 Property { name: "leftLabel"; type: "string"; isReadonly: true }
@@ -205,7 +217,6 @@ Module {
205 Property { name: "accessibleName"; type: "string"; isReadonly: true }
217 Property { name: "accessibleName"; type: "string"; isReadonly: true }
206 Property { name: "visible"; type: "bool"; isReadonly: true }
218 Property { name: "visible"; type: "bool"; isReadonly: true }
207 Signal { name: "updated" }
219 Signal { name: "updated" }
208− Signal { name: "indexChanged" }
209 }
220 }
210 Component {
221 Component {
211 name: "SharedUnityMenuModel"
222 name: "SharedUnityMenuModel"
plugins/Unity/Indicators/actionrootstate.cppnew file+97
@@ -0,0 +1,97 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#include "actionrootstate.h"
18+
19+#include <qdbusactiongroup.h>
20+#include <QDebug>
21+
22+ActionRootState::ActionRootState(QObject *parent)
23+ : RootStateObject(parent)
24+ , m_actionGroup(nullptr)
25+{
26+}
27+
28+QDBusActionGroup *ActionRootState::actionGroup() const
29+{
30+ return m_actionGroup;
31+}
32+
33+void ActionRootState::setActionGroup(QDBusActionGroup *actionGroup)
34+{
35+ if (m_actionGroup != actionGroup) {
36+ bool wasValid = valid();
37+
38+ if (m_actionGroup) {
39+ disconnect(m_actionGroup, 0, this, 0);
40+ }
41+ m_actionGroup = actionGroup;
42+
43+ if (m_actionGroup) {
44+ connect(m_actionGroup, &QDBusActionGroup::statusChanged, this, [&](bool) { updateActionState(); });
45+ connect(m_actionGroup, &QDBusActionGroup::actionAppear, this, [&](const QString&) { updateActionState(); });
46+ connect(m_actionGroup, &QDBusActionGroup::actionVanish, this, [&](const QString&) { updateActionState(); });
47+ connect(m_actionGroup, &QDBusActionGroup::actionStateChanged, this, [&](QVariant) { updateActionState(); });
48+
49+ connect(m_actionGroup, &QObject::destroyed, this, [&](QObject*) { updateActionState(); });
50+ }
51+ updateActionState();
52+ Q_EMIT actionGroupChanged();
53+
54+ if (wasValid != valid()) Q_EMIT validChanged();
55+ }
56+}
57+
58+QString ActionRootState::actionName() const
59+{
60+ return m_actionName;
61+}
62+
63+void ActionRootState::setActionName(const QString &actionName)
64+{
65+ if (m_actionName != actionName) {
66+ bool wasValid = valid();
67+
68+ m_actionName = actionName;
69+ updateActionState();
70+
71+ Q_EMIT actionNameChanged();
72+
73+ if (wasValid != valid()) Q_EMIT validChanged();
74+ }
75+}
76+
77+bool ActionRootState::valid() const
78+{
79+ return m_actionGroup && m_actionGroup->status() == DBusEnums::Connected &&
80+ !m_actionName.isEmpty() && m_actionGroup->hasAction(m_actionName);
81+}
82+
83+void ActionRootState::updateActionState()
84+{
85+ if (valid()) {
86+ ActionStateParser* oldParser = m_actionGroup->actionStateParser();
87+ m_actionGroup->setActionStateParser(&m_parser);
88+
89+ QVariantMap state = m_actionGroup->actionState(m_actionName).toMap();
90+
91+ m_actionGroup->setActionStateParser(oldParser);
92+
93+ setCurrentState(state);
94+ } else {
95+ setCurrentState(QVariantMap());
96+ }
97+}
plugins/Unity/Indicators/actionrootstate.hnew file+55
@@ -0,0 +1,55 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef ACTIONROOTSTATE_H
18+#define ACTIONROOTSTATE_H
19+
20+#include "unityindicatorsglobal.h"
21+
22+#include "rootstateparser.h"
23+
24+class QDBusActionGroup;
25+
26+class UNITYINDICATORS_EXPORT ActionRootState : public RootStateObject
27+{
28+ Q_OBJECT
29+ Q_PROPERTY(QDBusActionGroup* actionGroup READ actionGroup WRITE setActionGroup NOTIFY actionGroupChanged)
30+ Q_PROPERTY(QString actionName READ actionName WRITE setActionName NOTIFY actionNameChanged)
31+
32+public:
33+ ActionRootState(QObject *parent = 0);
34+
35+ QDBusActionGroup *actionGroup() const;
36+ void setActionGroup(QDBusActionGroup *actionGroup);
37+
38+ QString actionName() const;
39+ void setActionName(const QString& actionName);
40+
41+ bool valid() const override;
42+
43+Q_SIGNALS:
44+ void actionGroupChanged();
45+ void actionNameChanged();
46+
47+private Q_SLOTS:
48+ void updateActionState();
49+
50+private:
51+ QDBusActionGroup* m_actionGroup;
52+ QString m_actionName;
53+};
54+
55+#endif // ACTIONROOTSTATE_H
plugins/Unity/Indicators/modelactionrootstate.cppnew file+127
@@ -0,0 +1,127 @@
1+/*
2+ * Copyright 2013 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ *
16+ * Authors:
17+ * Nick Dedekind <nick.dedekind@canonical.com>
18+ */
19+
20+#include "modelactionrootstate.h"
21+#include "indicators.h"
22+
23+#include <unitymenumodel.h>
24+#include <QVariant>
25+#include <QIcon>
26+
27+extern "C" {
28+#include <glib.h>
29+#include <gio/gio.h>
30+}
31+
32+ModelActionRootState::ModelActionRootState(QObject *parent)
33+ : RootStateObject(parent),
34+ m_menu(nullptr)
35+{
36+}
37+
38+ModelActionRootState::~ModelActionRootState()
39+{
40+}
41+
42+UnityMenuModel* ModelActionRootState::menu() const
43+{
44+ return m_menu;
45+}
46+
47+void ModelActionRootState::setMenu(UnityMenuModel* menu)
48+{
49+ if (m_menu != menu) {
50+ bool wasValid = valid();
51+
52+ if (m_menu) {
53+ m_menu->disconnect(this);
54+ }
55+ m_menu = menu;
56+
57+ if (m_menu) {
58+ connect(m_menu, SIGNAL(rowsInserted(const QModelIndex&, int, int)), SLOT(onModelRowsAdded(const QModelIndex&, int, int)));
59+ connect(m_menu, SIGNAL(rowsRemoved(const QModelIndex&, int, int)), SLOT(onModelRowsRemoved(const QModelIndex&, int, int)));
60+ connect(m_menu, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)), SLOT(onModelDataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)));
61+
62+ connect(m_menu, SIGNAL(destroyed()), SLOT(reset()));
63+ }
64+ updateActionState();
65+ Q_EMIT menuChanged();
66+
67+ if (wasValid != valid())
68+ Q_EMIT validChanged();
69+ }
70+}
71+
72+bool ModelActionRootState::valid() const
73+{
74+ return m_menu && m_menu->rowCount() > 0;
75+}
76+
77+void ModelActionRootState::onModelRowsAdded(const QModelIndex& parent, int start, int end)
78+{
79+ Q_UNUSED(parent);
80+ if (start == 0 && end >= 0) {
81+ updateActionState();
82+ }
83+}
84+
85+void ModelActionRootState::onModelRowsRemoved(const QModelIndex& parent, int start, int end)
86+{
87+ Q_UNUSED(parent);
88+ if (start == 0 && end >= 0) {
89+ updateActionState();
90+ }
91+}
92+
93+void ModelActionRootState::onModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles)
94+{
95+ Q_UNUSED(roles);
96+ if (!topLeft.isValid() || !bottomRight.isValid()) {
97+ return;
98+ }
99+
100+ if (topLeft.row() <= 0 && bottomRight.row() >= 0) {
101+ updateActionState();
102+ }
103+}
104+
105+void ModelActionRootState::reset()
106+{
107+ m_menu = nullptr;
108+
109+ Q_EMIT menuChanged();
110+ setCurrentState(QVariantMap());
111+}
112+
113+void ModelActionRootState::updateActionState()
114+{
115+ if (m_menu && m_menu->rowCount() > 0) {
116+ ActionStateParser* oldParser = m_menu->actionStateParser();
117+ m_menu->setActionStateParser(&m_parser);
118+
119+ QVariantMap state = m_menu->get(0, "actionState").toMap();
120+
121+ m_menu->setActionStateParser(oldParser);
122+
123+ setCurrentState(state);
124+ } else {
125+ setCurrentState(QVariantMap());
126+ }
127+}
plugins/Unity/Indicators/modelactionrootstate.hnew file+61
@@ -0,0 +1,61 @@
1+/*
2+ * Copyright 2013 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ *
16+ * Authors:
17+ * Nick Dedekind <nick.dedekind@canonical.com>
18+ */
19+
20+#ifndef MODELACTIONROOTSTATE_H
21+#define MODELACTIONROOTSTATE_H
22+
23+#include "unityindicatorsglobal.h"
24+
25+#include "rootstateparser.h"
26+
27+class UnityMenuModel;
28+
29+class UNITYINDICATORS_EXPORT ModelActionRootState : public RootStateObject
30+{
31+ Q_OBJECT
32+ Q_PROPERTY(UnityMenuModel* menu READ menu WRITE setMenu NOTIFY menuChanged)
33+public:
34+ ModelActionRootState(QObject *parent = 0);
35+ virtual ~ModelActionRootState();
36+
37+ UnityMenuModel* menu() const;
38+ void setMenu(UnityMenuModel* menu);
39+
40+ int index() const;
41+ void setIndex(int index);
42+
43+ bool valid() const override;
44+
45+Q_SIGNALS:
46+ void menuChanged();
47+ void indexChanged();
48+
49+private Q_SLOTS:
50+ void onModelRowsAdded(const QModelIndex& parent, int start, int end);
51+ void onModelRowsRemoved(const QModelIndex& parent, int start, int end);
52+ void onModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>&);
53+ void reset();
54+
55+private:
56+ void updateActionState();
57+
58+ UnityMenuModel* m_menu;
59+};
60+
61+#endif // MODELACTIONROOTSTATE_H
plugins/Unity/Indicators/plugin.cpp+4−2
@@ -24,12 +24,13 @@
24#include "plugin.h"
24#include "plugin.h"
25
25
26// local
26// local
27+#include "actionrootstate.h"
27#include "indicators.h"
28#include "indicators.h"
28#include "indicatorsmanager.h"
29#include "indicatorsmanager.h"
29#include "indicatorsmodel.h"
30#include "indicatorsmodel.h"
30#include "menucontentactivator.h"
31#include "menucontentactivator.h"
32+#include "modelactionrootstate.h"
31#include "modelprinter.h"
33#include "modelprinter.h"
32−#include "rootactionstate.h"
33#include "sharedunitymenumodel.h"
34#include "sharedunitymenumodel.h"
34#include "unitymenumodelcache.h"
35#include "unitymenumodelcache.h"
35#include "unitymenumodelstack.h"
36#include "unitymenumodelstack.h"
@@ -51,7 +52,8 @@ void IndicatorsPlugin::registerTypes(const char *uri)
51 qmlRegisterType<IndicatorsModel>(uri, 0, 1, "IndicatorsModel");
52 qmlRegisterType<IndicatorsModel>(uri, 0, 1, "IndicatorsModel");
52 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");
53 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");
53 qmlRegisterType<UnityMenuModelStack>(uri, 0, 1, "UnityMenuModelStack");
54 qmlRegisterType<UnityMenuModelStack>(uri, 0, 1, "UnityMenuModelStack");
54− qmlRegisterType<RootActionState>(uri, 0, 1, "RootActionState");
55+ qmlRegisterType<ModelActionRootState>(uri, 0, 1, "ModelActionRootState");
56+ qmlRegisterType<ActionRootState>(uri, 0, 1, "ActionRootState");
55 qmlRegisterType<ModelPrinter>(uri, 0, 1, "ModelPrinter");
57 qmlRegisterType<ModelPrinter>(uri, 0, 1, "ModelPrinter");
56 qmlRegisterType<VisibleIndicatorsModel>(uri, 0, 1, "VisibleIndicatorsModel");
58 qmlRegisterType<VisibleIndicatorsModel>(uri, 0, 1, "VisibleIndicatorsModel");
57 qmlRegisterType<SharedUnityMenuModel>(uri, 0, 1, "SharedUnityMenuModel");
59 qmlRegisterType<SharedUnityMenuModel>(uri, 0, 1, "SharedUnityMenuModel");
plugins/Unity/Indicators/rootactionstate.cpp → plugins/Unity/Indicators/rootstateparser.cpprenamed+74−141
@@ -12,155 +12,18 @@
12 *
12 *
13 * You should have received a copy of the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authors:
17− * Nick Dedekind <nick.dedekind@canonical.com>
18 */
15 */
19
16
20−#include "rootactionstate.h"
17+#include "rootstateparser.h"
21−#include "indicators.h"
22−
23−#include <unitymenumodel.h>
24−#include <QVariant>
25−#include <QIcon>
26
18
27extern "C" {
19extern "C" {
28#include <glib.h>
20#include <glib.h>
29#include <gio/gio.h>
21#include <gio/gio.h>
30}
22}
31
23
32−RootActionState::RootActionState(QObject *parent)
24+RootStateParser::RootStateParser(QObject* parent)
33− : ActionStateParser(parent),
25+ : ActionStateParser(parent)
34− m_menu(nullptr)
35−{
36−}
37−
38−RootActionState::~RootActionState()
39−{
40−}
41−
42−UnityMenuModel* RootActionState::menu() const
43−{
44− return m_menu;
45−}
46−
47−void RootActionState::setMenu(UnityMenuModel* menu)
48−{
49− if (m_menu != menu) {
50− if (m_menu) {
51− m_menu->disconnect(this);
52− }
53− m_menu = menu;
54−
55− if (m_menu) {
56− connect(m_menu, SIGNAL(rowsInserted(const QModelIndex&, int, int)), SLOT(onModelRowsAdded(const QModelIndex&, int, int)));
57− connect(m_menu, SIGNAL(rowsRemoved(const QModelIndex&, int, int)), SLOT(onModelRowsRemoved(const QModelIndex&, int, int)));
58− connect(m_menu, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)), SLOT(onModelDataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)));
59−
60− connect(m_menu, SIGNAL(destroyed()), SLOT(reset()));
61− }
62− updateActionState();
63− Q_EMIT menuChanged();
64− }
65−}
66−
67−void RootActionState::onModelRowsAdded(const QModelIndex& parent, int start, int end)
68{
26{
69− Q_UNUSED(parent);
70− if (start == 0 && end >= 0) {
71− updateActionState();
72− }
73−}
74−
75−void RootActionState::onModelRowsRemoved(const QModelIndex& parent, int start, int end)
76−{
77− Q_UNUSED(parent);
78− if (start == 0 && end >= 0) {
79− updateActionState();
80− }
81−}
82−
83−void RootActionState::onModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles)
84−{
85− Q_UNUSED(roles);
86− if (!topLeft.isValid() || !bottomRight.isValid()) {
87− return;
88− }
89−
90− if (topLeft.row() <= 0 && bottomRight.row() >= 0) {
91− updateActionState();
92− }
93−}
94−
95−void RootActionState::reset()
96−{
97− m_cachedState.clear();
98− m_menu = nullptr;
99−
100− Q_EMIT menuChanged();
101− Q_EMIT updated();
102−}
103−
104−void RootActionState::updateActionState()
105−{
106− if (m_menu && m_menu->rowCount() > 0) {
107− ActionStateParser* oldParser = m_menu->actionStateParser();
108− m_menu->setActionStateParser(this);
109−
110− m_cachedState = m_menu->get(0, "actionState").toMap();
111−
112− m_menu->setActionStateParser(oldParser);
113− } else {
114− m_cachedState.clear();
115− }
116− Q_EMIT updated();
117−}
118−
119−bool RootActionState::isValid() const
120−{
121− return m_menu && m_menu->rowCount() > 0;
122−}
123−
124−QString RootActionState::title() const
125−{
126− if (!isValid()) return QString();
127−
128− return m_cachedState.value("title", QVariant::fromValue(QString())).toString();
129−}
130−
131−QString RootActionState::leftLabel() const
132−{
133− if (!isValid()) return QString();
134−
135− return m_cachedState.value("pre-label", QVariant::fromValue(QString())).toString();
136−}
137−
138−QString RootActionState::rightLabel() const
139−{
140− if (!isValid()) return QString();
141−
142− return m_cachedState.value("label", QVariant::fromValue(QString())).toString();
143−}
144−
145−QStringList RootActionState::icons() const
146−{
147− if (!isValid()) return QStringList();
148−
149− return m_cachedState.value("icons", QVariant::fromValue(QStringList())).toStringList();
150−}
151−
152−QString RootActionState::accessibleName() const
153−{
154− if (!isValid()) return QString();
155−
156− return m_cachedState.value("accessible-desc", QVariant::fromValue(QString())).toString();
157−}
158−
159−bool RootActionState::indicatorVisible() const
160−{
161− if (!isValid()) return false;
162−
163− return m_cachedState.value("visible", QVariant::fromValue(true)).toBool();
164}
27}
165
28
166static QString iconUri(GIcon *icon)
29static QString iconUri(GIcon *icon)
@@ -209,7 +72,7 @@ static QString iconUri(GIcon *icon)
209 return uri;
72 return uri;
210}
73}
211
74
212−QVariant RootActionState::toQVariant(GVariant* state) const
75+QVariant RootStateParser::toQVariant(GVariant* state) const
213{
76{
214 if (!state) {
77 if (!state) {
215 return QVariant();
78 return QVariant();
@@ -296,3 +159,73 @@ QVariant RootActionState::toQVariant(GVariant* state) const
296 }
159 }
297 return ActionStateParser::toQVariant(state);
160 return ActionStateParser::toQVariant(state);
298}
161}
162+
163+
164+RootStateObject::RootStateObject(QObject* parent)
165+ : QObject(parent)
166+{
167+}
168+
169+QString RootStateObject::title() const
170+{
171+ if (!valid()) return QString();
172+
173+ return m_currentState.value("title", QVariant::fromValue(QString())).toString();
174+}
175+
176+QString RootStateObject::leftLabel() const
177+{
178+ if (!valid()) return QString();
179+
180+ return m_currentState.value("pre-label", QVariant::fromValue(QString())).toString();
181+}
182+
183+QString RootStateObject::rightLabel() const
184+{
185+ if (!valid()) return QString();
186+
187+ return m_currentState.value("label", QVariant::fromValue(QString())).toString();
188+}
189+
190+QStringList RootStateObject::icons() const
191+{
192+ if (!valid()) return QStringList();
193+
194+ return m_currentState.value("icons", QVariant::fromValue(QStringList())).toStringList();
195+}
196+
197+QString RootStateObject::accessibleName() const
198+{
199+ if (!valid()) return QString();
200+
201+ return m_currentState.value("accessible-desc", QVariant::fromValue(QString())).toString();
202+}
203+
204+bool RootStateObject::indicatorVisible() const
205+{
206+ if (!valid()) return false;
207+
208+ return m_currentState.value("visible", QVariant::fromValue(true)).toBool();
209+}
210+
211+void RootStateObject::setCurrentState(const QVariantMap& newState)
212+{
213+ QString oldTitle = title();
214+ QString oldLeftLabel = leftLabel();
215+ QString oldRightLabel = rightLabel();
216+ QStringList oldIcons = icons();
217+ QString oldAccessibleName = accessibleName();
218+ bool oldIndicatorVisible = indicatorVisible();
219+
220+ if (m_currentState != newState) {
221+ m_currentState = newState;
222+ Q_EMIT updated();
223+
224+ if (oldTitle != title()) Q_EMIT titleChanged();
225+ if (oldLeftLabel != leftLabel()) Q_EMIT leftLabelChanged();
226+ if (oldRightLabel != rightLabel()) Q_EMIT rightLabelChanged();
227+ if (oldIcons != icons()) Q_EMIT iconsChanged();
228+ if (oldAccessibleName != accessibleName()) Q_EMIT accessibleNameChanged();
229+ if (oldIndicatorVisible != indicatorVisible()) Q_EMIT indicatorVisibleChanged();
230+ }
231+}
plugins/Unity/Indicators/rootactionstate.h → plugins/Unity/Indicators/rootstateparser.hrenamed+18−34
@@ -12,26 +12,27 @@
12 *
12 *
13 * You should have received a copy of the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authors:
17− * Nick Dedekind <nick.dedekind@canonical.com>
18 */
15 */
19
16
20−#ifndef ROOTACTIONSTATE_H
17+#ifndef ROOTSTATEPARSER_H
21−#define ROOTACTIONSTATE_H
18+#define ROOTSTATEPARSER_H
22
19
23#include "unityindicatorsglobal.h"
20#include "unityindicatorsglobal.h"
24
21
25#include <actionstateparser.h>
22#include <actionstateparser.h>
26
23
27−class UnityMenuModel;
24+class UNITYINDICATORS_EXPORT RootStateParser : public ActionStateParser
25+{
26+public:
27+ RootStateParser(QObject* parent = nullptr);
28+ virtual QVariant toQVariant(GVariant* state) const override;
29+};
28
30
29−class UNITYINDICATORS_EXPORT RootActionState : public ActionStateParser
31+class UNITYINDICATORS_EXPORT RootStateObject : public QObject
30{
32{
31 Q_OBJECT
33 Q_OBJECT
32− Q_PROPERTY(UnityMenuModel* menu READ menu WRITE setMenu NOTIFY menuChanged)
33
34
34− Q_PROPERTY(bool valid READ isValid NOTIFY validChanged)
35+ Q_PROPERTY(bool valid READ valid NOTIFY validChanged)
35 Q_PROPERTY(QString title READ title NOTIFY titleChanged)
36 Q_PROPERTY(QString title READ title NOTIFY titleChanged)
36 Q_PROPERTY(QString leftLabel READ leftLabel NOTIFY leftLabelChanged)
37 Q_PROPERTY(QString leftLabel READ leftLabel NOTIFY leftLabelChanged)
37 Q_PROPERTY(QString rightLabel READ rightLabel NOTIFY rightLabelChanged)
38 Q_PROPERTY(QString rightLabel READ rightLabel NOTIFY rightLabelChanged)
@@ -39,16 +40,10 @@ class UNITYINDICATORS_EXPORT RootActionState : public ActionStateParser
39 Q_PROPERTY(QString accessibleName READ accessibleName NOTIFY accessibleNameChanged)
40 Q_PROPERTY(QString accessibleName READ accessibleName NOTIFY accessibleNameChanged)
40 Q_PROPERTY(bool indicatorVisible READ indicatorVisible NOTIFY indicatorVisibleChanged)
41 Q_PROPERTY(bool indicatorVisible READ indicatorVisible NOTIFY indicatorVisibleChanged)
41public:
42public:
42− RootActionState(QObject *parent = 0);
43+ RootStateObject(QObject* parent = 0);
43− virtual ~RootActionState();
44
44
45− UnityMenuModel* menu() const;
45+ virtual bool valid() const = 0;
46− void setMenu(UnityMenuModel* menu);
47
46
48− int index() const;
49− void setIndex(int index);
50−
51− bool isValid() const;
52 QString title() const;
47 QString title() const;
53 QString leftLabel() const;
48 QString leftLabel() const;
54 QString rightLabel() const;
49 QString rightLabel() const;
@@ -56,15 +51,12 @@ public:
56 QString accessibleName() const;
51 QString accessibleName() const;
57 bool indicatorVisible() const;
52 bool indicatorVisible() const;
58
53
59− // from ActionStateParser
54+ QVariantMap currentState() const { return m_currentState; }
60− virtual QVariant toQVariant(GVariant* state) const override;
55+ void setCurrentState(const QVariantMap& currentState);
61
56
62Q_SIGNALS:
57Q_SIGNALS:
63 void updated();
58 void updated();
64
59
65− void menuChanged();
66− void indexChanged();
67−
68 void validChanged();
60 void validChanged();
69 void titleChanged();
61 void titleChanged();
70 void leftLabelChanged();
62 void leftLabelChanged();
@@ -73,17 +65,9 @@ Q_SIGNALS:
73 void accessibleNameChanged();
65 void accessibleNameChanged();
74 void indicatorVisibleChanged();
66 void indicatorVisibleChanged();
75
67
76−private Q_SLOTS:
68+protected:
77− void onModelRowsAdded(const QModelIndex& parent, int start, int end);
69+ RootStateParser m_parser;
78− void onModelRowsRemoved(const QModelIndex& parent, int start, int end);
79− void onModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>&);
80− void reset();
81−
82−private:
83− void updateActionState();
84−
85− UnityMenuModel* m_menu;
86− QVariantMap m_cachedState;
70+ QVariantMap m_currentState;
87};
71};
88
72
89−#endif // ROOTACTIONSTATE_H
73+#endif // ROOTSTATEPARSER_H
plugins/Utils/CMakeLists.txt+1−1
@@ -12,7 +12,7 @@ include_directories(
12
12
13set(QMLPLUGIN_SRC
13set(QMLPLUGIN_SRC
14 qlimitproxymodelqml.cpp
14 qlimitproxymodelqml.cpp
15− qsortfilterproxymodelqml.cpp
15+ unitysortfilterproxymodelqml.cpp
16 relativetimeformatter.cpp
16 relativetimeformatter.cpp
17 timeformatter.cpp
17 timeformatter.cpp
18 unitymenumodelpaths.cpp
18 unitymenumodelpaths.cpp
plugins/Utils/plugin.cpp+2−2
@@ -27,7 +27,7 @@
27
27
28// local
28// local
29#include "qlimitproxymodelqml.h"
29#include "qlimitproxymodelqml.h"
30−#include "qsortfilterproxymodelqml.h"
30+#include "unitysortfilterproxymodelqml.h"
31#include "relativetimeformatter.h"
31#include "relativetimeformatter.h"
32#include "timeformatter.h"
32#include "timeformatter.h"
33#include "unitymenumodelpaths.h"
33#include "unitymenumodelpaths.h"
@@ -39,7 +39,7 @@ void UtilsPlugin::registerTypes(const char *uri)
39 Q_ASSERT(uri == QLatin1String("Utils"));
39 Q_ASSERT(uri == QLatin1String("Utils"));
40 qmlRegisterType<QAbstractItemModel>();
40 qmlRegisterType<QAbstractItemModel>();
41 qmlRegisterType<QLimitProxyModelQML>(uri, 0, 1, "LimitProxyModel");
41 qmlRegisterType<QLimitProxyModelQML>(uri, 0, 1, "LimitProxyModel");
42− qmlRegisterType<QSortFilterProxyModelQML>(uri, 0, 1, "SortFilterProxyModel");
42+ qmlRegisterType<UnitySortFilterProxyModelQML>(uri, 0, 1, "UnitySortFilterProxyModel");
43 qmlRegisterType<UnityMenuModelPaths>(uri, 0, 1, "UnityMenuModelPaths");
43 qmlRegisterType<UnityMenuModelPaths>(uri, 0, 1, "UnityMenuModelPaths");
44 qmlRegisterType<TimeFormatter>(uri, 0, 1, "TimeFormatter");
44 qmlRegisterType<TimeFormatter>(uri, 0, 1, "TimeFormatter");
45 qmlRegisterType<WindowKeysFilter>(uri, 0, 1, "WindowKeysFilter");
45 qmlRegisterType<WindowKeysFilter>(uri, 0, 1, "WindowKeysFilter");
plugins/Utils/qsortfilterproxymodelqml.cpp → plugins/Utils/unitysortfilterproxymodelqml.cpprenamed+15−15
@@ -15,12 +15,12 @@
15 */
15 */
16
16
17// self
17// self
18−#include "qsortfilterproxymodelqml.h"
18+#include "unitysortfilterproxymodelqml.h"
19
19
20// Qt
20// Qt
21#include <QDebug>
21#include <QDebug>
22
22
23−QSortFilterProxyModelQML::QSortFilterProxyModelQML(QObject *parent)
23+UnitySortFilterProxyModelQML::UnitySortFilterProxyModelQML(QObject *parent)
24 : QSortFilterProxyModel(parent)
24 : QSortFilterProxyModel(parent)
25 , m_invertMatch(false)
25 , m_invertMatch(false)
26{
26{
@@ -32,7 +32,7 @@ QSortFilterProxyModelQML::QSortFilterProxyModelQML(QObject *parent)
32/*
32/*
33 * Enter row index of filtered/sorted model, returns row index of source model
33 * Enter row index of filtered/sorted model, returns row index of source model
34 */
34 */
35−int QSortFilterProxyModelQML::mapRowToSource(int row)
35+int UnitySortFilterProxyModelQML::mapRowToSource(int row)
36{
36{
37 if (sourceModel() == nullptr)
37 if (sourceModel() == nullptr)
38 return -1;
38 return -1;
@@ -40,13 +40,13 @@ int QSortFilterProxyModelQML::mapRowToSource(int row)
40 return QSortFilterProxyModel::mapToSource(index(row, 0)).row();
40 return QSortFilterProxyModel::mapToSource(index(row, 0)).row();
41}
41}
42
42
43−QHash<int, QByteArray> QSortFilterProxyModelQML::roleNames() const
43+QHash<int, QByteArray> UnitySortFilterProxyModelQML::roleNames() const
44{
44{
45 return sourceModel() ? sourceModel()->roleNames() : QHash<int, QByteArray>();
45 return sourceModel() ? sourceModel()->roleNames() : QHash<int, QByteArray>();
46}
46}
47
47
48void
48void
49−QSortFilterProxyModelQML::setModel(QAbstractItemModel *itemModel)
49+UnitySortFilterProxyModelQML::setModel(QAbstractItemModel *itemModel)
50{
50{
51 if (itemModel == nullptr) {
51 if (itemModel == nullptr) {
52 return;
52 return;
@@ -69,7 +69,7 @@ QSortFilterProxyModelQML::setModel(QAbstractItemModel *itemModel)
69}
69}
70
70
71QVariantMap
71QVariantMap
72−QSortFilterProxyModelQML::get(int row)
72+UnitySortFilterProxyModelQML::get(int row)
73{
73{
74 QVariantMap res;
74 QVariantMap res;
75 const QHash<int, QByteArray> roles = roleNames();
75 const QHash<int, QByteArray> roles = roleNames();
@@ -81,7 +81,7 @@ QSortFilterProxyModelQML::get(int row)
81}
81}
82
82
83QVariant
83QVariant
84−QSortFilterProxyModelQML::data(int row, int role)
84+UnitySortFilterProxyModelQML::data(int row, int role)
85{
85{
86 if (sourceModel() == nullptr) {
86 if (sourceModel() == nullptr) {
87 return QVariant();
87 return QVariant();
@@ -91,7 +91,7 @@ QSortFilterProxyModelQML::data(int row, int role)
91}
91}
92
92
93int
93int
94−QSortFilterProxyModelQML::totalCount() const
94+UnitySortFilterProxyModelQML::totalCount() const
95{
95{
96 if (sourceModel() != nullptr) {
96 if (sourceModel() != nullptr) {
97 return sourceModel()->rowCount();
97 return sourceModel()->rowCount();
@@ -101,19 +101,19 @@ QSortFilterProxyModelQML::totalCount() const
101}
101}
102
102
103int
103int
104−QSortFilterProxyModelQML::count()
104+UnitySortFilterProxyModelQML::count()
105{
105{
106 return rowCount();
106 return rowCount();
107}
107}
108
108
109bool
109bool
110−QSortFilterProxyModelQML::invertMatch() const
110+UnitySortFilterProxyModelQML::invertMatch() const
111{
111{
112 return m_invertMatch;
112 return m_invertMatch;
113}
113}
114
114
115void
115void
116−QSortFilterProxyModelQML::setInvertMatch(bool invertMatch)
116+UnitySortFilterProxyModelQML::setInvertMatch(bool invertMatch)
117{
117{
118 if (invertMatch != m_invertMatch) {
118 if (invertMatch != m_invertMatch) {
119 m_invertMatch = invertMatch;
119 m_invertMatch = invertMatch;
@@ -123,7 +123,7 @@ QSortFilterProxyModelQML::setInvertMatch(bool invertMatch)
123}
123}
124
124
125bool
125bool
126−QSortFilterProxyModelQML::filterAcceptsRow(int sourceRow,
126+UnitySortFilterProxyModelQML::filterAcceptsRow(int sourceRow,
127 const QModelIndex &sourceParent) const
127 const QModelIndex &sourceParent) const
128{
128{
129 // If there's no regexp set, always accept all rows indepenently of the invertMatch setting
129 // If there's no regexp set, always accept all rows indepenently of the invertMatch setting
@@ -136,7 +136,7 @@ QSortFilterProxyModelQML::filterAcceptsRow(int sourceRow,
136}
136}
137
137
138int
138int
139−QSortFilterProxyModelQML::findFirst(int role, const QVariant& value) const
139+UnitySortFilterProxyModelQML::findFirst(int role, const QVariant& value) const
140{
140{
141 QModelIndexList matches = match(index(0, 0), role, value, 1, Qt::MatchExactly);
141 QModelIndexList matches = match(index(0, 0), role, value, 1, Qt::MatchExactly);
142 if (!matches.isEmpty()) {
142 if (!matches.isEmpty()) {
@@ -147,7 +147,7 @@ QSortFilterProxyModelQML::findFirst(int role, const QVariant& value) const
147}
147}
148
148
149int
149int
150−QSortFilterProxyModelQML::mapFromSource(int row)
150+UnitySortFilterProxyModelQML::mapFromSource(int row)
151{
151{
152 if (sourceModel() != nullptr) {
152 if (sourceModel() != nullptr) {
153 return QSortFilterProxyModel::mapFromSource(sourceModel()->index(row, 0)).row();
153 return QSortFilterProxyModel::mapFromSource(sourceModel()->index(row, 0)).row();
@@ -157,7 +157,7 @@ QSortFilterProxyModelQML::mapFromSource(int row)
157}
157}
158
158
159int
159int
160−QSortFilterProxyModelQML::mapToSource(int row)
160+UnitySortFilterProxyModelQML::mapToSource(int row)
161{
161{
162 if (sourceModel() != nullptr) {
162 if (sourceModel() != nullptr) {
163 return QSortFilterProxyModel::mapToSource(index(row, 0)).row();
163 return QSortFilterProxyModel::mapToSource(index(row, 0)).row();
plugins/Utils/qsortfilterproxymodelqml.h → plugins/Utils/unitysortfilterproxymodelqml.hrenamed+5−5
@@ -14,12 +14,12 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
15 */
16
16
17−#ifndef QSORTFILTERPROXYMODELQML_H
17+#ifndef UNITYSORTFILTERPROXYMODELQML_H
18−#define QSORTFILTERPROXYMODELQML_H
18+#define UNITYSORTFILTERPROXYMODELQML_H
19
19
20#include <QSortFilterProxyModel>
20#include <QSortFilterProxyModel>
21
21
22−class QSortFilterProxyModelQML : public QSortFilterProxyModel
22+class UnitySortFilterProxyModelQML : public QSortFilterProxyModel
23{
23{
24 Q_OBJECT
24 Q_OBJECT
25
25
@@ -29,7 +29,7 @@ class QSortFilterProxyModelQML : public QSortFilterProxyModel
29 Q_PROPERTY(bool invertMatch READ invertMatch WRITE setInvertMatch NOTIFY invertMatchChanged)
29 Q_PROPERTY(bool invertMatch READ invertMatch WRITE setInvertMatch NOTIFY invertMatchChanged)
30
30
31public:
31public:
32− explicit QSortFilterProxyModelQML(QObject *parent = 0);
32+ explicit UnitySortFilterProxyModelQML(QObject *parent = 0);
33
33
34 Q_INVOKABLE QVariantMap get(int row); // Use with caution, it can be slow to query all the roles
34 Q_INVOKABLE QVariantMap get(int row); // Use with caution, it can be slow to query all the roles
35 Q_INVOKABLE QVariant data(int row, int role);
35 Q_INVOKABLE QVariant data(int row, int role);
@@ -60,4 +60,4 @@ private:
60 bool m_invertMatch;
60 bool m_invertMatch;
61};
61};
62
62
63−#endif // QSORTFILTERPROXYMODELQML_H
63+#endif // UNITYSORTFILTERPROXYMODELQML_H
po/am.po+96−93
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-12-10 10:55+0100\n"
10"POT-Creation-Date: 2014-12-10 10:55+0100\n"
11−"PO-Revision-Date: 2014-11-06 00:53+0000\n"
11+"PO-Revision-Date: 2014-12-27 19:44+0000\n"
12"Last-Translator: samson <Unknown>\n"
12"Last-Translator: samson <Unknown>\n"
13"Language-Team: Amharic <am@li.org>\n"
13"Language-Team: Amharic <am@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n > 1;\n"
17"Plural-Forms: nplurals=2; plural=n > 1;\n"
18−"X-Launchpad-Export-Date: 2014-12-13 07:10+0000\n"
18+"X-Launchpad-Export-Date: 2014-12-28 06:07+0000\n"
19"X-Generator: Launchpad (build 17286)\n"
19"X-Generator: Launchpad (build 17286)\n"
20
20
21#: plugins/LightDM/Greeter.cpp:130
21#: plugins/LightDM/Greeter.cpp:130
@@ -23,11 +23,11 @@ msgid "Password: "
23msgstr "የ መግቢያ ቃል: "
23msgstr "የ መግቢያ ቃል: "
24
24
25#: plugins/Unity/Launcher/launcheritem.cpp:45
25#: plugins/Unity/Launcher/launcheritem.cpp:45
26−#: plugins/Unity/Launcher/launcheritem.cpp:100
26+#: plugins/Unity/Launcher/launcheritem.cpp:91
27msgid "Pin shortcut"
27msgid "Pin shortcut"
28msgstr "አቋራጭ ማጣበቂያ"
28msgstr "አቋራጭ ማጣበቂያ"
29
29
30−#: plugins/Unity/Launcher/launcheritem.cpp:100
30+#: plugins/Unity/Launcher/launcheritem.cpp:91
31msgid "Unpin shortcut"
31msgid "Unpin shortcut"
32msgstr "አቋራጭ መለያያ"
32msgstr "አቋራጭ መለያያ"
33
33
@@ -50,45 +50,45 @@ msgid_plural "Please wait %1 minutes and then try again…"
50msgstr[0] "እባክዎን ይቆዩ %1 ደቂቃ እና ከዛ እንደ ገና ይምክሩ…"
50msgstr[0] "እባክዎን ይቆዩ %1 ደቂቃ እና ከዛ እንደ ገና ይምክሩ…"
51msgstr[1] "እባክዎን ይቆዩ %1 ደቂቃዎች እና ከዛ እንደ ገና ይምክሩ…"
51msgstr[1] "እባክዎን ይቆዩ %1 ደቂቃዎች እና ከዛ እንደ ገና ይምክሩ…"
52
52
53−#: qml/Components/Dialogs.qml:70
53+#: qml/Components/Dialogs.qml:74
54msgid "Log out"
54msgid "Log out"
55msgstr "መውጫ"
55msgstr "መውጫ"
56
56
57−#: qml/Components/Dialogs.qml:71
57+#: qml/Components/Dialogs.qml:75
58msgid "Are you sure you want to log out?"
58msgid "Are you sure you want to log out?"
59msgstr "በእርግጥ መውጣት ይፈልጋሉ?"
59msgstr "በእርግጥ መውጣት ይፈልጋሉ?"
60
60
61−#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
61+#: qml/Components/Dialogs.qml:77 qml/Components/Dialogs.qml:101
62−#: qml/Components/Dialogs.qml:122
62+#: qml/Components/Dialogs.qml:126
63msgid "No"
63msgid "No"
64msgstr "አይ"
64msgstr "አይ"
65
65
66−#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
66+#: qml/Components/Dialogs.qml:84 qml/Components/Dialogs.qml:108
67−#: qml/Components/Dialogs.qml:129
67+#: qml/Components/Dialogs.qml:133
68msgid "Yes"
68msgid "Yes"
69msgstr "አዎ"
69msgstr "አዎ"
70
70
71−#: qml/Components/Dialogs.qml:94
71+#: qml/Components/Dialogs.qml:98
72msgid "Shut down"
72msgid "Shut down"
73msgstr "ማጥፊያ"
73msgstr "ማጥፊያ"
74
74
75−#: qml/Components/Dialogs.qml:95
75+#: qml/Components/Dialogs.qml:99
76msgid "Are you sure you want to shut down?"
76msgid "Are you sure you want to shut down?"
77msgstr "በእርግጥ ማጥፋት ይፈልጋሉ?"
77msgstr "በእርግጥ ማጥፋት ይፈልጋሉ?"
78
78
79−#: qml/Components/Dialogs.qml:119
79+#: qml/Components/Dialogs.qml:123
80msgid "Reboot"
80msgid "Reboot"
81msgstr "እንደገና ማስነሻ"
81msgstr "እንደገና ማስነሻ"
82
82
83−#: qml/Components/Dialogs.qml:120
83+#: qml/Components/Dialogs.qml:124
84msgid "Are you sure you want to reboot?"
84msgid "Are you sure you want to reboot?"
85msgstr "በእርግጥ እንደገና ማስነሳት ይፈልጋሉ?"
85msgstr "በእርግጥ እንደገና ማስነሳት ይፈልጋሉ?"
86
86
87−#: qml/Components/Dialogs.qml:144
87+#: qml/Components/Dialogs.qml:148
88msgid "Power"
88msgid "Power"
89msgstr "ሐይል"
89msgstr "ሐይል"
90
90
91−#: qml/Components/Dialogs.qml:145
91+#: qml/Components/Dialogs.qml:149
92msgid ""
92msgid ""
93"Are you sure you would like\n"
93"Are you sure you would like\n"
94"to power off?"
94"to power off?"
@@ -96,15 +96,15 @@ msgstr ""
96"በእርግጥ ሐይሉን ማጥፋት\n"
96"በእርግጥ ሐይሉን ማጥፋት\n"
97"ይፈልጋሉ?"
97"ይፈልጋሉ?"
98
98
99−#: qml/Components/Dialogs.qml:147
99+#: qml/Components/Dialogs.qml:151
100msgid "Power off"
100msgid "Power off"
101msgstr "ማጥፊያ"
101msgstr "ማጥፊያ"
102
102
103−#: qml/Components/Dialogs.qml:157
103+#: qml/Components/Dialogs.qml:161
104msgid "Restart"
104msgid "Restart"
105msgstr "እንደገና ማስጀመሪያ"
105msgstr "እንደገና ማስጀመሪያ"
106
106
107−#: qml/Components/Dialogs.qml:167
107+#: qml/Components/Dialogs.qml:171
108msgid "Cancel"
108msgid "Cancel"
109msgstr "መሰረዣ"
109msgstr "መሰረዣ"
110
110
@@ -112,87 +112,87 @@ msgstr "መሰረዣ"
112msgid "Skip intro"
112msgid "Skip intro"
113msgstr "መግቢያውን መዝለያ"
113msgstr "መግቢያውን መዝለያ"
114
114
115−#: qml/Components/EdgeDemo.qml:125
115+#: qml/Components/EdgeDemo.qml:112
116msgid "Right edge"
116msgid "Right edge"
117msgstr "የቀኝ ጠርዝ"
117msgstr "የቀኝ ጠርዝ"
118
118
119−#: qml/Components/EdgeDemo.qml:126
119+#: qml/Components/EdgeDemo.qml:113
120msgid "Try swiping from the right edge to unlock the phone"
120msgid "Try swiping from the right edge to unlock the phone"
121msgstr "ስልኩን ለመክፈት ከ ቀኝ ጠርዝ በኩል ወደ ግራ ይጥረጉ"
121msgstr "ስልኩን ለመክፈት ከ ቀኝ ጠርዝ በኩል ወደ ግራ ይጥረጉ"
122
122
123−#: qml/Components/EdgeDemo.qml:157
123+#: qml/Components/EdgeDemo.qml:144
124msgid "Top edge"
124msgid "Top edge"
125msgstr "የላይ ጠርዝ"
125msgstr "የላይ ጠርዝ"
126
126
127−#: qml/Components/EdgeDemo.qml:158
127+#: qml/Components/EdgeDemo.qml:145
128msgid "Try swiping from the top edge to access the indicators"
128msgid "Try swiping from the top edge to access the indicators"
129msgstr "ጠቋሚዎች ጋር ለመድረስ ከ ላይ ጠርዝ በኩል ወደ ታች ይጥረጉ"
129msgstr "ጠቋሚዎች ጋር ለመድረስ ከ ላይ ጠርዝ በኩል ወደ ታች ይጥረጉ"
130
130
131−#: qml/Components/EdgeDemo.qml:183
131+#: qml/Components/EdgeDemo.qml:170
132msgid "Close"
132msgid "Close"
133msgstr "መዝጊያ"
133msgstr "መዝጊያ"
134
134
135−#: qml/Components/EdgeDemo.qml:184
135+#: qml/Components/EdgeDemo.qml:171
136msgid "Swipe up again to close the settings screen"
136msgid "Swipe up again to close the settings screen"
137msgstr "የማሰናጃውን መመልከቻ ለመዝጋት እንደገና ወደ ላይ ይጥረጉ"
137msgstr "የማሰናጃውን መመልከቻ ለመዝጋት እንደገና ወደ ላይ ይጥረጉ"
138
138
139−#: qml/Components/EdgeDemo.qml:214
139+#: qml/Components/EdgeDemo.qml:201
140msgid "Left edge"
140msgid "Left edge"
141msgstr "የግራ ጠርዝ"
141msgstr "የግራ ጠርዝ"
142
142
143−#: qml/Components/EdgeDemo.qml:215
143+#: qml/Components/EdgeDemo.qml:202
144msgid "Swipe from the left to reveal the launcher for quick access to apps"
144msgid "Swipe from the left to reveal the launcher for quick access to apps"
145msgstr "ከ ግራ በኩል ወደ ቀኝ ይጥረጉ በፍጥነት መተግበሪያዎች ጋር ለመድረስ እና ለማስጀመር"
145msgstr "ከ ግራ በኩል ወደ ቀኝ ይጥረጉ በፍጥነት መተግበሪያዎች ጋር ለመድረስ እና ለማስጀመር"
146
146
147−#: qml/Components/EdgeDemo.qml:242
147+#: qml/Components/EdgeDemo.qml:229
148msgid "Well done"
148msgid "Well done"
149msgstr "ጥሩ አድረገዋል"
149msgstr "ጥሩ አድረገዋል"
150
150
151−#: qml/Components/EdgeDemo.qml:243
151+#: qml/Components/EdgeDemo.qml:230
152msgid ""
152msgid ""
153"You have now mastered the edge gestures and can start using the "
153"You have now mastered the edge gestures and can start using the "
154"phone<br><br>Tap on the screen to start"
154"phone<br><br>Tap on the screen to start"
155msgstr ""
155msgstr ""
156"አሁን የ ጠርዝ እንቅስቃሴን አውቀዋል እና መጀመር ይችላሉ ስልኩን መጠቀም <br><br>መመልከቻውን መታ ያድርጉ ለመጀመር"
156"አሁን የ ጠርዝ እንቅስቃሴን አውቀዋል እና መጀመር ይችላሉ ስልኩን መጠቀም <br><br>መመልከቻውን መታ ያድርጉ ለመጀመር"
157
157
158−#: qml/Components/Lockscreen.qml:238
158+#: qml/Components/Lockscreen.qml:223
159msgid "Return to Call"
159msgid "Return to Call"
160msgstr "ወደ ጥሪ መመለሻ"
160msgstr "ወደ ጥሪ መመለሻ"
161
161
162−#: qml/Components/Lockscreen.qml:238
162+#: qml/Components/Lockscreen.qml:223
163msgid "Emergency Call"
163msgid "Emergency Call"
164msgstr "የ ድንገተኛ ጥሪ"
164msgstr "የ ድንገተኛ ጥሪ"
165
165
166−#: qml/Components/Lockscreen.qml:270
166+#: qml/Components/Lockscreen.qml:255
167msgid "OK"
167msgid "OK"
168msgstr "እሺ"
168msgstr "እሺ"
169
169
170−#: qml/Dash/GenericScopeView.qml:431 qml/Dash/GenericScopeView.qml:588
170+#: qml/Dash/GenericScopeView.qml:434 qml/Dash/GenericScopeView.qml:591
171msgid "See less"
171msgid "See less"
172msgstr "አነስተኛ መመልከቻ"
172msgstr "አነስተኛ መመልከቻ"
173
173
174−#: qml/Dash/GenericScopeView.qml:431
174+#: qml/Dash/GenericScopeView.qml:434
175msgid "See all"
175msgid "See all"
176msgstr "ሁሉንም መመልከቻ"
176msgstr "ሁሉንም መመልከቻ"
177
177
178−#: qml/Dash/GenericScopeView.qml:493 qml/Dash/PageHeader.qml:267
178+#: qml/Dash/GenericScopeView.qml:496 qml/Dash/PageHeader.qml:268
179#: qml/Panel/SearchIndicator.qml:27
179#: qml/Panel/SearchIndicator.qml:27
180msgid "Search"
180msgid "Search"
181msgstr "መፈለጊያ"
181msgstr "መፈለጊያ"
182
182
183−#: qml/Dash/PageHeader.qml:260
183+#: qml/Dash/PageHeader.qml:261
184msgid "Store"
184msgid "Store"
185msgstr "ማስቀመጫ"
185msgstr "ማስቀመጫ"
186
186
187−#: qml/Dash/PageHeader.qml:277
187+#: qml/Dash/PageHeader.qml:278
188msgid "Settings"
188msgid "Settings"
189msgstr "ማሰናጃ"
189msgstr "ማሰናጃ"
190
190
191−#: qml/Dash/PageHeader.qml:284
191+#: qml/Dash/PageHeader.qml:285
192msgid "Remove from Favorites"
192msgid "Remove from Favorites"
193msgstr "ከምወዳቸው ማስወገጃ"
193msgstr "ከምወዳቸው ማስወገጃ"
194
194
195−#: qml/Dash/PageHeader.qml:284
195+#: qml/Dash/PageHeader.qml:285
196msgid "Add to Favorites"
196msgid "Add to Favorites"
197msgstr "ወደምወዳቸው መጨመሪያ"
197msgstr "ወደምወዳቸው መጨመሪያ"
198
198
@@ -226,15 +226,15 @@ msgstr "ይልቀቁ ለማነቃቃት…"
226
226
227#: qml/Dash/ScopesList.qml:63
227#: qml/Dash/ScopesList.qml:63
228msgid "Manage"
228msgid "Manage"
229−msgstr ""
229+msgstr "አስተዳዳሪ"
230
230
231#: qml/Dash/ScopesList.qml:107
231#: qml/Dash/ScopesList.qml:107
232msgid "Home"
232msgid "Home"
233−msgstr ""
233+msgstr "ቤት"
234
234
235#: qml/Dash/ScopesList.qml:108
235#: qml/Dash/ScopesList.qml:108
236msgid "Also installed"
236msgid "Also installed"
237−msgstr ""
237+msgstr "እንዲሁም የተገጠሙ"
238
238
239#: qml/Greeter/Greeter.qml:174
239#: qml/Greeter/Greeter.qml:174
240msgid "Unlock"
240msgid "Unlock"
@@ -288,49 +288,49 @@ msgstr "ሲም መክፈቻ"
288msgid "Roaming"
288msgid "Roaming"
289msgstr "ማዘዋወሪያ"
289msgstr "ማዘዋወሪያ"
290
290
291−#: qml/Shell.qml:367
291+#: qml/Shell.qml:402
292#, qt-format
292#, qt-format
293msgid "Enter %1"
293msgid "Enter %1"
294msgstr "ማስገቢያ %1"
294msgstr "ማስገቢያ %1"
295
295
296−#: qml/Shell.qml:368 qml/Wizard/Pages/passwd-set.qml:60
296+#: qml/Shell.qml:394
297msgid "Enter passphrase"
297msgid "Enter passphrase"
298msgstr "የ ማለፊያ ሀረግ ያስገቡ"
298msgstr "የ ማለፊያ ሀረግ ያስገቡ"
299
299
300−#: qml/Shell.qml:369
300+#: qml/Shell.qml:398
301msgid "Enter passcode"
301msgid "Enter passcode"
302msgstr "የ ማለፊያ ኮድ ያስገቡ"
302msgstr "የ ማለፊያ ኮድ ያስገቡ"
303
303
304−#: qml/Shell.qml:370
304+#: qml/Shell.qml:403
305#, qt-format
305#, qt-format
306msgid "Sorry, incorrect %1"
306msgid "Sorry, incorrect %1"
307msgstr "አዝናለሁ: የተሳሳተ%1"
307msgstr "አዝናለሁ: የተሳሳተ%1"
308
308
309−#: qml/Shell.qml:371
309+#: qml/Shell.qml:395
310msgid "Sorry, incorrect passphrase"
310msgid "Sorry, incorrect passphrase"
311msgstr "አዝናለሁ የተሳሳተ የማለፊያ ሐረግ"
311msgstr "አዝናለሁ የተሳሳተ የማለፊያ ሐረግ"
312
312
313−#: qml/Shell.qml:372
313+#: qml/Shell.qml:396
314msgid "Please re-enter"
314msgid "Please re-enter"
315msgstr "እባክዎን እንደገና-ያስገቡ"
315msgstr "እባክዎን እንደገና-ያስገቡ"
316
316
317−#: qml/Shell.qml:373
317+#: qml/Shell.qml:399
318msgid "Sorry, incorrect passcode"
318msgid "Sorry, incorrect passcode"
319msgstr "አዝናለሁ የተሳሳተ የማለፊያ ኮድ"
319msgstr "አዝናለሁ የተሳሳተ የማለፊያ ኮድ"
320
320
321−#: qml/Shell.qml:467 qml/Wizard/Pages/passwd-confirm.qml:53
321+#: qml/Shell.qml:444
322msgid "Sorry, incorrect passphrase."
322msgid "Sorry, incorrect passphrase."
323msgstr "አዝናለሁ የተሳሳተ የማለፊያ ሐረግ"
323msgstr "አዝናለሁ የተሳሳተ የማለፊያ ሐረግ"
324
324
325−#: qml/Shell.qml:468 qml/Wizard/Pages/passwd-confirm.qml:54
325+#: qml/Shell.qml:445
326msgid "Sorry, incorrect passcode."
326msgid "Sorry, incorrect passcode."
327msgstr "አዝናለሁ የተሳሳተ የማለፊያ ኮድ"
327msgstr "አዝናለሁ የተሳሳተ የማለፊያ ኮድ"
328
328
329−#: qml/Shell.qml:469
329+#: qml/Shell.qml:446
330msgid "This will be your last attempt."
330msgid "This will be your last attempt."
331msgstr "ይህ የመጨረሻ ሙከራዎ ነው"
331msgstr "ይህ የመጨረሻ ሙከራዎ ነው"
332
332
333−#: qml/Shell.qml:471
333+#: qml/Shell.qml:448
334msgid ""
334msgid ""
335"If passphrase is entered incorrectly, your phone will conduct a factory "
335"If passphrase is entered incorrectly, your phone will conduct a factory "
336"reset and all personal data will be deleted."
336"reset and all personal data will be deleted."
@@ -338,7 +338,7 @@ msgstr ""
338"የተሳሳተ የማለፊያ ሐረግ ካስገቡ የ እርስዎ ስልክ ወደ ነበረበት ወደ ፋክቶሪው ዘዴ ይመለሳል: እና የ ግል ዳታ በሙሉ "
338"የተሳሳተ የማለፊያ ሐረግ ካስገቡ የ እርስዎ ስልክ ወደ ነበረበት ወደ ፋክቶሪው ዘዴ ይመለሳል: እና የ ግል ዳታ በሙሉ "
339"ይጠፋል"
339"ይጠፋል"
340
340
341−#: qml/Shell.qml:472
341+#: qml/Shell.qml:449
342msgid ""
342msgid ""
343"If passcode is entered incorrectly, your phone will conduct a factory reset "
343"If passcode is entered incorrectly, your phone will conduct a factory reset "
344"and all personal data will be deleted."
344"and all personal data will be deleted."
@@ -348,180 +348,183 @@ msgstr ""
348
348
349#: qml/Wizard/Page.qml:89
349#: qml/Wizard/Page.qml:89
350msgid "Back"
350msgid "Back"
351−msgstr ""
351+msgstr "ወደ ኋላ"
352
352
353#: qml/Wizard/Pages/10-welcome.qml:27
353#: qml/Wizard/Pages/10-welcome.qml:27
354msgid "Hi!"
354msgid "Hi!"
355−msgstr ""
355+msgstr "ሰላም"
356
356
357#: qml/Wizard/Pages/10-welcome.qml:44
357#: qml/Wizard/Pages/10-welcome.qml:44
358msgid "Welcome to your Ubuntu phone."
358msgid "Welcome to your Ubuntu phone."
359−msgstr ""
359+msgstr "እንኳን ደህና መጡ ወደ እርስዎ ኡቡንቱ ስልክ"
360
360
361#: qml/Wizard/Pages/10-welcome.qml:52
361#: qml/Wizard/Pages/10-welcome.qml:52
362msgid "Let’s get started."
362msgid "Let’s get started."
363−msgstr ""
363+msgstr "ስራ እንጀምር"
364
364
365#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
365#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
366#: qml/Wizard/Pages/40-wifi.qml:197 qml/Wizard/Pages/50-location.qml:131
366#: qml/Wizard/Pages/40-wifi.qml:197 qml/Wizard/Pages/50-location.qml:131
367#: qml/Wizard/Pages/60-reporting.qml:50 qml/Wizard/Pages/passwd-confirm.qml:82
367#: qml/Wizard/Pages/60-reporting.qml:50 qml/Wizard/Pages/passwd-confirm.qml:82
368#: qml/Wizard/Pages/passwd-set.qml:90
368#: qml/Wizard/Pages/passwd-set.qml:90
369msgid "Continue"
369msgid "Continue"
370−msgstr ""
370+msgstr "ይቀጥሉ"
371
371
372#: qml/Wizard/Pages/20-sim.qml:25
372#: qml/Wizard/Pages/20-sim.qml:25
373msgid "Add a SIM card and restart your device"
373msgid "Add a SIM card and restart your device"
374−msgstr ""
374+msgstr "የ ሲም ካርድ ይጨምሩ እና አካሉን እንደገና ያስነሱ"
375
375
376#: qml/Wizard/Pages/20-sim.qml:55
376#: qml/Wizard/Pages/20-sim.qml:55
377msgid "Without it, you won’t be able to make calls or use text messaging."
377msgid "Without it, you won’t be able to make calls or use text messaging."
378−msgstr ""
378+msgstr "ያለ እሱ ጥሪ መፈጸም ወይንም የ ጽሁፍ መልእክት መላክ አይችሉም"
379
379
380#: qml/Wizard/Pages/20-sim.qml:69 qml/Wizard/Pages/40-wifi.qml:197
380#: qml/Wizard/Pages/20-sim.qml:69 qml/Wizard/Pages/40-wifi.qml:197
381msgid "Skip"
381msgid "Skip"
382−msgstr ""
382+msgstr "መዝለያ"
383
383
384#: qml/Wizard/Pages/30-passwd-type.qml:39
384#: qml/Wizard/Pages/30-passwd-type.qml:39
385msgid "Lock security"
385msgid "Lock security"
386−msgstr ""
386+msgstr "ደህንነት መቆለፊያ"
387
387
388#: qml/Wizard/Pages/30-passwd-type.qml:74
388#: qml/Wizard/Pages/30-passwd-type.qml:74
389msgid "Please select how you’d like to unlock your phone."
389msgid "Please select how you’d like to unlock your phone."
390−msgstr ""
390+msgstr "እባክዎን የ እርስዎን ስልክ እንዴት እንደሚከፍቱ ይምረጡ"
391
391
392#: qml/Wizard/Pages/30-passwd-type.qml:97
392#: qml/Wizard/Pages/30-passwd-type.qml:97
393msgid "Swipe"
393msgid "Swipe"
394−msgstr ""
394+msgstr "መጥረጊያ"
395
395
396#: qml/Wizard/Pages/30-passwd-type.qml:98
396#: qml/Wizard/Pages/30-passwd-type.qml:98
397msgid "No security"
397msgid "No security"
398−msgstr ""
398+msgstr "ደህንነት አልተገኘም"
399
399
400#: qml/Wizard/Pages/30-passwd-type.qml:100
400#: qml/Wizard/Pages/30-passwd-type.qml:100
401msgid "Passcode"
401msgid "Passcode"
402−msgstr ""
402+msgstr "ማለፊያ ኮድ"
403
403
404#: qml/Wizard/Pages/30-passwd-type.qml:101
404#: qml/Wizard/Pages/30-passwd-type.qml:101
405msgid "4 digits only"
405msgid "4 digits only"
406−msgstr ""
406+msgstr "4 ዲጂትስ ብቻ"
407
407
408#: qml/Wizard/Pages/30-passwd-type.qml:103
408#: qml/Wizard/Pages/30-passwd-type.qml:103
409msgid "Passphrase"
409msgid "Passphrase"
410−msgstr ""
410+msgstr "ማለፊያ ሐረግ"
411
411
412#: qml/Wizard/Pages/30-passwd-type.qml:104
412#: qml/Wizard/Pages/30-passwd-type.qml:104
413msgid "Numbers and letters"
413msgid "Numbers and letters"
414−msgstr ""
414+msgstr "ቁጥሮች እና ፊደሎች"
415
415
416#: qml/Wizard/Pages/40-wifi.qml:28
416#: qml/Wizard/Pages/40-wifi.qml:28
417msgid "Connect to Wi‑Fi"
417msgid "Connect to Wi‑Fi"
418−msgstr ""
418+msgstr "ወደ ዋይ‑ፋይ መገናኛ"
419
419
420#: qml/Wizard/Pages/40-wifi.qml:147
420#: qml/Wizard/Pages/40-wifi.qml:147
421msgid "Available networks…"
421msgid "Available networks…"
422−msgstr ""
422+msgstr "ዝግጁ ኔትዎርኮች…"
423
423
424#: qml/Wizard/Pages/40-wifi.qml:148
424#: qml/Wizard/Pages/40-wifi.qml:148
425msgid "No available networks."
425msgid "No available networks."
426−msgstr ""
426+msgstr "ዝግጁ ኔትዎርኮች አልተገኙም"
427
427
428#: qml/Wizard/Pages/50-location.qml:27
428#: qml/Wizard/Pages/50-location.qml:27
429msgid "Location"
429msgid "Location"
430−msgstr ""
430+msgstr "አካባቢ"
431
431
432#: qml/Wizard/Pages/50-location.qml:62
432#: qml/Wizard/Pages/50-location.qml:62
433msgid "Let the phone detect your location:"
433msgid "Let the phone detect your location:"
434−msgstr ""
434+msgstr "እባክዎን እርስዎ ያሉበትን አካባቢ ስልኩ እራሱ ይፈልግ:"
435
435
436#: qml/Wizard/Pages/50-location.qml:69
436#: qml/Wizard/Pages/50-location.qml:69
437msgid "Using GPS only (less accurate)"
437msgid "Using GPS only (less accurate)"
438−msgstr ""
438+msgstr "ጂፒኤስን ብቻ መጠቀሚያ(በጣም ቅርብ)"
439
439
440#: qml/Wizard/Pages/50-location.qml:86
440#: qml/Wizard/Pages/50-location.qml:86
441msgid "Using GPS, anonymized Wi-Fi and cellular network info (recommended)"
441msgid "Using GPS, anonymized Wi-Fi and cellular network info (recommended)"
442−msgstr ""
442+msgstr "ይጠቀሙ ጂፒኤስ ግልጽ ያልሆነ ዋይ-ፋይ እና ተንቀሳቃሽ ኔትዎርክ መረጃ (ይመከራሉ)"
443
443
444#. TRANSLATORS: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
444#. TRANSLATORS: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
445#: qml/Wizard/Pages/50-location.qml:103
445#: qml/Wizard/Pages/50-location.qml:103
446msgid ""
446msgid ""
447"By selecting this option you agree to the Nokia HERE <a href='#'>terms and "
447"By selecting this option you agree to the Nokia HERE <a href='#'>terms and "
448"conditions</a>."
448"conditions</a>."
449−msgstr ""
449+msgstr "ይህን ምርጫ በመምረጥ ተስማምቻለሁ ከ Nokia HERE <a href='#'>ውሎች እና ሁኔታዎች ጋር</a>."
450
450
451#: qml/Wizard/Pages/50-location.qml:112
451#: qml/Wizard/Pages/50-location.qml:112
452msgid "Not at all"
452msgid "Not at all"
453−msgstr ""
453+msgstr "አይደለም"
454
454
455#: qml/Wizard/Pages/50-location.qml:124
455#: qml/Wizard/Pages/50-location.qml:124
456msgid "You can change your mind later in <b>System Settings</b>."
456msgid "You can change your mind later in <b>System Settings</b>."
457−msgstr ""
457+msgstr "እርስዎ በኋላ መቀየር ይችላሉ ከ <b>ስርአት ማሰናጃዎች</b>."
458
458
459#: qml/Wizard/Pages/60-reporting.qml:24
459#: qml/Wizard/Pages/60-reporting.qml:24
460msgid "Improving your experience"
460msgid "Improving your experience"
461−msgstr ""
461+msgstr "የ እርስዎን ልምምድ ማሻሻያ"
462
462
463#: qml/Wizard/Pages/60-reporting.qml:36
463#: qml/Wizard/Pages/60-reporting.qml:36
464msgid ""
464msgid ""
465"Your phone is set up to automatically report errors to Canonical and its "
465"Your phone is set up to automatically report errors to Canonical and its "
466"partners, the makers of the operating system."
466"partners, the makers of the operating system."
467msgstr ""
467msgstr ""
468+"የ እርስዎ ስልክ ራሱ በራሱ የ ስህተት መግለጫዎች ወደ Canonical and its partners, የ መስሪያ ስርአት "
469+"አምራቾች"
468
470
469#: qml/Wizard/Pages/60-reporting.qml:43
471#: qml/Wizard/Pages/60-reporting.qml:43
470msgid ""
472msgid ""
471"This can be disabled in <b>System Settings</b> under <b>Security &amp; "
473"This can be disabled in <b>System Settings</b> under <b>Security &amp; "
472"Privacy</b>"
474"Privacy</b>"
473msgstr ""
475msgstr ""
476+"ይህን ግልጋሎት ማሰናከል ይችላሉ ከ <b>ስርአት ማሰናጃዎች</b> under <b>Security &amp; Privacy</b>"
474
477
475#: qml/Wizard/Pages/80-finished.qml:24
478#: qml/Wizard/Pages/80-finished.qml:24
476msgid "All done"
479msgid "All done"
477−msgstr ""
480+msgstr "ሁሉም ተፈጽሟል"
478
481
479#: qml/Wizard/Pages/80-finished.qml:39
482#: qml/Wizard/Pages/80-finished.qml:39
480msgid "Nice work!"
483msgid "Nice work!"
481−msgstr ""
484+msgstr "ጥሩ ሰርተዋል!"
482
485
483#: qml/Wizard/Pages/80-finished.qml:46
486#: qml/Wizard/Pages/80-finished.qml:46
484msgid "Your phone is now ready to use."
487msgid "Your phone is now ready to use."
485−msgstr ""
488+msgstr "ስልኩ አሁን ለመጠቀም ዝግጁ ነው"
486
489
487#: qml/Wizard/Pages/80-finished.qml:53
490#: qml/Wizard/Pages/80-finished.qml:53
488msgid "Finish"
491msgid "Finish"
489−msgstr ""
492+msgstr "መጨረሻ"
490
493
491#: qml/Wizard/Pages/here-terms.qml:27
494#: qml/Wizard/Pages/here-terms.qml:27
492msgid "Terms & Conditions"
495msgid "Terms & Conditions"
493−msgstr ""
496+msgstr "ውሎች & ሁኔታዎች"
494
497
495#: qml/Wizard/Pages/passwd-confirm.qml:49
498#: qml/Wizard/Pages/passwd-confirm.qml:49
496msgid "Confirm passphrase"
499msgid "Confirm passphrase"
497−msgstr ""
500+msgstr "የ ማለፊያ ሐረግ ማረጋገጫ"
498
501
499#: qml/Wizard/Pages/passwd-confirm.qml:50
502#: qml/Wizard/Pages/passwd-confirm.qml:50
500msgid "Confirm passcode"
503msgid "Confirm passcode"
501−msgstr ""
504+msgstr "የማለፊያ ኮድ ማረጋገጫ"
502
505
503#: qml/Wizard/Pages/passwd-confirm.qml:53
506#: qml/Wizard/Pages/passwd-confirm.qml:53
504#: qml/Wizard/Pages/passwd-confirm.qml:54
507#: qml/Wizard/Pages/passwd-confirm.qml:54
505msgid "Please try again."
508msgid "Please try again."
506−msgstr ""
509+msgstr "እባክዎን እንደገና ይሞክሩ"
507
510
508#: qml/Wizard/Pages/passwd-set.qml:61
511#: qml/Wizard/Pages/passwd-set.qml:61
509msgid "Choose your passcode"
512msgid "Choose your passcode"
510−msgstr ""
513+msgstr "የ እርስዎን የማለፊያ ኮድ ይምረጡ"
511
514
512#: qml/Wizard/Pages/passwd-set.qml:68
515#: qml/Wizard/Pages/passwd-set.qml:68
513msgid "Passphrase must be 4 characters long"
516msgid "Passphrase must be 4 characters long"
514−msgstr ""
517+msgstr "የ ማለፊያ ሀረግ ቢያንስ 4 ባህሪዎች መሆን አለበት"
515
518
516#: qml/Wizard/StackButton.qml:39
519#: qml/Wizard/StackButton.qml:39
517#, qt-format
520#, qt-format
518msgid "〈 %1"
521msgid "〈 %1"
519−msgstr ""
522+msgstr "〈 %1"
520
523
521#: qml/Wizard/StackButton.qml:42
524#: qml/Wizard/StackButton.qml:42
522#, qt-format
525#, qt-format
523msgid "%1 〉"
526msgid "%1 〉"
524−msgstr ""
527+msgstr "%1 〉"
525
528
526#~ msgid "Type or say a command"
529#~ msgid "Type or say a command"
527#~ msgstr "ትእዛዝ ይናገሩ ወይንም ይጻፉ"
530#~ msgstr "ትእዛዝ ይናገሩ ወይንም ይጻፉ"
po/br.po+1−1
@@ -15,7 +15,7 @@ msgstr ""
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n > 1;\n"
17"Plural-Forms: nplurals=2; plural=n > 1;\n"
18−"X-Launchpad-Export-Date: 2014-12-16 07:34+0000\n"
18+"X-Launchpad-Export-Date: 2014-12-17 07:06+0000\n"
19"X-Generator: Launchpad (build 17286)\n"
19"X-Generator: Launchpad (build 17286)\n"
20
20
21#: plugins/LightDM/Greeter.cpp:130
21#: plugins/LightDM/Greeter.cpp:130
po/hu.po+61−61
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-12-10 10:55+0100\n"
10"POT-Creation-Date: 2014-12-10 10:55+0100\n"
11−"PO-Revision-Date: 2014-12-15 15:26+0000\n"
11+"PO-Revision-Date: 2014-12-21 15:13+0000\n"
12"Last-Translator: Richard Somlói <ricsipontaz@gmail.com>\n"
12"Last-Translator: Richard Somlói <ricsipontaz@gmail.com>\n"
13"Language-Team: Hungarian <hu@li.org>\n"
13"Language-Team: Hungarian <hu@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-12-16 07:34+0000\n"
18+"X-Launchpad-Export-Date: 2014-12-22 07:05+0000\n"
19"X-Generator: Launchpad (build 17286)\n"
19"X-Generator: Launchpad (build 17286)\n"
20
20
21#: plugins/LightDM/Greeter.cpp:130
21#: plugins/LightDM/Greeter.cpp:130
@@ -23,11 +23,11 @@ msgid "Password: "
23msgstr "Jelszó: "
23msgstr "Jelszó: "
24
24
25#: plugins/Unity/Launcher/launcheritem.cpp:45
25#: plugins/Unity/Launcher/launcheritem.cpp:45
26−#: plugins/Unity/Launcher/launcheritem.cpp:100
26+#: plugins/Unity/Launcher/launcheritem.cpp:91
27msgid "Pin shortcut"
27msgid "Pin shortcut"
28msgstr "Indító rögzítése"
28msgstr "Indító rögzítése"
29
29
30−#: plugins/Unity/Launcher/launcheritem.cpp:100
30+#: plugins/Unity/Launcher/launcheritem.cpp:91
31msgid "Unpin shortcut"
31msgid "Unpin shortcut"
32msgstr "Indító feloldása"
32msgstr "Indító feloldása"
33
33
@@ -47,48 +47,48 @@ msgstr "A túl sok hibás jelkód próbálkozás miatt le lett zárva az eszköz
47#, qt-format
47#, qt-format
48msgid "Please wait %1 minute and then try again…"
48msgid "Please wait %1 minute and then try again…"
49msgid_plural "Please wait %1 minutes and then try again…"
49msgid_plural "Please wait %1 minutes and then try again…"
50−msgstr[0] "Kérjük várjon %1 percet és próbálja újra…"
50+msgstr[0] "Várjon %1 percet és próbálja újra…"
51−msgstr[1] "Kérjük várjon %1 percet és próbálja újra…"
51+msgstr[1] "Várjon %1 percet és próbálja újra…"
52
52
53−#: qml/Components/Dialogs.qml:70
53+#: qml/Components/Dialogs.qml:74
54msgid "Log out"
54msgid "Log out"
55msgstr "Kijelentkezés"
55msgstr "Kijelentkezés"
56
56
57−#: qml/Components/Dialogs.qml:71
57+#: qml/Components/Dialogs.qml:75
58msgid "Are you sure you want to log out?"
58msgid "Are you sure you want to log out?"
59msgstr "Biztos benne, hogy kijelentkezik?"
59msgstr "Biztos benne, hogy kijelentkezik?"
60
60
61−#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
61+#: qml/Components/Dialogs.qml:77 qml/Components/Dialogs.qml:101
62−#: qml/Components/Dialogs.qml:122
62+#: qml/Components/Dialogs.qml:126
63msgid "No"
63msgid "No"
64msgstr "Nem"
64msgstr "Nem"
65
65
66−#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
66+#: qml/Components/Dialogs.qml:84 qml/Components/Dialogs.qml:108
67−#: qml/Components/Dialogs.qml:129
67+#: qml/Components/Dialogs.qml:133
68msgid "Yes"
68msgid "Yes"
69msgstr "Igen"
69msgstr "Igen"
70
70
71−#: qml/Components/Dialogs.qml:94
71+#: qml/Components/Dialogs.qml:98
72msgid "Shut down"
72msgid "Shut down"
73msgstr "Leállítás"
73msgstr "Leállítás"
74
74
75−#: qml/Components/Dialogs.qml:95
75+#: qml/Components/Dialogs.qml:99
76msgid "Are you sure you want to shut down?"
76msgid "Are you sure you want to shut down?"
77msgstr "Biztosan le szeretné állítani?"
77msgstr "Biztosan le szeretné állítani?"
78
78
79−#: qml/Components/Dialogs.qml:119
79+#: qml/Components/Dialogs.qml:123
80msgid "Reboot"
80msgid "Reboot"
81msgstr "Újraindítás"
81msgstr "Újraindítás"
82
82
83−#: qml/Components/Dialogs.qml:120
83+#: qml/Components/Dialogs.qml:124
84msgid "Are you sure you want to reboot?"
84msgid "Are you sure you want to reboot?"
85msgstr "Biztosan újra szeretné indítani?"
85msgstr "Biztosan újra szeretné indítani?"
86
86
87−#: qml/Components/Dialogs.qml:144
87+#: qml/Components/Dialogs.qml:148
88msgid "Power"
88msgid "Power"
89msgstr "Kikapcsolás"
89msgstr "Kikapcsolás"
90
90
91−#: qml/Components/Dialogs.qml:145
91+#: qml/Components/Dialogs.qml:149
92msgid ""
92msgid ""
93"Are you sure you would like\n"
93"Are you sure you would like\n"
94"to power off?"
94"to power off?"
@@ -96,15 +96,15 @@ msgstr ""
96"Biztos benne, hogy ki\n"
96"Biztos benne, hogy ki\n"
97"szeretné kapcsolni?"
97"szeretné kapcsolni?"
98
98
99−#: qml/Components/Dialogs.qml:147
99+#: qml/Components/Dialogs.qml:151
100msgid "Power off"
100msgid "Power off"
101msgstr "Kikapcsolás"
101msgstr "Kikapcsolás"
102
102
103−#: qml/Components/Dialogs.qml:157
103+#: qml/Components/Dialogs.qml:161
104msgid "Restart"
104msgid "Restart"
105msgstr "Újraindítás"
105msgstr "Újraindítás"
106
106
107−#: qml/Components/Dialogs.qml:167
107+#: qml/Components/Dialogs.qml:171
108msgid "Cancel"
108msgid "Cancel"
109msgstr "Mégse"
109msgstr "Mégse"
110
110
@@ -112,45 +112,45 @@ msgstr "Mégse"
112msgid "Skip intro"
112msgid "Skip intro"
113msgstr "A bemutató kihagyása"
113msgstr "A bemutató kihagyása"
114
114
115−#: qml/Components/EdgeDemo.qml:125
115+#: qml/Components/EdgeDemo.qml:112
116msgid "Right edge"
116msgid "Right edge"
117msgstr "Jobb szél"
117msgstr "Jobb szél"
118
118
119−#: qml/Components/EdgeDemo.qml:126
119+#: qml/Components/EdgeDemo.qml:113
120msgid "Try swiping from the right edge to unlock the phone"
120msgid "Try swiping from the right edge to unlock the phone"
121msgstr "A telefon feloldásához csúsztassa ujját a jobb szélről"
121msgstr "A telefon feloldásához csúsztassa ujját a jobb szélről"
122
122
123−#: qml/Components/EdgeDemo.qml:157
123+#: qml/Components/EdgeDemo.qml:144
124msgid "Top edge"
124msgid "Top edge"
125msgstr "Felső szél"
125msgstr "Felső szél"
126
126
127−#: qml/Components/EdgeDemo.qml:158
127+#: qml/Components/EdgeDemo.qml:145
128msgid "Try swiping from the top edge to access the indicators"
128msgid "Try swiping from the top edge to access the indicators"
129msgstr "Az állapotmenük eléréséhez csúsztassa ujját a felső szélről"
129msgstr "Az állapotmenük eléréséhez csúsztassa ujját a felső szélről"
130
130
131−#: qml/Components/EdgeDemo.qml:183
131+#: qml/Components/EdgeDemo.qml:170
132msgid "Close"
132msgid "Close"
133msgstr "Bezárás"
133msgstr "Bezárás"
134
134
135−#: qml/Components/EdgeDemo.qml:184
135+#: qml/Components/EdgeDemo.qml:171
136msgid "Swipe up again to close the settings screen"
136msgid "Swipe up again to close the settings screen"
137msgstr "A beállítások bezárásához csúsztassa ujját újra felfelé"
137msgstr "A beállítások bezárásához csúsztassa ujját újra felfelé"
138
138
139−#: qml/Components/EdgeDemo.qml:214
139+#: qml/Components/EdgeDemo.qml:201
140msgid "Left edge"
140msgid "Left edge"
141msgstr "Bal szél"
141msgstr "Bal szél"
142
142
143−#: qml/Components/EdgeDemo.qml:215
143+#: qml/Components/EdgeDemo.qml:202
144msgid "Swipe from the left to reveal the launcher for quick access to apps"
144msgid "Swipe from the left to reveal the launcher for quick access to apps"
145msgstr ""
145msgstr ""
146"Csúsztassa ujját a bal szélről az indítón található alkalmazások gyors "
146"Csúsztassa ujját a bal szélről az indítón található alkalmazások gyors "
147"eléréséhez"
147"eléréséhez"
148
148
149−#: qml/Components/EdgeDemo.qml:242
149+#: qml/Components/EdgeDemo.qml:229
150msgid "Well done"
150msgid "Well done"
151msgstr "Rendben"
151msgstr "Rendben"
152
152
153−#: qml/Components/EdgeDemo.qml:243
153+#: qml/Components/EdgeDemo.qml:230
154msgid ""
154msgid ""
155"You have now mastered the edge gestures and can start using the "
155"You have now mastered the edge gestures and can start using the "
156"phone<br><br>Tap on the screen to start"
156"phone<br><br>Tap on the screen to start"
@@ -158,44 +158,44 @@ msgstr ""
158"Elsajátította a gesztusokat, és megkezdheti a telefon "
158"Elsajátította a gesztusokat, és megkezdheti a telefon "
159"használatát.<br><br>Koppintson a képernyőre a kezdéshez."
159"használatát.<br><br>Koppintson a képernyőre a kezdéshez."
160
160
161−#: qml/Components/Lockscreen.qml:238
161+#: qml/Components/Lockscreen.qml:223
162msgid "Return to Call"
162msgid "Return to Call"
163msgstr "Vissza a híváshoz"
163msgstr "Vissza a híváshoz"
164
164
165−#: qml/Components/Lockscreen.qml:238
165+#: qml/Components/Lockscreen.qml:223
166msgid "Emergency Call"
166msgid "Emergency Call"
167msgstr "Vészhívás"
167msgstr "Vészhívás"
168
168
169−#: qml/Components/Lockscreen.qml:270
169+#: qml/Components/Lockscreen.qml:255
170msgid "OK"
170msgid "OK"
171msgstr "Ok"
171msgstr "Ok"
172
172
173−#: qml/Dash/GenericScopeView.qml:431 qml/Dash/GenericScopeView.qml:588
173+#: qml/Dash/GenericScopeView.qml:434 qml/Dash/GenericScopeView.qml:591
174msgid "See less"
174msgid "See less"
175msgstr "Kevesebb"
175msgstr "Kevesebb"
176
176
177−#: qml/Dash/GenericScopeView.qml:431
177+#: qml/Dash/GenericScopeView.qml:434
178msgid "See all"
178msgid "See all"
179msgstr "Összes megtekintése"
179msgstr "Összes megtekintése"
180
180
181−#: qml/Dash/GenericScopeView.qml:493 qml/Dash/PageHeader.qml:267
181+#: qml/Dash/GenericScopeView.qml:496 qml/Dash/PageHeader.qml:268
182#: qml/Panel/SearchIndicator.qml:27
182#: qml/Panel/SearchIndicator.qml:27
183msgid "Search"
183msgid "Search"
184msgstr "Keresés"
184msgstr "Keresés"
185
185
186−#: qml/Dash/PageHeader.qml:260
186+#: qml/Dash/PageHeader.qml:261
187msgid "Store"
187msgid "Store"
188msgstr "Áruház"
188msgstr "Áruház"
189
189
190−#: qml/Dash/PageHeader.qml:277
190+#: qml/Dash/PageHeader.qml:278
191msgid "Settings"
191msgid "Settings"
192msgstr "Beállítások"
192msgstr "Beállítások"
193
193
194−#: qml/Dash/PageHeader.qml:284
194+#: qml/Dash/PageHeader.qml:285
195msgid "Remove from Favorites"
195msgid "Remove from Favorites"
196msgstr "Eltávolítás a kedvencek közül"
196msgstr "Eltávolítás a kedvencek közül"
197
197
198−#: qml/Dash/PageHeader.qml:284
198+#: qml/Dash/PageHeader.qml:285
199msgid "Add to Favorites"
199msgid "Add to Favorites"
200msgstr "Hozzáadás a kedvencekhez"
200msgstr "Hozzáadás a kedvencekhez"
201
201
@@ -229,11 +229,11 @@ msgstr "Engedje el a frissítéshez…"
229
229
230#: qml/Dash/ScopesList.qml:63
230#: qml/Dash/ScopesList.qml:63
231msgid "Manage"
231msgid "Manage"
232−msgstr ""
232+msgstr "Kezelés"
233
233
234#: qml/Dash/ScopesList.qml:107
234#: qml/Dash/ScopesList.qml:107
235msgid "Home"
235msgid "Home"
236−msgstr ""
236+msgstr "Kezdőlapon"
237
237
238#: qml/Dash/ScopesList.qml:108
238#: qml/Dash/ScopesList.qml:108
239msgid "Also installed"
239msgid "Also installed"
@@ -291,49 +291,49 @@ msgstr "SIM feloldása"
291msgid "Roaming"
291msgid "Roaming"
292msgstr "Barangolás"
292msgstr "Barangolás"
293
293
294−#: qml/Shell.qml:367
294+#: qml/Shell.qml:402
295#, qt-format
295#, qt-format
296msgid "Enter %1"
296msgid "Enter %1"
297msgstr "Adja meg: %1"
297msgstr "Adja meg: %1"
298
298
299−#: qml/Shell.qml:368 qml/Wizard/Pages/passwd-set.qml:60
299+#: qml/Shell.qml:394
300msgid "Enter passphrase"
300msgid "Enter passphrase"
301msgstr "Jelmondat megadása"
301msgstr "Jelmondat megadása"
302
302
303−#: qml/Shell.qml:369
303+#: qml/Shell.qml:398
304msgid "Enter passcode"
304msgid "Enter passcode"
305msgstr "Jelkód megadása"
305msgstr "Jelkód megadása"
306
306
307−#: qml/Shell.qml:370
307+#: qml/Shell.qml:403
308#, qt-format
308#, qt-format
309msgid "Sorry, incorrect %1"
309msgid "Sorry, incorrect %1"
310−msgstr "Sajnáljuk, helytelen %1"
310+msgstr "Sajnálom, helytelen %1"
311
311
312−#: qml/Shell.qml:371
312+#: qml/Shell.qml:395
313msgid "Sorry, incorrect passphrase"
313msgid "Sorry, incorrect passphrase"
314−msgstr "Sajnáljuk, helytelen jelmondat"
314+msgstr "Sajnálom, helytelen jelmondat"
315
315
316−#: qml/Shell.qml:372
316+#: qml/Shell.qml:396
317msgid "Please re-enter"
317msgid "Please re-enter"
318−msgstr "Kérjük próbálja újra"
318+msgstr "Próbálja újra"
319
319
320−#: qml/Shell.qml:373
320+#: qml/Shell.qml:399
321msgid "Sorry, incorrect passcode"
321msgid "Sorry, incorrect passcode"
322−msgstr "Sajnáljuk, helytelen jelkód"
322+msgstr "Sajnálom, helytelen jelkód"
323
323
324−#: qml/Shell.qml:467 qml/Wizard/Pages/passwd-confirm.qml:53
324+#: qml/Shell.qml:444
325msgid "Sorry, incorrect passphrase."
325msgid "Sorry, incorrect passphrase."
326−msgstr "Sajnáljuk, helytelen jelmondat."
326+msgstr "Sajnálom, helytelen jelmondat."
327
327
328−#: qml/Shell.qml:468 qml/Wizard/Pages/passwd-confirm.qml:54
328+#: qml/Shell.qml:445
329msgid "Sorry, incorrect passcode."
329msgid "Sorry, incorrect passcode."
330−msgstr "Sajnáljuk, helytelen jelkód."
330+msgstr "Sajnálom, helytelen jelkód."
331
331
332−#: qml/Shell.qml:469
332+#: qml/Shell.qml:446
333msgid "This will be your last attempt."
333msgid "This will be your last attempt."
334msgstr "Ez az utolsó próbálkozási lehetősége."
334msgstr "Ez az utolsó próbálkozási lehetősége."
335
335
336−#: qml/Shell.qml:471
336+#: qml/Shell.qml:448
337msgid ""
337msgid ""
338"If passphrase is entered incorrectly, your phone will conduct a factory "
338"If passphrase is entered incorrectly, your phone will conduct a factory "
339"reset and all personal data will be deleted."
339"reset and all personal data will be deleted."
@@ -341,7 +341,7 @@ msgstr ""
341"Ha helytelen jelmondatot ad meg, a telefonja visszaállítja a gyári "
341"Ha helytelen jelmondatot ad meg, a telefonja visszaállítja a gyári "
342"beállításokat és törli minden személyes adatát."
342"beállításokat és törli minden személyes adatát."
343
343
344−#: qml/Shell.qml:472
344+#: qml/Shell.qml:449
345msgid ""
345msgid ""
346"If passcode is entered incorrectly, your phone will conduct a factory reset "
346"If passcode is entered incorrectly, your phone will conduct a factory reset "
347"and all personal data will be deleted."
347"and all personal data will be deleted."
po/ro.po+101−90
@@ -8,7 +8,7 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-12-10 10:55+0100\n"
10"POT-Creation-Date: 2014-12-10 10:55+0100\n"
11−"PO-Revision-Date: 2014-11-18 12:09+0000\n"
11+"PO-Revision-Date: 2015-01-07 11:11+0000\n"
12"Last-Translator: Marian Vasile <marianvasile1972@gmail.com>\n"
12"Last-Translator: Marian Vasile <marianvasile1972@gmail.com>\n"
13"Language-Team: Romanian <ro@li.org>\n"
13"Language-Team: Romanian <ro@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
@@ -16,19 +16,19 @@ msgstr ""
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n % 100 > 19) || ((n % 100 "
17"Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n % 100 > 19) || ((n % 100 "
18"== 0) && (n != 0))) ? 2: 1));\n"
18"== 0) && (n != 0))) ? 2: 1));\n"
19−"X-Launchpad-Export-Date: 2014-12-13 07:11+0000\n"
19+"X-Launchpad-Export-Date: 2015-01-08 07:10+0000\n"
20−"X-Generator: Launchpad (build 17286)\n"
20+"X-Generator: Launchpad (build 17298)\n"
21
21
22#: plugins/LightDM/Greeter.cpp:130
22#: plugins/LightDM/Greeter.cpp:130
23msgid "Password: "
23msgid "Password: "
24msgstr "Parolă: "
24msgstr "Parolă: "
25
25
26#: plugins/Unity/Launcher/launcheritem.cpp:45
26#: plugins/Unity/Launcher/launcheritem.cpp:45
27−#: plugins/Unity/Launcher/launcheritem.cpp:100
27+#: plugins/Unity/Launcher/launcheritem.cpp:91
28msgid "Pin shortcut"
28msgid "Pin shortcut"
29msgstr "Fixează scurtătura"
29msgstr "Fixează scurtătura"
30
30
31−#: plugins/Unity/Launcher/launcheritem.cpp:100
31+#: plugins/Unity/Launcher/launcheritem.cpp:91
32msgid "Unpin shortcut"
32msgid "Unpin shortcut"
33msgstr "Eliberează scurtătura"
33msgstr "Eliberează scurtătura"
34
34
@@ -55,45 +55,45 @@ msgstr[0] "Așteptați %1 minut și apoi încercați din nou..."
55msgstr[1] "Așteptați %1 minute și apoi încercați din nou..."
55msgstr[1] "Așteptați %1 minute și apoi încercați din nou..."
56msgstr[2] "Așteptați %1 de minute și apoi încercați din nou..."
56msgstr[2] "Așteptați %1 de minute și apoi încercați din nou..."
57
57
58−#: qml/Components/Dialogs.qml:70
58+#: qml/Components/Dialogs.qml:74
59msgid "Log out"
59msgid "Log out"
60msgstr "Închide sesiunea"
60msgstr "Închide sesiunea"
61
61
62−#: qml/Components/Dialogs.qml:71
62+#: qml/Components/Dialogs.qml:75
63msgid "Are you sure you want to log out?"
63msgid "Are you sure you want to log out?"
64msgstr "Sunteți sigur că doriți să închideți sesiunea?"
64msgstr "Sunteți sigur că doriți să închideți sesiunea?"
65
65
66−#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
66+#: qml/Components/Dialogs.qml:77 qml/Components/Dialogs.qml:101
67−#: qml/Components/Dialogs.qml:122
67+#: qml/Components/Dialogs.qml:126
68msgid "No"
68msgid "No"
69msgstr "Nu"
69msgstr "Nu"
70
70
71−#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
71+#: qml/Components/Dialogs.qml:84 qml/Components/Dialogs.qml:108
72−#: qml/Components/Dialogs.qml:129
72+#: qml/Components/Dialogs.qml:133
73msgid "Yes"
73msgid "Yes"
74msgstr "Da"
74msgstr "Da"
75
75
76−#: qml/Components/Dialogs.qml:94
76+#: qml/Components/Dialogs.qml:98
77msgid "Shut down"
77msgid "Shut down"
78msgstr "Închideți"
78msgstr "Închideți"
79
79
80−#: qml/Components/Dialogs.qml:95
80+#: qml/Components/Dialogs.qml:99
81msgid "Are you sure you want to shut down?"
81msgid "Are you sure you want to shut down?"
82msgstr "Sunteți sigur că doriți să închideți?"
82msgstr "Sunteți sigur că doriți să închideți?"
83
83
84−#: qml/Components/Dialogs.qml:119
84+#: qml/Components/Dialogs.qml:123
85msgid "Reboot"
85msgid "Reboot"
86msgstr "Repornire"
86msgstr "Repornire"
87
87
88−#: qml/Components/Dialogs.qml:120
88+#: qml/Components/Dialogs.qml:124
89msgid "Are you sure you want to reboot?"
89msgid "Are you sure you want to reboot?"
90msgstr "Sunteți sigur că doriți să reporniți?"
90msgstr "Sunteți sigur că doriți să reporniți?"
91
91
92−#: qml/Components/Dialogs.qml:144
92+#: qml/Components/Dialogs.qml:148
93msgid "Power"
93msgid "Power"
94msgstr "Alimentare"
94msgstr "Alimentare"
95
95
96−#: qml/Components/Dialogs.qml:145
96+#: qml/Components/Dialogs.qml:149
97msgid ""
97msgid ""
98"Are you sure you would like\n"
98"Are you sure you would like\n"
99"to power off?"
99"to power off?"
@@ -101,15 +101,15 @@ msgstr ""
101"Sunteți sigur că doriți să\n"
101"Sunteți sigur că doriți să\n"
102"opriți alimentarea?"
102"opriți alimentarea?"
103
103
104−#: qml/Components/Dialogs.qml:147
104+#: qml/Components/Dialogs.qml:151
105msgid "Power off"
105msgid "Power off"
106msgstr "Oprire"
106msgstr "Oprire"
107
107
108−#: qml/Components/Dialogs.qml:157
108+#: qml/Components/Dialogs.qml:161
109msgid "Restart"
109msgid "Restart"
110msgstr "Repornire"
110msgstr "Repornire"
111
111
112−#: qml/Components/Dialogs.qml:167
112+#: qml/Components/Dialogs.qml:171
113msgid "Cancel"
113msgid "Cancel"
114msgstr "Anulează"
114msgstr "Anulează"
115
115
@@ -117,46 +117,46 @@ msgstr "Anulează"
117msgid "Skip intro"
117msgid "Skip intro"
118msgstr "Sari peste introducere"
118msgstr "Sari peste introducere"
119
119
120−#: qml/Components/EdgeDemo.qml:125
120+#: qml/Components/EdgeDemo.qml:112
121msgid "Right edge"
121msgid "Right edge"
122msgstr "Marginea din dreapta"
122msgstr "Marginea din dreapta"
123
123
124−#: qml/Components/EdgeDemo.qml:126
124+#: qml/Components/EdgeDemo.qml:113
125msgid "Try swiping from the right edge to unlock the phone"
125msgid "Try swiping from the right edge to unlock the phone"
126msgstr "Glisați de la dreapta spre stânga pentru a debloca telefonul"
126msgstr "Glisați de la dreapta spre stânga pentru a debloca telefonul"
127
127
128−#: qml/Components/EdgeDemo.qml:157
128+#: qml/Components/EdgeDemo.qml:144
129msgid "Top edge"
129msgid "Top edge"
130msgstr "Marginea de sus"
130msgstr "Marginea de sus"
131
131
132−#: qml/Components/EdgeDemo.qml:158
132+#: qml/Components/EdgeDemo.qml:145
133msgid "Try swiping from the top edge to access the indicators"
133msgid "Try swiping from the top edge to access the indicators"
134msgstr ""
134msgstr ""
135"Glisați de la marginea de sus a ecranului pentru a accesa indicatorii"
135"Glisați de la marginea de sus a ecranului pentru a accesa indicatorii"
136
136
137−#: qml/Components/EdgeDemo.qml:183
137+#: qml/Components/EdgeDemo.qml:170
138msgid "Close"
138msgid "Close"
139msgstr "Închide"
139msgstr "Închide"
140
140
141−#: qml/Components/EdgeDemo.qml:184
141+#: qml/Components/EdgeDemo.qml:171
142msgid "Swipe up again to close the settings screen"
142msgid "Swipe up again to close the settings screen"
143msgstr "Glisați în sus din nou pentru a închide ecranul configurărilor"
143msgstr "Glisați în sus din nou pentru a închide ecranul configurărilor"
144
144
145−#: qml/Components/EdgeDemo.qml:214
145+#: qml/Components/EdgeDemo.qml:201
146msgid "Left edge"
146msgid "Left edge"
147msgstr "Marginea din stânga"
147msgstr "Marginea din stânga"
148
148
149−#: qml/Components/EdgeDemo.qml:215
149+#: qml/Components/EdgeDemo.qml:202
150msgid "Swipe from the left to reveal the launcher for quick access to apps"
150msgid "Swipe from the left to reveal the launcher for quick access to apps"
151msgstr ""
151msgstr ""
152"Glisați din stânga ecranului pentru a afișa lansatorul care oferă acces "
152"Glisați din stânga ecranului pentru a afișa lansatorul care oferă acces "
153"rapid la aplicații"
153"rapid la aplicații"
154
154
155−#: qml/Components/EdgeDemo.qml:242
155+#: qml/Components/EdgeDemo.qml:229
156msgid "Well done"
156msgid "Well done"
157msgstr "Felicitări"
157msgstr "Felicitări"
158
158
159−#: qml/Components/EdgeDemo.qml:243
159+#: qml/Components/EdgeDemo.qml:230
160msgid ""
160msgid ""
161"You have now mastered the edge gestures and can start using the "
161"You have now mastered the edge gestures and can start using the "
162"phone<br><br>Tap on the screen to start"
162"phone<br><br>Tap on the screen to start"
@@ -164,44 +164,44 @@ msgstr ""
164"De acum stăpâniți gesturile de control și puteți începe să utilizați "
164"De acum stăpâniți gesturile de control și puteți începe să utilizați "
165"telefonul<br><br>Atingeți ecranul pentru a începe"
165"telefonul<br><br>Atingeți ecranul pentru a începe"
166
166
167−#: qml/Components/Lockscreen.qml:238
167+#: qml/Components/Lockscreen.qml:223
168msgid "Return to Call"
168msgid "Return to Call"
169msgstr "Reveniți la funcția de apelare"
169msgstr "Reveniți la funcția de apelare"
170
170
171−#: qml/Components/Lockscreen.qml:238
171+#: qml/Components/Lockscreen.qml:223
172msgid "Emergency Call"
172msgid "Emergency Call"
173msgstr "Apel de urgență"
173msgstr "Apel de urgență"
174
174
175−#: qml/Components/Lockscreen.qml:270
175+#: qml/Components/Lockscreen.qml:255
176msgid "OK"
176msgid "OK"
177msgstr "În regulă"
177msgstr "În regulă"
178
178
179−#: qml/Dash/GenericScopeView.qml:431 qml/Dash/GenericScopeView.qml:588
179+#: qml/Dash/GenericScopeView.qml:434 qml/Dash/GenericScopeView.qml:591
180msgid "See less"
180msgid "See less"
181msgstr "Afișează mai puține"
181msgstr "Afișează mai puține"
182
182
183−#: qml/Dash/GenericScopeView.qml:431
183+#: qml/Dash/GenericScopeView.qml:434
184msgid "See all"
184msgid "See all"
185msgstr "Afișează tot"
185msgstr "Afișează tot"
186
186
187−#: qml/Dash/GenericScopeView.qml:493 qml/Dash/PageHeader.qml:267
187+#: qml/Dash/GenericScopeView.qml:496 qml/Dash/PageHeader.qml:268
188#: qml/Panel/SearchIndicator.qml:27
188#: qml/Panel/SearchIndicator.qml:27
189msgid "Search"
189msgid "Search"
190msgstr "Căutare"
190msgstr "Căutare"
191
191
192−#: qml/Dash/PageHeader.qml:260
192+#: qml/Dash/PageHeader.qml:261
193msgid "Store"
193msgid "Store"
194msgstr "Magazin"
194msgstr "Magazin"
195
195
196−#: qml/Dash/PageHeader.qml:277
196+#: qml/Dash/PageHeader.qml:278
197msgid "Settings"
197msgid "Settings"
198msgstr "Configurări"
198msgstr "Configurări"
199
199
200−#: qml/Dash/PageHeader.qml:284
200+#: qml/Dash/PageHeader.qml:285
201msgid "Remove from Favorites"
201msgid "Remove from Favorites"
202msgstr "Șterge din favorite"
202msgstr "Șterge din favorite"
203
203
204−#: qml/Dash/PageHeader.qml:284
204+#: qml/Dash/PageHeader.qml:285
205msgid "Add to Favorites"
205msgid "Add to Favorites"
206msgstr "Adaugă la favorite"
206msgstr "Adaugă la favorite"
207
207
@@ -235,15 +235,15 @@ msgstr "Eliberați pentru a actualiza..."
235
235
236#: qml/Dash/ScopesList.qml:63
236#: qml/Dash/ScopesList.qml:63
237msgid "Manage"
237msgid "Manage"
238−msgstr ""
238+msgstr "Administrați"
239
239
240#: qml/Dash/ScopesList.qml:107
240#: qml/Dash/ScopesList.qml:107
241msgid "Home"
241msgid "Home"
242−msgstr ""
242+msgstr "Acasă"
243
243
244#: qml/Dash/ScopesList.qml:108
244#: qml/Dash/ScopesList.qml:108
245msgid "Also installed"
245msgid "Also installed"
246−msgstr ""
246+msgstr "Alte programe instalate"
247
247
248#: qml/Greeter/Greeter.qml:174
248#: qml/Greeter/Greeter.qml:174
249msgid "Unlock"
249msgid "Unlock"
@@ -297,49 +297,49 @@ msgstr "Deblocare SIM"
297msgid "Roaming"
297msgid "Roaming"
298msgstr "Roaming"
298msgstr "Roaming"
299
299
300−#: qml/Shell.qml:367
300+#: qml/Shell.qml:402
301#, qt-format
301#, qt-format
302msgid "Enter %1"
302msgid "Enter %1"
303msgstr "Introducere %1"
303msgstr "Introducere %1"
304
304
305−#: qml/Shell.qml:368 qml/Wizard/Pages/passwd-set.qml:60
305+#: qml/Shell.qml:394
306msgid "Enter passphrase"
306msgid "Enter passphrase"
307msgstr "Introduceți fraza parolă"
307msgstr "Introduceți fraza parolă"
308
308
309−#: qml/Shell.qml:369
309+#: qml/Shell.qml:398
310msgid "Enter passcode"
310msgid "Enter passcode"
311msgstr "Introduceți parola"
311msgstr "Introduceți parola"
312
312
313−#: qml/Shell.qml:370
313+#: qml/Shell.qml:403
314#, qt-format
314#, qt-format
315msgid "Sorry, incorrect %1"
315msgid "Sorry, incorrect %1"
316msgstr "%1 incorectă"
316msgstr "%1 incorectă"
317
317
318−#: qml/Shell.qml:371
318+#: qml/Shell.qml:395
319msgid "Sorry, incorrect passphrase"
319msgid "Sorry, incorrect passphrase"
320msgstr "Frază secretă incorectă"
320msgstr "Frază secretă incorectă"
321
321
322−#: qml/Shell.qml:372
322+#: qml/Shell.qml:396
323msgid "Please re-enter"
323msgid "Please re-enter"
324msgstr "Introduceți din nou"
324msgstr "Introduceți din nou"
325
325
326−#: qml/Shell.qml:373
326+#: qml/Shell.qml:399
327msgid "Sorry, incorrect passcode"
327msgid "Sorry, incorrect passcode"
328msgstr "Parolă incorectă"
328msgstr "Parolă incorectă"
329
329
330−#: qml/Shell.qml:467 qml/Wizard/Pages/passwd-confirm.qml:53
330+#: qml/Shell.qml:444
331msgid "Sorry, incorrect passphrase."
331msgid "Sorry, incorrect passphrase."
332msgstr "Frază parolă greșită"
332msgstr "Frază parolă greșită"
333
333
334−#: qml/Shell.qml:468 qml/Wizard/Pages/passwd-confirm.qml:54
334+#: qml/Shell.qml:445
335msgid "Sorry, incorrect passcode."
335msgid "Sorry, incorrect passcode."
336msgstr "Parolă greșită"
336msgstr "Parolă greșită"
337
337
338−#: qml/Shell.qml:469
338+#: qml/Shell.qml:446
339msgid "This will be your last attempt."
339msgid "This will be your last attempt."
340msgstr "Aceasta va fi ultima încercare"
340msgstr "Aceasta va fi ultima încercare"
341
341
342−#: qml/Shell.qml:471
342+#: qml/Shell.qml:448
343msgid ""
343msgid ""
344"If passphrase is entered incorrectly, your phone will conduct a factory "
344"If passphrase is entered incorrectly, your phone will conduct a factory "
345"reset and all personal data will be deleted."
345"reset and all personal data will be deleted."
@@ -348,7 +348,7 @@ msgstr ""
348"configurările inițiale, ale fabricantului, iar toate datele personale vor fi "
348"configurările inițiale, ale fabricantului, iar toate datele personale vor fi "
349"șterse."
349"șterse."
350
350
351−#: qml/Shell.qml:472
351+#: qml/Shell.qml:449
352msgid ""
352msgid ""
353"If passcode is entered incorrectly, your phone will conduct a factory reset "
353"If passcode is entered incorrectly, your phone will conduct a factory reset "
354"and all personal data will be deleted."
354"and all personal data will be deleted."
@@ -359,98 +359,101 @@ msgstr ""
359
359
360#: qml/Wizard/Page.qml:89
360#: qml/Wizard/Page.qml:89
361msgid "Back"
361msgid "Back"
362−msgstr ""
362+msgstr "Înapoi"
363
363
364#: qml/Wizard/Pages/10-welcome.qml:27
364#: qml/Wizard/Pages/10-welcome.qml:27
365msgid "Hi!"
365msgid "Hi!"
366−msgstr ""
366+msgstr "Salut!"
367
367
368#: qml/Wizard/Pages/10-welcome.qml:44
368#: qml/Wizard/Pages/10-welcome.qml:44
369msgid "Welcome to your Ubuntu phone."
369msgid "Welcome to your Ubuntu phone."
370−msgstr ""
370+msgstr "Bun venit! Acesta este telefonul dumneavoastră Ubuntu."
371
371
372#: qml/Wizard/Pages/10-welcome.qml:52
372#: qml/Wizard/Pages/10-welcome.qml:52
373msgid "Let’s get started."
373msgid "Let’s get started."
374−msgstr ""
374+msgstr "Să începem."
375
375
376#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
376#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
377#: qml/Wizard/Pages/40-wifi.qml:197 qml/Wizard/Pages/50-location.qml:131
377#: qml/Wizard/Pages/40-wifi.qml:197 qml/Wizard/Pages/50-location.qml:131
378#: qml/Wizard/Pages/60-reporting.qml:50 qml/Wizard/Pages/passwd-confirm.qml:82
378#: qml/Wizard/Pages/60-reporting.qml:50 qml/Wizard/Pages/passwd-confirm.qml:82
379#: qml/Wizard/Pages/passwd-set.qml:90
379#: qml/Wizard/Pages/passwd-set.qml:90
380msgid "Continue"
380msgid "Continue"
381−msgstr ""
381+msgstr "Continuare"
382
382
383#: qml/Wizard/Pages/20-sim.qml:25
383#: qml/Wizard/Pages/20-sim.qml:25
384msgid "Add a SIM card and restart your device"
384msgid "Add a SIM card and restart your device"
385−msgstr ""
385+msgstr "Adăugați un card SIM și reporniți dispozitivul dumneavoastră"
386
386
387#: qml/Wizard/Pages/20-sim.qml:55
387#: qml/Wizard/Pages/20-sim.qml:55
388msgid "Without it, you won’t be able to make calls or use text messaging."
388msgid "Without it, you won’t be able to make calls or use text messaging."
389msgstr ""
389msgstr ""
390+"Fără acesta, nu veți putea efectua apeluri sau utiliza mesajele text."
390
391
391#: qml/Wizard/Pages/20-sim.qml:69 qml/Wizard/Pages/40-wifi.qml:197
392#: qml/Wizard/Pages/20-sim.qml:69 qml/Wizard/Pages/40-wifi.qml:197
392msgid "Skip"
393msgid "Skip"
393−msgstr ""
394+msgstr "Se omite"
394
395
395#: qml/Wizard/Pages/30-passwd-type.qml:39
396#: qml/Wizard/Pages/30-passwd-type.qml:39
396msgid "Lock security"
397msgid "Lock security"
397−msgstr ""
398+msgstr "Blocare de securitate"
398
399
399#: qml/Wizard/Pages/30-passwd-type.qml:74
400#: qml/Wizard/Pages/30-passwd-type.qml:74
400msgid "Please select how you’d like to unlock your phone."
401msgid "Please select how you’d like to unlock your phone."
401−msgstr ""
402+msgstr "Alegeți cum doriți să vă deblocați telefonul."
402
403
403#: qml/Wizard/Pages/30-passwd-type.qml:97
404#: qml/Wizard/Pages/30-passwd-type.qml:97
404msgid "Swipe"
405msgid "Swipe"
405−msgstr ""
406+msgstr "Glisare"
406
407
407#: qml/Wizard/Pages/30-passwd-type.qml:98
408#: qml/Wizard/Pages/30-passwd-type.qml:98
408msgid "No security"
409msgid "No security"
409−msgstr ""
410+msgstr "Fară securitate"
410
411
411#: qml/Wizard/Pages/30-passwd-type.qml:100
412#: qml/Wizard/Pages/30-passwd-type.qml:100
412msgid "Passcode"
413msgid "Passcode"
413−msgstr ""
414+msgstr "Cod de acces"
414
415
415#: qml/Wizard/Pages/30-passwd-type.qml:101
416#: qml/Wizard/Pages/30-passwd-type.qml:101
416msgid "4 digits only"
417msgid "4 digits only"
417−msgstr ""
418+msgstr "Doar 4 caractere"
418
419
419#: qml/Wizard/Pages/30-passwd-type.qml:103
420#: qml/Wizard/Pages/30-passwd-type.qml:103
420msgid "Passphrase"
421msgid "Passphrase"
421−msgstr ""
422+msgstr "Frază parolă"
422
423
423#: qml/Wizard/Pages/30-passwd-type.qml:104
424#: qml/Wizard/Pages/30-passwd-type.qml:104
424msgid "Numbers and letters"
425msgid "Numbers and letters"
425−msgstr ""
426+msgstr "Numere și litere"
426
427
427#: qml/Wizard/Pages/40-wifi.qml:28
428#: qml/Wizard/Pages/40-wifi.qml:28
428msgid "Connect to Wi‑Fi"
429msgid "Connect to Wi‑Fi"
429−msgstr ""
430+msgstr "Conectare la Wi-Fi"
430
431
431#: qml/Wizard/Pages/40-wifi.qml:147
432#: qml/Wizard/Pages/40-wifi.qml:147
432msgid "Available networks…"
433msgid "Available networks…"
433−msgstr ""
434+msgstr "Rețele disponibile..."
434
435
435#: qml/Wizard/Pages/40-wifi.qml:148
436#: qml/Wizard/Pages/40-wifi.qml:148
436msgid "No available networks."
437msgid "No available networks."
437−msgstr ""
438+msgstr "Nu sunt rețele disponibile."
438
439
439#: qml/Wizard/Pages/50-location.qml:27
440#: qml/Wizard/Pages/50-location.qml:27
440msgid "Location"
441msgid "Location"
441−msgstr ""
442+msgstr "Loc"
442
443
443#: qml/Wizard/Pages/50-location.qml:62
444#: qml/Wizard/Pages/50-location.qml:62
444msgid "Let the phone detect your location:"
445msgid "Let the phone detect your location:"
445−msgstr ""
446+msgstr "Permiteți telefonului să detecteze locul în care vă aflați:"
446
447
447#: qml/Wizard/Pages/50-location.qml:69
448#: qml/Wizard/Pages/50-location.qml:69
448msgid "Using GPS only (less accurate)"
449msgid "Using GPS only (less accurate)"
449−msgstr ""
450+msgstr "Utilizând numai GPS (mai puțin precis)"
450
451
451#: qml/Wizard/Pages/50-location.qml:86
452#: qml/Wizard/Pages/50-location.qml:86
452msgid "Using GPS, anonymized Wi-Fi and cellular network info (recommended)"
453msgid "Using GPS, anonymized Wi-Fi and cellular network info (recommended)"
453msgstr ""
454msgstr ""
455+"Utilizând GPS, rețelele fără fir în modul anonim și informațiile furnizate "
456+"de rețeaua celulară (recomandat)"
454
457
455#. TRANSLATORS: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
458#. TRANSLATORS: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
456#: qml/Wizard/Pages/50-location.qml:103
459#: qml/Wizard/Pages/50-location.qml:103
@@ -458,81 +461,89 @@ msgid ""
458"By selecting this option you agree to the Nokia HERE <a href='#'>terms and "
461"By selecting this option you agree to the Nokia HERE <a href='#'>terms and "
459"conditions</a>."
462"conditions</a>."
460msgstr ""
463msgstr ""
464+"Prin selectarea acestei opțiuni sunteți de acord cu <a href='#'>termenii și "
465+"condițiile</a> Nokia HERE."
461
466
462#: qml/Wizard/Pages/50-location.qml:112
467#: qml/Wizard/Pages/50-location.qml:112
463msgid "Not at all"
468msgid "Not at all"
464−msgstr ""
469+msgstr "Deloc"
465
470
466#: qml/Wizard/Pages/50-location.qml:124
471#: qml/Wizard/Pages/50-location.qml:124
467msgid "You can change your mind later in <b>System Settings</b>."
472msgid "You can change your mind later in <b>System Settings</b>."
468msgstr ""
473msgstr ""
474+"Puteți să modificați opțiunea utilizând <b>Configurări de sistem</b>."
469
475
470#: qml/Wizard/Pages/60-reporting.qml:24
476#: qml/Wizard/Pages/60-reporting.qml:24
471msgid "Improving your experience"
477msgid "Improving your experience"
472−msgstr ""
478+msgstr "Îmbunătățirea experienței în utilizare"
473
479
474#: qml/Wizard/Pages/60-reporting.qml:36
480#: qml/Wizard/Pages/60-reporting.qml:36
475msgid ""
481msgid ""
476"Your phone is set up to automatically report errors to Canonical and its "
482"Your phone is set up to automatically report errors to Canonical and its "
477"partners, the makers of the operating system."
483"partners, the makers of the operating system."
478msgstr ""
484msgstr ""
485+"Telefonul dumneavoastră este configurat să trimită în mod automat rapoarte "
486+"de erori către Canonical și partenerii săi, producătorii sistemului de "
487+"operare."
479
488
480#: qml/Wizard/Pages/60-reporting.qml:43
489#: qml/Wizard/Pages/60-reporting.qml:43
481msgid ""
490msgid ""
482"This can be disabled in <b>System Settings</b> under <b>Security &amp; "
491"This can be disabled in <b>System Settings</b> under <b>Security &amp; "
483"Privacy</b>"
492"Privacy</b>"
484msgstr ""
493msgstr ""
494+"Acest comportament poate fi dezactivat din <b>Configurări de sistem</b> "
495+"ramura <b>Securitate și confidențialitate</b>"
485
496
486#: qml/Wizard/Pages/80-finished.qml:24
497#: qml/Wizard/Pages/80-finished.qml:24
487msgid "All done"
498msgid "All done"
488−msgstr ""
499+msgstr "Efectuat"
489
500
490#: qml/Wizard/Pages/80-finished.qml:39
501#: qml/Wizard/Pages/80-finished.qml:39
491msgid "Nice work!"
502msgid "Nice work!"
492−msgstr ""
503+msgstr "Bună treabă!"
493
504
494#: qml/Wizard/Pages/80-finished.qml:46
505#: qml/Wizard/Pages/80-finished.qml:46
495msgid "Your phone is now ready to use."
506msgid "Your phone is now ready to use."
496−msgstr ""
507+msgstr "Telefonul dumneavoastră este gata de utilizare."
497
508
498#: qml/Wizard/Pages/80-finished.qml:53
509#: qml/Wizard/Pages/80-finished.qml:53
499msgid "Finish"
510msgid "Finish"
500−msgstr ""
511+msgstr "Sfârșit"
501
512
502#: qml/Wizard/Pages/here-terms.qml:27
513#: qml/Wizard/Pages/here-terms.qml:27
503msgid "Terms & Conditions"
514msgid "Terms & Conditions"
504−msgstr ""
515+msgstr "Termeni și condiții"
505
516
506#: qml/Wizard/Pages/passwd-confirm.qml:49
517#: qml/Wizard/Pages/passwd-confirm.qml:49
507msgid "Confirm passphrase"
518msgid "Confirm passphrase"
508−msgstr ""
519+msgstr "Confirmați frază parolă"
509
520
510#: qml/Wizard/Pages/passwd-confirm.qml:50
521#: qml/Wizard/Pages/passwd-confirm.qml:50
511msgid "Confirm passcode"
522msgid "Confirm passcode"
512−msgstr ""
523+msgstr "Confirmați codul de acces"
513
524
514#: qml/Wizard/Pages/passwd-confirm.qml:53
525#: qml/Wizard/Pages/passwd-confirm.qml:53
515#: qml/Wizard/Pages/passwd-confirm.qml:54
526#: qml/Wizard/Pages/passwd-confirm.qml:54
516msgid "Please try again."
527msgid "Please try again."
517−msgstr ""
528+msgstr "Vă rugăm să încercați din nou."
518
529
519#: qml/Wizard/Pages/passwd-set.qml:61
530#: qml/Wizard/Pages/passwd-set.qml:61
520msgid "Choose your passcode"
531msgid "Choose your passcode"
521−msgstr ""
532+msgstr "Alegeți codul dumneavoastră de acces"
522
533
523#: qml/Wizard/Pages/passwd-set.qml:68
534#: qml/Wizard/Pages/passwd-set.qml:68
524msgid "Passphrase must be 4 characters long"
535msgid "Passphrase must be 4 characters long"
525−msgstr ""
536+msgstr "Codul de acces trebuie să conțină 4 caractere"
526
537
527#: qml/Wizard/StackButton.qml:39
538#: qml/Wizard/StackButton.qml:39
528#, qt-format
539#, qt-format
529msgid "〈 %1"
540msgid "〈 %1"
530−msgstr ""
541+msgstr "〈 %1"
531
542
532#: qml/Wizard/StackButton.qml:42
543#: qml/Wizard/StackButton.qml:42
533#, qt-format
544#, qt-format
534msgid "%1 〉"
545msgid "%1 〉"
535−msgstr ""
546+msgstr "%1 〉"
536
547
537#~ msgid "Confirm"
548#~ msgid "Confirm"
538#~ msgstr "Confirmați"
549#~ msgstr "Confirmați"
qml/Dash/Dash.qml+4−10
@@ -36,9 +36,8 @@ Showable {
36 dashContent.setCurrentScopeAtIndex(index, animate, isSwipe)
36 dashContent.setCurrentScopeAtIndex(index, animate, isSwipe)
37 // Close dash overview and nested temp scopes in it
37 // Close dash overview and nested temp scopes in it
38 if (bottomEdgeController.progress != 0) {
38 if (bottomEdgeController.progress != 0) {
39− bottomEdgeController.enableAnimation = window.active && !scopesOverview.showingNonFavoriteScope;
39+ bottomEdgeController.enableAnimation = window.active;
40 bottomEdgeController.progress = 0;
40 bottomEdgeController.progress = 0;
41− scopesOverview.closeTempScope();
42 }
41 }
43 // Close normal temp scopes (e.g. App Store)
42 // Close normal temp scopes (e.g. App Store)
44 if (scopeItem.scope) {
43 if (scopeItem.scope) {
@@ -335,28 +334,23 @@ Showable {
335 height: units.gu(2)
334 height: units.gu(2)
336
335
337 onSceneDistanceChanged: {
336 onSceneDistanceChanged: {
338− if (status == DirectionalDragArea.Recognized && initialSceneDistance != -1) {
337+ if (status == DirectionalDragArea.Recognized) {
339 bottomEdgeController.enableAnimation = false;
338 bottomEdgeController.enableAnimation = false;
340− var deltaDistance = sceneDistance - initialSceneDistance;
341− bottomEdgeController.progress = Math.max(0, Math.min(1, deltaDistance / fullMovement));
339+ bottomEdgeController.progress = Math.max(0, Math.min(1, sceneDistance / fullMovement));
342 }
340 }
343 }
341 }
344
342
345 property int previousStatus: -1
343 property int previousStatus: -1
346 property int currentStatus: DirectionalDragArea.WaitingForTouch
344 property int currentStatus: DirectionalDragArea.WaitingForTouch
347− property real initialSceneDistance: -1
348
345
349 onStatusChanged: {
346 onStatusChanged: {
350 previousStatus = currentStatus;
347 previousStatus = currentStatus;
351 currentStatus = status;
348 currentStatus = status;
352
349
353− if (status == DirectionalDragArea.Recognized) {
350+ if (status == DirectionalDragArea.WaitingForTouch &&
354− initialSceneDistance = sceneDistance;
355− } else if (status == DirectionalDragArea.WaitingForTouch &&
356 previousStatus == DirectionalDragArea.Recognized) {
351 previousStatus == DirectionalDragArea.Recognized) {
357 bottomEdgeController.enableAnimation = true;
352 bottomEdgeController.enableAnimation = true;
358 bottomEdgeController.progress = (bottomEdgeController.progress > 0.2) ? 1 : 0;
353 bottomEdgeController.progress = (bottomEdgeController.progress > 0.2) ? 1 : 0;
359− initialSceneDistance = -1;
360 }
354 }
361 }
355 }
362 }
356 }
qml/Dash/DashContent.qml+2−2
@@ -113,7 +113,7 @@ Item {
113 objectName: "dashContentList"
113 objectName: "dashContentList"
114
114
115 interactive: !dashContent.forceNonInteractive && dashContent.scopes.loaded && currentItem
115 interactive: !dashContent.forceNonInteractive && dashContent.scopes.loaded && currentItem
116− && !currentItem.moving && !currentItem.navigationShown && !currentItem.subPageShown
116+ && !currentItem.moving && !currentItem.navigationDisableParentInteractive && !currentItem.subPageShown
117 anchors.fill: parent
117 anchors.fill: parent
118 orientation: ListView.Horizontal
118 orientation: ListView.Horizontal
119 boundsBehavior: Flickable.DragAndOvershootBounds
119 boundsBehavior: Flickable.DragAndOvershootBounds
@@ -175,7 +175,7 @@ Item {
175 objectName: "scopeLoader" + index
175 objectName: "scopeLoader" + index
176
176
177 readonly property bool moving: item ? item.moving : false
177 readonly property bool moving: item ? item.moving : false
178− readonly property bool navigationShown: item ? item.navigationShown : false
178+ readonly property bool navigationDisableParentInteractive: item ? item.navigationDisableParentInteractive : false
179 readonly property bool subPageShown: item ? item.subPageShown : false
179 readonly property bool subPageShown: item ? item.subPageShown : false
180 readonly property var categoryView: item ? item.categoryView : null
180 readonly property var categoryView: item ? item.categoryView : null
181 readonly property var theScope: scope
181 readonly property var theScope: scope
qml/Dash/DashNavigation.qml+4
@@ -33,6 +33,10 @@ Item {
33 if (altNavigationButton.showList) return altNavigationButton.listView;
33 if (altNavigationButton.showList) return altNavigationButton.listView;
34 return null;
34 return null;
35 }
35 }
36+ readonly property bool disableParentInteractive: {
37+ return navigationButton.showList || altNavigationButton.showList ||
38+ navigationButton.inverseMousePressed || altNavigationButton.inverseMousePressed;
39+ }
36
40
37 // FIXME this is only here for highlight purposes (see Background.qml, too)
41 // FIXME this is only here for highlight purposes (see Background.qml, too)
38 readonly property var background: backgroundItem
42 readonly property var background: backgroundItem
qml/Dash/DashNavigationButton.qml+2
@@ -31,6 +31,7 @@ AbstractButton {
31 // Used by parent
31 // Used by parent
32 readonly property var currentNavigation: scope && scope[hasNavigation] ? getNavigation(scope[currentNavigationId]) : null
32 readonly property var currentNavigation: scope && scope[hasNavigation] ? getNavigation(scope[currentNavigationId]) : null
33 readonly property alias listView: navigationListView
33 readonly property alias listView: navigationListView
34+ readonly property bool inverseMousePressed: inverseMouseArea.pressed
34 property bool showList: false
35 property bool showList: false
35
36
36 // Internal
37 // Internal
@@ -210,6 +211,7 @@ AbstractButton {
210 onCurrentNavigationChanged: setNewNavigation();
211 onCurrentNavigationChanged: setNewNavigation();
211
212
212 InverseMouseArea {
213 InverseMouseArea {
214+ id: inverseMouseArea
213 anchors.fill: navigationListView
215 anchors.fill: navigationListView
214 enabled: root.showList
216 enabled: root.showList
215 onPressed: root.showList = false
217 onPressed: root.showList = false
qml/Dash/GenericScopeView.qml+3−3
@@ -25,10 +25,10 @@ import "../Components/ListItems" as ListItems
25FocusScope {
25FocusScope {
26 id: scopeView
26 id: scopeView
27
27
28− readonly property bool navigationShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].openList : false
28+ readonly property bool navigationDisableParentInteractive: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].disableParentInteractive : false
29 property bool forceNonInteractive: false
29 property bool forceNonInteractive: false
30 property var scope: null
30 property var scope: null
31− property SortFilterProxyModel categories: categoryFilter
31+ property UnitySortFilterProxyModel categories: categoryFilter
32 property bool isCurrent: false
32 property bool isCurrent: false
33 property alias moving: categoryView.moving
33 property alias moving: categoryView.moving
34 property bool hasBackAction: false
34 property bool hasBackAction: false
@@ -106,7 +106,7 @@ FocusScope {
106 value: isCurrent && !subPageLoader.open
106 value: isCurrent && !subPageLoader.open
107 }
107 }
108
108
109− SortFilterProxyModel {
109+ UnitySortFilterProxyModel {
110 id: categoryFilter
110 id: categoryFilter
111 model: scope ? scope.categories : null
111 model: scope ? scope.categories : null
112 dynamicSortFilter: true
112 dynamicSortFilter: true
qml/Dash/ScopesList.qml+1
@@ -65,6 +65,7 @@ Item {
65 objectName: "pageHeader"
65 objectName: "pageHeader"
66 title: i18n.tr("Manage")
66 title: i18n.tr("Manage")
67 width: parent.width
67 width: parent.width
68+ clip: true
68 showBackButton: true
69 showBackButton: true
69 backIsClose: root.state == "edit"
70 backIsClose: root.state == "edit"
70 storeEntryEnabled: root.state == "browse"
71 storeEntryEnabled: root.state == "browse"
qml/Greeter/Clock.qml+1−1
@@ -53,7 +53,7 @@ Item {
53 menuObjectPath: clock.visible ? "/com/canonical/indicator/datetime/phone" : ""
53 menuObjectPath: clock.visible ? "/com/canonical/indicator/datetime/phone" : ""
54 }
54 }
55
55
56− Indicators.RootActionState {
56+ Indicators.ModelActionRootState {
57 menu: timeModel.model
57 menu: timeModel.model
58 onUpdated: {
58 onUpdated: {
59 if (timeLabel.text != rightLabel) {
59 if (timeLabel.text != rightLabel) {
qml/Greeter/Infographics.qml+9−7
@@ -127,7 +127,7 @@ Item {
127
127
128 index: model.index
128 index: model.index
129 count: pastCircles.count
129 count: pastCircles.count
130− radius: parent.width / 2
130+ radius: dataCircle.width / 2
131 halfSize: pastCircle.width / 2
131 halfSize: pastCircle.width / 2
132 posOffset: 0.0
132 posOffset: 0.0
133
133
@@ -187,7 +187,7 @@ Item {
187
187
188 index: model.index
188 index: model.index
189 count: presentCircles.count
189 count: presentCircles.count
190− radius: parent.width / 2
190+ radius: dataCircle.width / 2
191 halfSize: presentCircle.width / 2
191 halfSize: presentCircle.width / 2
192 posOffset: 0.0
192 posOffset: 0.0
193
193
@@ -255,14 +255,16 @@ Item {
255 interval: animDuration * 0.5; running: false; repeat: true
255 interval: animDuration * 0.5; running: false; repeat: true
256 onTriggered: {
256 onTriggered: {
257 if (dotCounter < dots.count) {
257 if (dotCounter < dots.count) {
258− var nextDot = dots.itemAt(dotCounter++)
258+ var nextDot = dots.itemAt(dotCounter);
259+ if (nextDot) {
259− nextDot.unlockAnimation.start()
260+ nextDot.unlockAnimation.start();
261+ if (++dotCounter == Math.round(dots.count / 2)) {
262+ circleChangeAnimTimer.startFromBeginning();
263+ }
264+ }
260 } else {
265 } else {
261 stop()
266 stop()
262 }
267 }
263− if (dotCounter == Math.round(dots.count / 2)) {
264− circleChangeAnimTimer.startFromBeginning()
265− }
266 }
268 }
267
269
268 function startFromBeginning() {
270 function startFromBeginning() {
qml/Notifications/Notifications.qml+1−1
@@ -29,7 +29,7 @@ ListView {
29 property real margin
29 property real margin
30 property bool useModal: snapDecisionProxyModel.count > 0
30 property bool useModal: snapDecisionProxyModel.count > 0
31
31
32− SortFilterProxyModel {
32+ UnitySortFilterProxyModel {
33 id: snapDecisionProxyModel
33 id: snapDecisionProxyModel
34 objectName: "snapDecisionProxyModel"
34 objectName: "snapDecisionProxyModel"
35
35
qml/Panel/IndicatorItem.qml−8
@@ -45,14 +45,6 @@ IndicatorDelegate {
45 onClicked: parent.clicked()
45 onClicked: parent.clicked()
46 }
46 }
47
47
48− // FIXME: For now we will enable led indicator support only for messaging indicator
49− // in the future we should export a led API insted of doing that,
50− Loader {
51− id: indicatorLed
52− // only load source Component if the icons contains the new message icon
53− source: (root.icons && (String(root.icons).indexOf("indicator-messages-new") != -1)) ? Qt.resolvedUrl("Indicators/IndicatorsLight.qml") : ""
54− }
55−
56 Item {
48 Item {
57 id: mainItems
49 id: mainItems
58 anchors.centerIn: parent
50 anchors.centerIn: parent
qml/Panel/Indicators/IndicatorBase.qml+1−1
@@ -40,7 +40,7 @@ Item {
40 menuObjectPath: indicatorItem.menuObjectPath
40 menuObjectPath: indicatorItem.menuObjectPath
41 }
41 }
42
42
43− RootActionState {
43+ ModelActionRootState {
44 id: rootAction
44 id: rootAction
45 menu: menuModel ? menuModel : null
45 menu: menuModel ? menuModel : null
46 onUpdated: indicatorItem.rootActionStateChanged()
46 onUpdated: indicatorItem.rootActionStateChanged()
qml/Panel/Indicators/IndicatorsLight.qml+19−1
@@ -20,16 +20,34 @@
20import QtQuick 2.0
20import QtQuick 2.0
21import Powerd 0.1
21import Powerd 0.1
22import Lights 0.1
22import Lights 0.1
23+import QMenuModel 0.1 as QMenuModel
24+import Unity.Indicators 0.1 as Indicators
23
25
24QtObject {
26QtObject {
25 id: root
27 id: root
26
28
29+ property var _actionGroup: QMenuModel.QDBusActionGroup {
30+ busType: 1
31+ busName: "com.canonical.indicator.messages"
32+ objectPath: "/com/canonical/indicator/messages"
33+ }
34+
35+ property var _rootState: Indicators.ActionRootState {
36+ actionGroup: _actionGroup
37+ actionName: "messages"
38+ Component.onCompleted: actionGroup.start()
39+
40+ property bool hasMessages: valid && (String(icons).indexOf("indicator-messages-new") != -1)
41+ }
42+
27 Component.onDestruction: Lights.state = Lights.Off
43 Component.onDestruction: Lights.state = Lights.Off
28
44
29 // QtObject does not have children
45 // QtObject does not have children
30 property var _binding: Binding {
46 property var _binding: Binding {
31 target: Lights
47 target: Lights
32 property: "state"
48 property: "state"
49+ value: {
33− value: (Powerd.status === Powerd.Off) ? Lights.On : Lights.Off
50+ return (Powerd.status === Powerd.Off && _rootState.hasMessages) ? Lights.On : Lights.Off
51+ }
34 }
52 }
35}
53}
qml/Panel/Indicators/VisibleIndicators.qml+2−2
@@ -22,13 +22,13 @@ import Unity.Indicators 0.1 as Indicators
22import Utils 0.1
22import Utils 0.1
23
23
24Item {
24Item {
25− property SortFilterProxyModel model: filterModel
25+ property UnitySortFilterProxyModel model: filterModel
26
26
27 function initialise(profile) {
27 function initialise(profile) {
28 indicatorsModel.load(profile);
28 indicatorsModel.load(profile);
29 }
29 }
30
30
31− SortFilterProxyModel {
31+ UnitySortFilterProxyModel {
32 id: filterModel
32 id: filterModel
33 filterRole: Indicators.IndicatorsModelRole.IsVisible
33 filterRole: Indicators.IndicatorsModelRole.IsVisible
34 filterRegExp: RegExp("^true$")
34 filterRegExp: RegExp("^true$")
qml/Panel/IndicatorsMenu.qml+5
@@ -18,6 +18,7 @@ import QtQuick 2.2
18import Ubuntu.Components 1.1
18import Ubuntu.Components 1.1
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import "../Components"
20import "../Components"
21+import "Indicators"
21
22
22Showable {
23Showable {
23 id: root
24 id: root
@@ -60,6 +61,10 @@ Showable {
60 onUnitProgressChanged: d.updateState()
61 onUnitProgressChanged: d.updateState()
61 clip: root.partiallyOpened
62 clip: root.partiallyOpened
62
63
64+ IndicatorsLight {
65+ id: indicatorLights
66+ }
67+
63 // eater
68 // eater
64 MouseArea {
69 MouseArea {
65 anchors.fill: parent
70 anchors.fill: parent
qml/Shell.qml+21−3
@@ -326,7 +326,7 @@ Item {
326 id: inputMethod
326 id: inputMethod
327 objectName: "inputMethod"
327 objectName: "inputMethod"
328 anchors { fill: parent; topMargin: panel.panelHeight }
328 anchors { fill: parent; topMargin: panel.panelHeight }
329− z: notifications.useModal || panel.indicators.shown ? overlay.z + 1 : overlay.z - 1
329+ z: notifications.useModal || panel.indicators.shown || wizard.active ? overlay.z + 1 : overlay.z - 1
330 }
330 }
331
331
332 Connections {
332 Connections {
@@ -403,7 +403,7 @@ Item {
403
403
404 function maybeShow() {
404 function maybeShow() {
405 if (!shell.forcedUnlock) {
405 if (!shell.forcedUnlock) {
406− show()
406+ showNow();
407 }
407 }
408 }
408 }
409
409
@@ -597,6 +597,15 @@ Item {
597 enabled = true;
597 enabled = true;
598 }
598 }
599
599
600+ Timer {
601+ // See powerConnection for why this is useful
602+ id: showGreeterDelayed
603+ interval: 1
604+ onTriggered: {
605+ greeter.showNow();
606+ }
607+ }
608+
600 onShownChanged: {
609 onShownChanged: {
601 if (shown) {
610 if (shown) {
602 // Disable everything so that user can't swipe greeter or
611 // Disable everything so that user can't swipe greeter or
@@ -671,7 +680,16 @@ Item {
671 onStatusChanged: {
680 onStatusChanged: {
672 if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
681 if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
673 !callManager.hasCalls && !tutorial.running) {
682 !callManager.hasCalls && !tutorial.running) {
674− greeter.showNow()
683+ // We don't want to simply call greeter.showNow() here, because
684+ // that will take too long. Qt will delay button event
685+ // handling until the greeter is done loading and may think the
686+ // user held down the power button the whole time, leading to a
687+ // power dialog being shown. Instead, delay showing the
688+ // greeter until we've finished handling the event. We could
689+ // make the greeter load asynchronously instead, but that
690+ // introduces a whole host of timing issues, especially with
691+ // its animations. So this is simpler.
692+ showGreeterDelayed.start();
675 }
693 }
676 }
694 }
677 }
695 }
src/main.cpp−6
@@ -147,12 +147,6 @@ Load the testability driver");
147 view->setSource(source);
147 view->setSource(source);
148 QObject::connect(view->engine(), SIGNAL(quit()), application, SLOT(quit()));
148 QObject::connect(view->engine(), SIGNAL(quit()), application, SLOT(quit()));
149
149
150− if (!isMirServer && qEnvironmentVariableIsSet("UNITY_MIR_EMITS_SIGSTOP")) {
151− // Emit SIGSTOP as expected by upstart, under Mir it's qtmir that will raise it.
152− // see http://upstart.ubuntu.com/cookbook/#expect-stop
153− raise(SIGSTOP);
154− }
155−
156 if (isMirServer || parser.isSet(fullscreenOption)) {
150 if (isMirServer || parser.isSet(fullscreenOption)) {
157 view->showFullScreen();
151 view->showFullScreen();
158 } else {
152 } else {
tests/autopilot/unity8/shell/emulators/create_interactive_notification.py−1
@@ -88,7 +88,6 @@ if __name__ == '__main__':
88 action_id,
88 action_id,
89 action_label,
89 action_label,
90 action_callback,
90 action_callback,
91− None,
92 None
91 None
93 )
92 )
94
93
tests/autopilot/unity8/shell/emulators/edges_demo.pynew file+140
@@ -0,0 +1,140 @@
1+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2+#
3+# Unity Autopilot Test Suite
4+# Copyright (C) 2014 Canonical
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License as published by
8+# the Free Software Foundation, either version 3 of the License, or
9+# (at your option) any later version.
10+#
11+# This program is distributed in the hope that it will be useful,
12+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+# GNU General Public License for more details.
15+#
16+# You should have received a copy of the GNU General Public License
17+# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+#
19+
20+import logging
21+import time
22+
23+import ubuntuuitoolkit
24+
25+import autopilot
26+from autopilot import introspection
27+
28+
29+logger = logging.getLogger(__name__)
30+
31+
32+class RightEdgeDemoOverlay(
33+ ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
34+
35+ @classmethod
36+ def validate_dbus_object(cls, path, state):
37+ name = introspection.get_classname_from_path(path)
38+ if name == b'EdgeDemoOverlay':
39+ if state['edge'][1] == 'right':
40+ return True
41+ return False
42+
43+ @autopilot.logging.log_action(logger.info)
44+ def swipe(self):
45+ """Swipe to the left to complete this demo step."""
46+ x, y, width, height = self.globalRect
47+ start_x = x + width
48+ stop_x = x
49+ start_y = stop_y = y + height // 2
50+ self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
51+ return self.get_root_instance().wait_select_single(
52+ edge='top', active=True)
53+
54+
55+class TopEdgeDemoOverlay(
56+ ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
57+
58+ @classmethod
59+ def validate_dbus_object(cls, path, state):
60+ name = introspection.get_classname_from_path(path)
61+ if name == b'EdgeDemoOverlay':
62+ if state['edge'][1] == 'top':
63+ return True
64+ return False
65+
66+ @autopilot.logging.log_action(logger.info)
67+ def swipe(self):
68+ """Swipe to the bottom to complete this demo step."""
69+ x, y, width, height = self.globalRect
70+ start_x = stop_x = x + width // 2
71+ start_y = y
72+ stop_y = y + height
73+ self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
74+ return self.get_root_instance().wait_select_single(
75+ edge='bottom', active=True)
76+
77+
78+class BottomEdgeDemoOverlay(
79+ ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
80+
81+ @classmethod
82+ def validate_dbus_object(cls, path, state):
83+ name = introspection.get_classname_from_path(path)
84+ if name == b'EdgeDemoOverlay':
85+ if state['edge'][1] == 'bottom':
86+ return True
87+ return False
88+
89+ @autopilot.logging.log_action(logger.info)
90+ def swipe(self):
91+ """Swipe to the top to complete this demo step."""
92+ x, y, width, height = self.globalRect
93+ start_x = stop_x = x + width // 2
94+ start_y = y + height
95+ stop_y = y
96+ self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
97+ return self.get_root_instance().wait_select_single(
98+ edge='left', active=True)
99+
100+
101+class LeftEdgeDemoOverlay(
102+ ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
103+
104+ @classmethod
105+ def validate_dbus_object(cls, path, state):
106+ name = introspection.get_classname_from_path(path)
107+ if name == b'EdgeDemoOverlay':
108+ if state['edge'][1] == 'left':
109+ return True
110+ return False
111+
112+ @autopilot.logging.log_action(logger.info)
113+ def swipe(self):
114+ """Swipe to the right to complete this demo step."""
115+ x, y, width, height = self.globalRect
116+ start_x = x
117+ stop_x = x + width
118+ start_y = stop_y = y + height // 2
119+ self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
120+ return self.get_root_instance().wait_select_single(
121+ edge='none', active=True)
122+
123+
124+class FinalEdgeDemoOverlay(
125+ ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
126+
127+ @classmethod
128+ def validate_dbus_object(cls, path, state):
129+ name = introspection.get_classname_from_path(path)
130+ if name == b'EdgeDemoOverlay':
131+ if state['edge'][1] == 'none':
132+ return True
133+ return False
134+
135+ @autopilot.logging.log_action(logger.info)
136+ def tap_to_start(self):
137+ """Tap to finish the demo and start using the Ubuntu Touch."""
138+ time.sleep(1)
139+ self.pointing_device.click_object(self)
140+ self.shown.wait_for(False)
tests/autopilot/unity8/shell/fixture_setup.py+38
@@ -20,6 +20,7 @@
20"""Set up and clean up fixtures for the Unity acceptance tests."""
20"""Set up and clean up fixtures for the Unity acceptance tests."""
21
21
22import os
22import os
23+import subprocess
23import sysconfig
24import sysconfig
24
25
25import fixtures
26import fixtures
@@ -51,3 +52,40 @@ class FakeScopes(fixtures.Fixture):
51 'Expected library path does not exists: %s.' % (
52 'Expected library path does not exists: %s.' % (
52 ld_library_path))
53 ld_library_path))
53 return ld_library_path
54 return ld_library_path
55+
56+
57+class EdgesDemo(fixtures.Fixture):
58+
59+ def __init__(self, enable):
60+ super().__init__()
61+ self.enable = enable
62+
63+ def setUp(self):
64+ super().setUp()
65+ original_state = self._is_edges_demo_enabled()
66+ if self.enable != original_state:
67+ self.addCleanup(self._set_edges_demo, original_state)
68+ self._set_edges_demo(self.enable)
69+
70+ def _is_edges_demo_enabled(self):
71+ command = [
72+ 'dbus-send', '--system', '--print-reply',
73+ '--dest=org.freedesktop.Accounts',
74+ '/org/freedesktop/Accounts/User32011',
75+ 'org.freedesktop.DBus.Properties.Get',
76+ 'string:com.canonical.unity.AccountsService',
77+ 'string:demo-edges'
78+ ]
79+ output = subprocess.check_output(command, universal_newlines=True)
80+ return True if output.count('true') else False
81+
82+ def _set_edges_demo(self, value):
83+ value_string = 'true' if value else 'false'
84+ command = [
85+ 'dbus-send', '--system', '--print-reply',
86+ '--dest=com.canonical.PropertyService',
87+ '/com/canonical/PropertyService',
88+ 'com.canonical.PropertyService.SetProperty',
89+ 'string:edge', 'boolean:{}'.format(value_string)
90+ ]
91+ subprocess.check_output(command)
tests/autopilot/unity8/shell/tests/test_edges_demo.pynew file+52
@@ -0,0 +1,52 @@
1+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2+#
3+# Unity Autopilot Test Suite
4+# Copyright (C) 2014 Canonical
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License as published by
8+# the Free Software Foundation, either version 3 of the License, or
9+# (at your option) any later version.
10+#
11+# This program is distributed in the hope that it will be useful,
12+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+# GNU General Public License for more details.
15+#
16+# You should have received a copy of the GNU General Public License
17+# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+#
19+
20+from autopilot.matchers import Eventually
21+from testtools.matchers import Equals
22+
23+from unity8.shell import (
24+ fixture_setup,
25+ tests
26+)
27+# unused import to load the edge emulators custom proxy objects.
28+from unity8.shell.emulators import edges_demo # NOQA
29+
30+
31+class EdgesDemoTestCase(tests.UnityTestCase):
32+
33+ def setUp(self):
34+ super().setUp()
35+ self._qml_mock_enabled = False
36+ self._data_dirs_mock_enabled = False
37+ self._lightdm_mock_type = False
38+
39+ self.useFixture(fixture_setup.EdgesDemo(True))
40+ self.unity = self.launch_unity()
41+
42+ def test_complete_edge_demo(self):
43+ edge_demo = self.unity.select_single('EdgeDemo')
44+ self.assertThat(edge_demo.running, Eventually(Equals(True)))
45+ right_edge_overlay = self.unity.wait_select_single(
46+ edge='right', active=True)
47+ top_edge_overlay = right_edge_overlay.swipe()
48+ bottom_edge_overlay = top_edge_overlay.swipe()
49+ left_edge_overlay = bottom_edge_overlay.swipe()
50+ final_overlay = left_edge_overlay.swipe()
51+ final_overlay.tap_to_start()
52+ self.assertThat(edge_demo.running, Eventually(Equals(False)))
tests/mocks/CMakeLists.txt+1
@@ -32,6 +32,7 @@ add_subdirectory(AccountsService)
32add_subdirectory(GSettings.1.0)
32add_subdirectory(GSettings.1.0)
33add_subdirectory(libusermetrics)
33add_subdirectory(libusermetrics)
34add_subdirectory(LightDM)
34add_subdirectory(LightDM)
35+add_subdirectory(Lights)
35add_subdirectory(MeeGo)
36add_subdirectory(MeeGo)
36add_subdirectory(Powerd)
37add_subdirectory(Powerd)
37add_subdirectory(QMenuModel)
38add_subdirectory(QMenuModel)
tests/mocks/LightDM/CMakeLists.txt+1−1
@@ -24,7 +24,7 @@ set(QMLPLUGIN_SRC
24 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
24 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
25 ${CMAKE_SOURCE_DIR}/plugins/LightDM/plugin.cpp
25 ${CMAKE_SOURCE_DIR}/plugins/LightDM/plugin.cpp
26 ${CMAKE_SOURCE_DIR}/plugins/LightDM/UsersModel.cpp
26 ${CMAKE_SOURCE_DIR}/plugins/LightDM/UsersModel.cpp
27− ${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp
27+ ${CMAKE_SOURCE_DIR}/plugins/Utils/unitysortfilterproxymodelqml.cpp
28 )
28 )
29
29
30add_library(MockLightDM-qml MODULE
30add_library(MockLightDM-qml MODULE
tests/mocks/LightDM/Greeter.cpp+6
@@ -129,6 +129,12 @@ void Greeter::authenticate(const QString &username)
129 d->authenticated = false;
129 d->authenticated = false;
130 d->authenticationUser = username;
130 d->authenticationUser = username;
131 d->twoFactorDone = false;
131 d->twoFactorDone = false;
132+ QTimer::singleShot(0, this, SLOT(delayedAuthentication()));
133+}
134+
135+void Greeter::delayedAuthentication()
136+{
137+ Q_D(Greeter);
132 d->handleAuthenticate();
138 d->handleAuthenticate();
133}
139}
134
140
tests/mocks/LightDM/Greeter.h+3
@@ -99,6 +99,9 @@ Q_SIGNALS:
99protected:
99protected:
100 void sendAuthenticationComplete();
100 void sendAuthenticationComplete();
101
101
102+private Q_SLOTS:
103+ void delayedAuthentication();
104+
102private:
105private:
103 GreeterPrivate *d_ptr;
106 GreeterPrivate *d_ptr;
104 Q_DECLARE_PRIVATE(Greeter)
107 Q_DECLARE_PRIVATE(Greeter)
tests/mocks/Lights/CMakeLists.txtnew file+8
@@ -0,0 +1,8 @@
1+add_library(MockLights-qml MODULE
2+ plugin.cpp
3+ Lights.cpp
4+ )
5+
6+qt5_use_modules(MockLights-qml Qml Gui)
7+
8+add_unity8_mock(Lights 0.1 Lights TARGETS MockLights-qml)
tests/mocks/Lights/Lights.cppnew file+84
@@ -0,0 +1,84 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#include "Lights.h"
18+
19+#include <QDebug>
20+
21+Lights::Lights(QObject* parent)
22+ : QObject(parent),
23+ m_color("blue"),
24+ m_state(Lights::Off),
25+ m_onMs(1000),
26+ m_offMs(3000)
27+{
28+}
29+
30+Lights::~Lights()
31+{
32+}
33+
34+void Lights::setState(Lights::State newState)
35+{
36+ if (m_state != newState) {
37+ m_state = newState;
38+ Q_EMIT stateChanged(m_state);
39+ }
40+}
41+
42+Lights::State Lights::state() const
43+{
44+ return m_state;
45+}
46+
47+void Lights::setColor(const QColor &color)
48+{
49+ if (m_color != color) {
50+ m_color = color;
51+ Q_EMIT colorChanged(m_color);
52+ }
53+}
54+
55+QColor Lights::color() const
56+{
57+ return m_color;
58+}
59+
60+int Lights::onMillisec() const
61+{
62+ return m_onMs;
63+}
64+
65+void Lights::setOnMillisec(int onMs)
66+{
67+ if (m_onMs != onMs) {
68+ m_onMs = onMs;
69+ Q_EMIT onMillisecChanged(m_onMs);
70+ }
71+}
72+
73+int Lights::offMillisec() const
74+{
75+ return m_offMs;
76+}
77+
78+void Lights::setOffMillisec(int offMs)
79+{
80+ if (m_offMs != offMs) {
81+ m_offMs = offMs;
82+ Q_EMIT offMillisecChanged(m_offMs);
83+ }
84+}
tests/mocks/Lights/Lights.hnew file+66
@@ -0,0 +1,66 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef UNITY_MOCK_LIGHTS_H
18+#define UNITY_MOCK_LIGHTS_H
19+
20+#include <QtCore/QObject>
21+#include <QtGui/QColor>
22+
23+class Lights: public QObject
24+{
25+ Q_OBJECT
26+ Q_ENUMS(State)
27+ Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)
28+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
29+ Q_PROPERTY(int onMillisec READ onMillisec WRITE setOnMillisec NOTIFY onMillisecChanged)
30+ Q_PROPERTY(int offMillisec READ offMillisec WRITE setOffMillisec NOTIFY offMillisecChanged)
31+
32+public:
33+ enum State {
34+ Off,
35+ On,
36+ };
37+
38+ explicit Lights(QObject *parent = 0);
39+ ~Lights();
40+
41+ void setState(State newState);
42+ State state() const;
43+
44+ void setColor(const QColor &color);
45+ QColor color() const;
46+
47+ int onMillisec() const;
48+ void setOnMillisec(int onMs);
49+
50+ int offMillisec() const;
51+ void setOffMillisec(int offMs);
52+
53+Q_SIGNALS:
54+ void stateChanged(State newState);
55+ void colorChanged(const QColor &color);
56+ void onMillisecChanged(int onMs);
57+ void offMillisecChanged(int offMs);
58+
59+private:
60+ QColor m_color;
61+ State m_state;
62+ int m_onMs;
63+ int m_offMs;
64+};
65+
66+#endif
tests/mocks/Lights/Lights.qmltypesnew file+45
@@ -0,0 +1,45 @@
1+import QtQuick.tooling 1.1
2+
3+// This file describes the plugin-supplied types contained in the library.
4+// It is used for QML tooling purposes only.
5+//
6+// This file was auto-generated by:
7+// 'qmlplugindump -notrelocatable Lights 0.1 tests/mocks'
8+
9+Module {
10+ Component {
11+ name: "Lights"
12+ prototype: "QObject"
13+ exports: ["Lights/Lights 0.1"]
14+ isCreatable: false
15+ isSingleton: true
16+ exportMetaObjectRevisions: [0]
17+ Enum {
18+ name: "State"
19+ values: {
20+ "Off": 0,
21+ "On": 1
22+ }
23+ }
24+ Property { name: "state"; type: "State" }
25+ Property { name: "color"; type: "QColor" }
26+ Property { name: "onMillisec"; type: "int" }
27+ Property { name: "offMillisec"; type: "int" }
28+ Signal {
29+ name: "stateChanged"
30+ Parameter { name: "newState"; type: "State" }
31+ }
32+ Signal {
33+ name: "colorChanged"
34+ Parameter { name: "color"; type: "QColor" }
35+ }
36+ Signal {
37+ name: "onMillisecChanged"
38+ Parameter { name: "onMs"; type: "int" }
39+ }
40+ Signal {
41+ name: "offMillisecChanged"
42+ Parameter { name: "offMs"; type: "int" }
43+ }
44+ }
45+}
tests/mocks/Lights/plugin.cppnew file+33
@@ -0,0 +1,33 @@
1+/*
2+ * Copyright (C) 2012,2013 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#include "plugin.h"
18+#include "Lights.h"
19+
20+#include <QtQml/qqml.h>
21+
22+static QObject *lights_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
23+{
24+ Q_UNUSED(engine)
25+ Q_UNUSED(scriptEngine)
26+ return new Lights();
27+}
28+
29+void PowerdPlugin::registerTypes(const char *uri)
30+{
31+ Q_ASSERT(uri == QLatin1String("Lights"));
32+ qmlRegisterSingletonType<Lights>(uri, 0, 1, "Lights", lights_provider);
33+}
tests/mocks/Lights/plugin.hnew file+32
@@ -0,0 +1,32 @@
1+/*
2+ * Copyright (C) 2012,2013 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef MOCK_POWER_PLUGIN_H
18+#define MOCK_POWER_PLUGIN_H
19+
20+#include <QtQml/QQmlEngine>
21+#include <QtQml/QQmlExtensionPlugin>
22+
23+class PowerdPlugin : public QQmlExtensionPlugin
24+{
25+ Q_OBJECT
26+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27+
28+public:
29+ void registerTypes(const char *uri);
30+};
31+
32+#endif
tests/mocks/Lights/qmldirnew file+3
@@ -0,0 +1,3 @@
1+module Lights
2+plugin MockLights-qml
3+typeinfo Lights.qmltypes
tests/mocks/QMenuModel/CMakeLists.txt+1
@@ -4,6 +4,7 @@ include_directories(
4)
4)
5
5
6set(QMenuModelQml_SOURCES
6set(QMenuModelQml_SOURCES
7+ actiondata.h
7 actionstateparser.cpp
8 actionstateparser.cpp
8 dbus-enums.h
9 dbus-enums.h
9 plugin.cpp
10 plugin.cpp
tests/mocks/QMenuModel/QDBusActionGroup.qml+20−67
@@ -19,81 +19,34 @@
19
19
20import QtQuick 2.0
20import QtQuick 2.0
21import Ubuntu.Settings.Menus 0.1 as Menus
21import Ubuntu.Settings.Menus 0.1 as Menus
22+import QMenuModel 0.1
22
23
23QtObject {
24QtObject {
24 id: actionGroup
25 id: actionGroup
25 property int busType
26 property int busType
26 property string busName
27 property string busName
27 property string objectPath
28 property string objectPath
29+ property var actions: ActionData ? ActionData.data : undefined
30+
31+ signal dataChanged
32+
28 function start() {}
33 function start() {}
34+
29 function action(actionName) {
35 function action(actionName) {
30− switch (actionName) {
31− case "transfer-state.queued":
32− return {
33− 'valid': true,
34− 'state': {
35− 'state': Menus.TransferState.Queued,
36− 'percent': 0.0
37− }
38− }
39− case "transfer-state.running":
40− return {
41− 'valid': true,
42− 'state': {
43− 'state': Menus.TransferState.Running,
44− 'seconds-left': 100,
45− 'percent': 0.1
46− }
47− }
48− case "transfer-state.paused":
49− return {
50− 'valid': true,
51− 'state': {
52− 'state': Menus.TransferState.Paused,
53− 'seconds-left': 100,
54− 'percent': 0.5
55− }
56− }
57− case "transfer-state.cancelled":
58− return {
59− 'valid': true,
60− 'state': {
61− 'state': Menus.TransferState.Canceled,
62− 'percent': 0.4
63− }
64− }
65− case "transfer-state.finished": return {
66− 'valid': true,
67− 'state': {
68− 'state': Menus.TransferState.Finished,
69− 'seconds-left': 0,
70− 'percent': 1.0
71− }
72− }
73− case "transfer-state.error":
74− return {
75− 'valid': true,
76− 'state': {
77− 'state': Menus.TransferState.Error,
78− 'seconds-left': 100,
79− 'percent': 0.0
80− }
81− }
82− case "gps-detection-enabled":
83− case "location-detection-enabled":
84− return Qt.createQmlObject("
36+ return Qt.createQmlObject("
85−import QtQuick 2.3
37+ import QtQuick 2.3
38+ import QMenuModel 0.1
39+
86−QtObject {
40+ QtObject {
87− property bool valid: true
41+ signal activated
88− property bool state: false
42+
89− function activate() {
43+ property string actionName: \"" + actionName + "\"
90− state = !state;
44+ property bool valid: ActionData.data[actionName] != undefined ? ActionData.data[actionName].valid : false
91− }
45+ property var state: ActionData.data[actionName] != undefined ? ActionData.data[actionName].state : undefined
92−}", actionGroup);
93− default:
94− break;
95− }
96
46
97− return null;
47+ function activate() {
48+ activated();
49+ }
50+ }", actionGroup);
98 }
51 }
99}
52}
tests/mocks/QMenuModel/actiondata.hnew file+52
@@ -0,0 +1,52 @@
1+/*
2+ * Copyright (C) 2013 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ *
16+ * Authors: Nick Dedekind <nick.dedekind@canonical.com>
17+ */
18+
19+#ifndef ACTIONDATA_H
20+#define ACTIONDATA_H
21+
22+#include <QObject>
23+#include <QVariant>
24+
25+typedef struct _GVariant GVariant;
26+
27+class Q_DECL_EXPORT ActionData : public QObject
28+{
29+ Q_OBJECT
30+ Q_PROPERTY(QVariant data READ data WRITE setData NOTIFY dataChanged)
31+public:
32+ ActionData(QObject* parent = 0)
33+ : QObject(parent)
34+ {}
35+
36+ QVariant data() const { return m_data; }
37+ void setData(const QVariant& data)
38+ {
39+ if (m_data != data) {
40+ m_data = data;
41+ Q_EMIT dataChanged();
42+ }
43+ }
44+
45+Q_SIGNALS:
46+ void dataChanged();
47+
48+private:
49+ QVariant m_data;
50+};
51+
52+#endif // ACTIONDATA_H
tests/mocks/QMenuModel/plugin.cpp+10
@@ -18,11 +18,19 @@
18
18
19#include "plugin.h"
19#include "plugin.h"
20#include "unitymenumodel.h"
20#include "unitymenumodel.h"
21+#include "actiondata.h"
21#include "actionstateparser.h"
22#include "actionstateparser.h"
22#include "dbus-enums.h"
23#include "dbus-enums.h"
23
24
24#include <QtQml/qqml.h>
25#include <QtQml/qqml.h>
25
26
27+static QObject* actionDataSingleton(QQmlEngine* engine, QJSEngine* scriptEngine)
28+{
29+ Q_UNUSED(engine);
30+ Q_UNUSED(scriptEngine);
31+ return new ActionData;
32+}
33+
26void QMenuModelPlugin::registerTypes(const char *uri)
34void QMenuModelPlugin::registerTypes(const char *uri)
27{
35{
28 Q_ASSERT(uri == QLatin1String("QMenuModel"));
36 Q_ASSERT(uri == QLatin1String("QMenuModel"));
@@ -30,4 +38,6 @@ void QMenuModelPlugin::registerTypes(const char *uri)
30 "DBus is only a namespace");
38 "DBus is only a namespace");
31 qmlRegisterType<UnityMenuModel>(uri, 0, 1, "UnityMenuModel");
39 qmlRegisterType<UnityMenuModel>(uri, 0, 1, "UnityMenuModel");
32 qmlRegisterType<ActionStateParser>(uri, 0, 1, "ActionStateParser");
40 qmlRegisterType<ActionStateParser>(uri, 0, 1, "ActionStateParser");
41+
42+ qmlRegisterSingletonType<ActionData>(uri, 0, 1, "ActionData", actionDataSingleton);
33}
43}
tests/mocks/Unity/Indicators/ActionRootState.qmlnew file+46
@@ -0,0 +1,46 @@
1+/*
2+ * Copyright 2013 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ *
16+ * Authors:
17+ * Nick Dedekind <nick.dedekind@canonical.com>
18+ */
19+
20+import QtQuick 2.0
21+
22+QtObject {
23+ property var actionGroup
24+ property var actionName
25+
26+ property var action: actionGroup ? actionGroup.actions[actionName] : undefined
27+ property var state: action && action.hasOwnProperty("state") ? action.state : undefined
28+
29+ property bool valid: action && action.hasOwnProperty("valid") ? action.valid : false
30+ property string title: state && state.hasOwnProperty("title") ? state["title"] : ""
31+ property string leftLabel: state && state.hasOwnProperty("pre-label") ? state["pre-label"] : ""
32+ property string rightLabel: state && state.hasOwnProperty("label") ? state["label"] : ""
33+ property var icons: state && state.hasOwnProperty("icons") ? state["icons"] : []
34+ property string accessibleName: state && state.hasOwnProperty("accessible-desc") ? state["accessible-desc"] : ""
35+ property bool visible: state && state.hasOwnProperty("visible") ? state["visible"] : true
36+
37+ signal updated
38+
39+ onValidChanged: updated()
40+ onTitleChanged: updated()
41+ onLeftLabelChanged: updated()
42+ onRightLabelChanged: updated()
43+ onIconsChanged: updated()
44+ onAccessibleNameChanged: updated()
45+ onVisibleChanged: updated()
46+}
tests/mocks/Unity/Indicators/RootActionState.qml → tests/mocks/Unity/Indicators/ModelActionRootState.qmlrenamed

The content is the same.

tests/mocks/Unity/Indicators/qmldir+2−1
@@ -2,5 +2,6 @@ module Unity.Indicators
2plugin IndicatorsFakeQml
2plugin IndicatorsFakeQml
3typeinfo Indicators.qmltypes
3typeinfo Indicators.qmltypes
4
4
5+ActionRootState 0.1 ActionRootState.qml
5IndicatorsModel 0.1 IndicatorsModel.qml
6IndicatorsModel 0.1 IndicatorsModel.qml
6−RootActionState 0.1 RootActionState.qml
7+ModelActionRootState 0.1 ModelActionRootState.qml
tests/plugins/LightDM/CMakeLists.txt+4−8
@@ -1,8 +1,8 @@
1−add_executable(test-lightdm-dbus
1+add_executable(GreeterDBusTestExec
2 dbus.cpp
2 dbus.cpp
3 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
3 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
4 )
4 )
5−qt5_use_modules(test-lightdm-dbus Core DBus Quick Test)
5+qt5_use_modules(GreeterDBusTestExec Core DBus Quick Test)
6
6
7include_directories(
7include_directories(
8 ${CMAKE_CURRENT_BINARY_DIR}
8 ${CMAKE_CURRENT_BINARY_DIR}
@@ -11,15 +11,11 @@ include_directories(
11 ${LIBLIGHTDM_INCLUDE_DIRS}
11 ${LIBLIGHTDM_INCLUDE_DIRS}
12 )
12 )
13
13
14−add_dependencies(test-lightdm-dbus MockLightDM-full)
15−target_link_libraries(test-lightdm-dbus
14+target_link_libraries(GreeterDBusTestExec
16 -L${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full
15 -L${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full
17 -llightdm-qt5-2
16 -llightdm-qt5-2
18 )
17 )
19
18
20add_definitions(-DCURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
19add_definitions(-DCURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
21
20
22−add_custom_target(testLightDMDBus xvfb-run --server-args "-screen 0 1024x768x24" --auto-servernum dbus-launch env QML2_IMPORT_PATH=${CMAKE_BINARY_DIR}/tests/mocks LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full ${CMAKE_CURRENT_BINARY_DIR}/test-lightdm-dbus)
21+add_binary_qml_test(GreeterDBus "${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full" MockLightDM-full "QML2_IMPORT_PATH=${CMAKE_BINARY_DIR}/tests/mocks")
23−add_dependencies(testLightDMDBus test-lightdm-dbus)
24−
25−add_dependencies(qmluitests testLightDMDBus)
tests/plugins/LightDM/dbus.cpp+11−2
@@ -16,6 +16,7 @@
16
16
17#include "Greeter.h"
17#include "Greeter.h"
18
18
19+#include <QCoreApplication>
19#include <QDBusInterface>
20#include <QDBusInterface>
20#include <QDBusReply>
21#include <QDBusReply>
21#include <QSignalSpy>
22#include <QSignalSpy>
@@ -149,9 +150,11 @@ private Q_SLOTS:
149 QVERIFY(dbusList->property("EntryIsLocked").toBool());
150 QVERIFY(dbusList->property("EntryIsLocked").toBool());
150
151
151 greeter->authenticate("no-password");
152 greeter->authenticate("no-password");
153+ QCoreApplication::processEvents(); // wait for auth to finish
152 QVERIFY(!dbusList->property("EntryIsLocked").toBool());
154 QVERIFY(!dbusList->property("EntryIsLocked").toBool());
153
155
154 greeter->authenticate("has-password");
156 greeter->authenticate("has-password");
157+ QCoreApplication::processEvents(); // wait for auth to finish
155 QVERIFY(dbusList->property("EntryIsLocked").toBool());
158 QVERIFY(dbusList->property("EntryIsLocked").toBool());
156 }
159 }
157
160
@@ -159,10 +162,16 @@ private Q_SLOTS:
159 {
162 {
160 QSignalSpy spy(this, SIGNAL(PropertiesChangedRelay(QString, QVariantMap, QStringList)));
163 QSignalSpy spy(this, SIGNAL(PropertiesChangedRelay(QString, QVariantMap, QStringList)));
161 greeter->authenticate("no-password");
164 greeter->authenticate("no-password");
165+
166+ // Two property changed signals will be emitted, one for the IsLocked
167+ // property, one for the ActiveEntry; the first will be IsLocked.
162 spy.wait();
168 spy.wait();
169+ if (spy.count() < 2) {
170+ spy.wait();
171+ }
172+ QCOMPARE(spy.count(), 2);
163
173
164− QCOMPARE(spy.count(), 2); // once for locked, once for user; first will be locked mode
165− QList<QVariant> arguments = spy.takeFirst();
174+ QList<QVariant> arguments = spy.takeLast();
166 QVERIFY(arguments.at(0).toString() == "com.canonical.UnityGreeter.List");
175 QVERIFY(arguments.at(0).toString() == "com.canonical.UnityGreeter.List");
167 QVERIFY(arguments.at(1).toMap().contains("EntryIsLocked"));
176 QVERIFY(arguments.at(1).toMap().contains("EntryIsLocked"));
168 QVERIFY(arguments.at(1).toMap()["EntryIsLocked"] == false);
177 QVERIFY(arguments.at(1).toMap()["EntryIsLocked"] == false);
tests/plugins/Unity/Indicators/rootactionstatetest.cpp+4−4
@@ -17,7 +17,7 @@
17 * Nick Dedekind <nick.dedekind@canonical.com>
17 * Nick Dedekind <nick.dedekind@canonical.com>
18 */
18 */
19
19
20−#include "rootactionstate.h"
20+#include "modelactionrootstate.h"
21
21
22#include <unitymenumodel.h>
22#include <unitymenumodel.h>
23#include <QtTest>
23#include <QtTest>
@@ -32,7 +32,7 @@ private Q_SLOTS:
32 {
32 {
33 UnityMenuModel* menuModel = new UnityMenuModel();
33 UnityMenuModel* menuModel = new UnityMenuModel();
34 ActionStateParser* originalParser = menuModel->actionStateParser();
34 ActionStateParser* originalParser = menuModel->actionStateParser();
35− RootActionState* rootState = new RootActionState();
35+ ModelActionRootState* rootState = new ModelActionRootState();
36
36
37 rootState->setMenu(menuModel);
37 rootState->setMenu(menuModel);
38
38
@@ -44,7 +44,7 @@ private Q_SLOTS:
44 void testDeleteUnityMenuModel()
44 void testDeleteUnityMenuModel()
45 {
45 {
46 UnityMenuModel* menuModel = new UnityMenuModel();
46 UnityMenuModel* menuModel = new UnityMenuModel();
47− RootActionState* rootState = new RootActionState();
47+ ModelActionRootState* rootState = new ModelActionRootState();
48
48
49 rootState->setMenu(menuModel);
49 rootState->setMenu(menuModel);
50
50
@@ -77,7 +77,7 @@ private Q_SLOTS:
77
77
78 GVariant* params = g_variant_builder_end (&builderParams);
78 GVariant* params = g_variant_builder_end (&builderParams);
79
79
80− RootActionState rootState;
80+ RootStateParser rootState;
81 QVariant result = rootState.toQVariant(params);
81 QVariant result = rootState.toQVariant(params);
82 g_variant_unref(params);
82 g_variant_unref(params);
83
83
tests/plugins/Utils/CMakeLists.txt+1−1
@@ -23,7 +23,7 @@ endmacro(run_tests)
23
23
24run_tests(
24run_tests(
25 qlimitproxymodeltest
25 qlimitproxymodeltest
26− qsortfilterproxymodeltest
26+ unitysortfilterproxymodeltest
27 timeformattertest
27 timeformattertest
28 )
28 )
29
29
tests/plugins/Utils/qsortfilterproxymodeltest.cpp → tests/plugins/Utils/unitysortfilterproxymodeltest.cpprenamed+14−14
@@ -18,7 +18,7 @@
18 */
18 */
19
19
20// local
20// local
21−#include "qsortfilterproxymodelqml.h"
21+#include "unitysortfilterproxymodelqml.h"
22#include "modeltest.h"
22#include "modeltest.h"
23
23
24// Qt
24// Qt
@@ -91,7 +91,7 @@ private:
91 QHash<int, QByteArray> m_roles;
91 QHash<int, QByteArray> m_roles;
92};
92};
93
93
94−class QSortFilterProxyModelTest : public QObject
94+class UnitySortFilterProxyModelTest : public QObject
95{
95{
96 Q_OBJECT
96 Q_OBJECT
97
97
@@ -103,7 +103,7 @@ private Q_SLOTS:
103
103
104 void testRoleNamesSetAfter()
104 void testRoleNamesSetAfter()
105 {
105 {
106− QSortFilterProxyModelQML proxy;
106+ UnitySortFilterProxyModelQML proxy;
107 MockListModel model;
107 MockListModel model;
108 QHash<int, QByteArray> roles;
108 QHash<int, QByteArray> roles;
109
109
@@ -117,7 +117,7 @@ private Q_SLOTS:
117
117
118 void testRoleNamesSetBefore()
118 void testRoleNamesSetBefore()
119 {
119 {
120− QSortFilterProxyModelQML proxy;
120+ UnitySortFilterProxyModelQML proxy;
121 MockListModel model;
121 MockListModel model;
122 QHash<int, QByteArray> roles;
122 QHash<int, QByteArray> roles;
123
123
@@ -131,7 +131,7 @@ private Q_SLOTS:
131
131
132 void testCountSetAfter()
132 void testCountSetAfter()
133 {
133 {
134− QSortFilterProxyModelQML proxy;
134+ UnitySortFilterProxyModelQML proxy;
135 MockListModel model;
135 MockListModel model;
136 model.insertRows(0, 5);
136 model.insertRows(0, 5);
137
137
@@ -144,7 +144,7 @@ private Q_SLOTS:
144
144
145 void testCountInsert()
145 void testCountInsert()
146 {
146 {
147− QSortFilterProxyModelQML proxy;
147+ UnitySortFilterProxyModelQML proxy;
148 MockListModel model;
148 MockListModel model;
149
149
150 proxy.setModel(&model);
150 proxy.setModel(&model);
@@ -158,7 +158,7 @@ private Q_SLOTS:
158
158
159 void testCountRemove()
159 void testCountRemove()
160 {
160 {
161− QSortFilterProxyModelQML proxy;
161+ UnitySortFilterProxyModelQML proxy;
162 MockListModel model;
162 MockListModel model;
163 model.insertRows(0, 5);
163 model.insertRows(0, 5);
164
164
@@ -173,7 +173,7 @@ private Q_SLOTS:
173 }
173 }
174
174
175 void testInvertMatch() {
175 void testInvertMatch() {
176− QSortFilterProxyModelQML proxy;
176+ UnitySortFilterProxyModelQML proxy;
177 MockListModel model;
177 MockListModel model;
178
178
179 proxy.setModel(&model);
179 proxy.setModel(&model);
@@ -215,7 +215,7 @@ private Q_SLOTS:
215 }
215 }
216
216
217 void testNestedProxyRoleNames() {
217 void testNestedProxyRoleNames() {
218− QSortFilterProxyModelQML proxy1, proxy2;
218+ UnitySortFilterProxyModelQML proxy1, proxy2;
219 MockListModel model;
219 MockListModel model;
220 QHash<int, QByteArray> roles;
220 QHash<int, QByteArray> roles;
221 roles[0] = "role0";
221 roles[0] = "role0";
@@ -229,7 +229,7 @@ private Q_SLOTS:
229 }
229 }
230
230
231 void testModelTest() {
231 void testModelTest() {
232− QSortFilterProxyModelQML proxy;
232+ UnitySortFilterProxyModelQML proxy;
233 MockListModel model;
233 MockListModel model;
234
234
235 proxy.setModel(&model);
235 proxy.setModel(&model);
@@ -246,7 +246,7 @@ private Q_SLOTS:
246 }
246 }
247
247
248 void testModelChanged() {
248 void testModelChanged() {
249− QSortFilterProxyModelQML proxy;
249+ UnitySortFilterProxyModelQML proxy;
250 MockListModel model, model2;
250 MockListModel model, model2;
251
251
252 QSignalSpy spyOnModelChanged(&proxy, SIGNAL(modelChanged()));
252 QSignalSpy spyOnModelChanged(&proxy, SIGNAL(modelChanged()));
@@ -265,7 +265,7 @@ private Q_SLOTS:
265 }
265 }
266
266
267 void testData() {
267 void testData() {
268− QSortFilterProxyModelQML proxy;
268+ UnitySortFilterProxyModelQML proxy;
269 MockListModel model, model2;
269 MockListModel model, model2;
270
270
271 QStringList rows;
271 QStringList rows;
@@ -285,6 +285,6 @@ private Q_SLOTS:
285 }
285 }
286};
286};
287
287
288−QTEST_GUILESS_MAIN(QSortFilterProxyModelTest)
288+QTEST_GUILESS_MAIN(UnitySortFilterProxyModelTest)
289
289
290−#include "qsortfilterproxymodeltest.moc"
290+#include "unitysortfilterproxymodeltest.moc"
tests/qmltests/CMakeLists.txt+1
@@ -78,6 +78,7 @@ add_qml_test(Panel IndicatorsMenu ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DI
78add_qml_test(Panel MenuContent ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
78add_qml_test(Panel MenuContent ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
79add_qml_test(Panel Panel ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
79add_qml_test(Panel Panel ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
80add_qml_test(Panel SearchIndicator)
80add_qml_test(Panel SearchIndicator)
81+add_qml_test(Panel/Indicators IndicatorsLight ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
81# These MenuItemFactory tests need the test/mocks/ to come before plugins/
82# These MenuItemFactory tests need the test/mocks/ to come before plugins/
82add_qml_test(Panel/Indicators MenuItemFactory IMPORT_PATHS ${CMAKE_BINARY_DIR}/tests/mocks ${qmltest_DEFAULT_IMPORT_PATHS})
83add_qml_test(Panel/Indicators MenuItemFactory IMPORT_PATHS ${CMAKE_BINARY_DIR}/tests/mocks ${qmltest_DEFAULT_IMPORT_PATHS})
83add_qml_test(Panel/Indicators MessageMenuItemFactory IMPORT_PATHS ${CMAKE_BINARY_DIR}/tests/mocks ${qmltest_DEFAULT_IMPORT_PATHS})
84add_qml_test(Panel/Indicators MessageMenuItemFactory IMPORT_PATHS ${CMAKE_BINARY_DIR}/tests/mocks ${qmltest_DEFAULT_IMPORT_PATHS})
tests/qmltests/Components/tst_Carousel.qml+5−5
@@ -274,20 +274,20 @@ Item {
274
274
275 spy.signalName = "clicked";
275 spy.signalName = "clicked";
276 spy.target = carouselItem;
276 spy.target = carouselItem;
277− mouseClick(carouselItem, carouselItem.width / 2, carouselItem.height / 2);
277+ mouseClick(carouselItem);
278 tryCompare(carouselList, "moving", false);
278 tryCompare(carouselList, "moving", false);
279 tryCompare(carouselItem, "explicitlyScaled", true);
279 tryCompare(carouselItem, "explicitlyScaled", true);
280− mouseClick(carouselItem, carouselItem.width / 2, carouselItem.height / 2);
280+ mouseClick(carouselItem);
281 spy.wait();
281 spy.wait();
282
282
283 spy.signalName = "pressAndHold";
283 spy.signalName = "pressAndHold";
284 spy.target = carouselItem;
284 spy.target = carouselItem;
285− mouseClick(carouselItem, carouselItem.width / 2, carouselItem.height / 2);
285+ mouseClick(carouselItem);
286 tryCompare(carouselList, "moving", false);
286 tryCompare(carouselList, "moving", false);
287 tryCompare(carouselItem, "explicitlyScaled", true);
287 tryCompare(carouselItem, "explicitlyScaled", true);
288− mousePress(carouselItem, carouselItem.width / 2, carouselItem.height / 2);
288+ mousePress(carouselItem);
289 spy.wait();
289 spy.wait();
290− mouseRelease(carouselItem, carouselItem.width / 2, carouselItem.height / 2);
290+ mouseRelease(carouselItem);
291 }
291 }
292 }
292 }
293}
293}
tests/qmltests/Components/tst_Lockscreen.qml+1−1
@@ -421,7 +421,7 @@ Rectangle {
421 signalSpy.clear();
421 signalSpy.clear();
422
422
423 var okButton = findChild(root, "infoPopupOkButton");
423 var okButton = findChild(root, "infoPopupOkButton");
424− mouseClick(okButton, okButton.width / 2, okButton.height / 2);
424+ mouseClick(okButton);
425
425
426 tryCompareFunction(function() { return findChild(root, "infoPopup") === null}, true);
426 tryCompareFunction(function() { return findChild(root, "infoPopup") === null}, true);
427
427
tests/qmltests/Components/tst_ResponsiveVerticalJournal.qml+1−1
@@ -79,7 +79,7 @@ Item {
79 ListElement { name: "U" }
79 ListElement { name: "U" }
80 }
80 }
81
81
82− SortFilterProxyModel {
82+ UnitySortFilterProxyModel {
83 id: wrappedFakeModel
83 id: wrappedFakeModel
84 model: fakeModel
84 model: fakeModel
85 }
85 }
tests/qmltests/Dash/Previews/tst_PreviewActions.qml+3−3
@@ -104,7 +104,7 @@ Rectangle {
104 var button = findChild(root, "button" + id);
104 var button = findChild(root, "button" + id);
105 verify(button != null);
105 verify(button != null);
106 spy.target = target;
106 spy.target = target;
107− mouseClick(button, button.width / 2, button.height / 2);
107+ mouseClick(button);
108 compare(spy.count, 1);
108 compare(spy.count, 1);
109 compare(spy.signalArguments[0][0], target.widgetId);
109 compare(spy.signalArguments[0][0], target.widgetId);
110 compare(spy.signalArguments[0][1], id);
110 compare(spy.signalArguments[0][1], id);
@@ -137,11 +137,11 @@ Rectangle {
137 var buttonColumn = findChild(root, "buttonColumn");
137 var buttonColumn = findChild(root, "buttonColumn");
138 verify(button != null);
138 verify(button != null);
139 var twoActionsY = twoActions.y
139 var twoActionsY = twoActions.y
140− mouseClick(button, button.width / 2, button.height / 2);
140+ mouseClick(button);
141 tryCompareFunction(function () { return twoActions.y <= twoActionsY; }, false);
141 tryCompareFunction(function () { return twoActions.y <= twoActionsY; }, false);
142 tryCompare(buttonColumn, "height", buttonColumn.implicitHeight);
142 tryCompare(buttonColumn, "height", buttonColumn.implicitHeight);
143 checkButtonPressSignal(buttonAndCombo, data.id, data.buttonNumber);
143 checkButtonPressSignal(buttonAndCombo, data.id, data.buttonNumber);
144− mouseClick(button, button.width / 2, button.height / 2);
144+ mouseClick(button);
145 tryCompare(twoActions, "y", twoActionsY);
145 tryCompare(twoActions, "y", twoActionsY);
146 }
146 }
147 }
147 }
tests/qmltests/Dash/Previews/tst_PreviewAudioPlayback.qml+5−5
@@ -131,7 +131,7 @@ Rectangle {
131 compare(track2ProgressBar.visible, false);
131 compare(track2ProgressBar.visible, false);
132
132
133 // Playing track 0 should make progress bar 0 visible
133 // Playing track 0 should make progress bar 0 visible
134− mouseClick(track0PlayButton, track0PlayButton.width / 2, track0PlayButton.height / 2);
134+ mouseClick(track0PlayButton);
135
135
136 tryCompare(audio, "playbackState", Audio.PlayingState);
136 tryCompare(audio, "playbackState", Audio.PlayingState);
137 checkPlayerSource(0);
137 checkPlayerSource(0);
@@ -141,18 +141,18 @@ Rectangle {
141 tryCompare(track2ProgressBar, "visible", false);
141 tryCompare(track2ProgressBar, "visible", false);
142
142
143 // Clicking the button again should pause it. The progress bar should stay visible
143 // Clicking the button again should pause it. The progress bar should stay visible
144− mouseClick(track0PlayButton, track0PlayButton.width / 2, track0PlayButton.height / 2);
144+ mouseClick(track0PlayButton);
145 tryCompare(audio, "playbackState", Audio.PausedState);
145 tryCompare(audio, "playbackState", Audio.PausedState);
146 checkPlayerSource(0);
146 checkPlayerSource(0);
147 tryCompare(track0ProgressBar, "visible", true);
147 tryCompare(track0ProgressBar, "visible", true);
148
148
149 // Continue playback
149 // Continue playback
150− mouseClick(track0PlayButton, track0PlayButton.width / 2, track0PlayButton.height / 2);
150+ mouseClick(track0PlayButton);
151 tryCompare(audio, "playbackState", Audio.PlayingState);
151 tryCompare(audio, "playbackState", Audio.PlayingState);
152 checkPlayerSource(0);
152 checkPlayerSource(0);
153
153
154 // Playing track 1 should make progress bar 1 visible and hide progress bar 0 again
154 // Playing track 1 should make progress bar 1 visible and hide progress bar 0 again
155− mouseClick(track1PlayButton, track1PlayButton.width / 2, track1PlayButton.height / 2);
155+ mouseClick(track1PlayButton);
156
156
157 tryCompare(audio, "playbackState", Audio.PlayingState);
157 tryCompare(audio, "playbackState", Audio.PlayingState);
158 checkPlayerSource(1);
158 checkPlayerSource(1);
@@ -162,7 +162,7 @@ Rectangle {
162 tryCompare(track2ProgressBar, "visible", false);
162 tryCompare(track2ProgressBar, "visible", false);
163
163
164 // Playing track 2 should make progress bar 1 visible and hide progress bar 0 again
164 // Playing track 2 should make progress bar 1 visible and hide progress bar 0 again
165− mouseClick(track2PlayButton, track2PlayButton.width / 2, track2PlayButton.height / 2);
165+ mouseClick(track2PlayButton);
166
166
167 tryCompare(audio, "playbackState", Audio.PlayingState);
167 tryCompare(audio, "playbackState", Audio.PlayingState);
168 checkPlayerSource(2);
168 checkPlayerSource(2);
tests/qmltests/Dash/Previews/tst_PreviewExpandable.qml+2−2
@@ -85,7 +85,7 @@ Rectangle {
85
85
86 function test_expand_collapse() {
86 function test_expand_collapse() {
87 var expandButton = findChild(previewExpandable, "expandButton")
87 var expandButton = findChild(previewExpandable, "expandButton")
88− mouseClick(expandButton, expandButton.width / 2, expandButton.height / 2);
88+ mouseClick(expandButton);
89
89
90 var repeater = findChild(previewExpandable, "repeater")
90 var repeater = findChild(previewExpandable, "repeater")
91 compare(repeater.count, 4)
91 compare(repeater.count, 4)
@@ -99,7 +99,7 @@ Rectangle {
99 compare (repeater.itemAt(2).expanded, true);
99 compare (repeater.itemAt(2).expanded, true);
100 compare (repeater.itemAt(3).expanded, true);
100 compare (repeater.itemAt(3).expanded, true);
101
101
102− mouseClick(expandButton, expandButton.width / 2, expandButton.height / 2);
102+ mouseClick(expandButton);
103
103
104 checkInitialState();
104 checkInitialState();
105 }
105 }
tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml+6−6
@@ -67,23 +67,23 @@ Rectangle {
67
67
68 function test_overlayOpenClose() {
68 function test_overlayOpenClose() {
69 var image0 = findChild(imageGallery, "previewImage0");
69 var image0 = findChild(imageGallery, "previewImage0");
70− mouseClick(image0, image0.width / 2, image0.height / 2);
70+ mouseClick(image0);
71 tryCompare(overlay, "visible", true);
71 tryCompare(overlay, "visible", true);
72 tryCompare(overlay, "scale", 1.0);
72 tryCompare(overlay, "scale", 1.0);
73 tryCompare(overlayCloseButton, "visible", true);
73 tryCompare(overlayCloseButton, "visible", true);
74− mouseClick(overlayCloseButton, overlayCloseButton.width / 2, overlayCloseButton.height / 2);
74+ mouseClick(overlayCloseButton);
75 tryCompare(overlay, "visible", false);
75 tryCompare(overlay, "visible", false);
76 }
76 }
77
77
78 function test_overlayShowHideHeader() {
78 function test_overlayShowHideHeader() {
79 var image0 = findChild(imageGallery, "previewImage0");
79 var image0 = findChild(imageGallery, "previewImage0");
80− mouseClick(image0, image0.width / 2, image0.height / 2);
80+ mouseClick(image0);
81 tryCompare(overlay, "visible", true);
81 tryCompare(overlay, "visible", true);
82 tryCompare(overlay, "scale", 1.0);
82 tryCompare(overlay, "scale", 1.0);
83 tryCompare(overlayCloseButton, "visible", true);
83 tryCompare(overlayCloseButton, "visible", true);
84− mouseClick(overlay, overlay.width / 2, overlay.height / 2);
84+ mouseClick(overlay);
85 tryCompare(overlayCloseButton, "visible", false);
85 tryCompare(overlayCloseButton, "visible", false);
86− mouseClick(overlay, overlay.width / 2, overlay.height / 2);
86+ mouseClick(overlay);
87 tryCompare(overlayCloseButton, "visible", true);
87 tryCompare(overlayCloseButton, "visible", true);
88 }
88 }
89
89
@@ -97,7 +97,7 @@ Rectangle {
97
97
98 function test_overlayOpenCorrectImage(data) {
98 function test_overlayOpenCorrectImage(data) {
99 var image = findChild(imageGallery, "previewImage" + data.index);
99 var image = findChild(imageGallery, "previewImage" + data.index);
100− mouseClick(image, image.width / 2, image.height / 2);
100+ mouseClick(image);
101 tryCompare(overlay, "visible", true);
101 tryCompare(overlay, "visible", true);
102 tryCompare(overlay, "scale", 1.0);
102 tryCompare(overlay, "scale", 1.0);
103 tryCompare(overlayListView, "currentIndex", data.index);
103 tryCompare(overlayListView, "currentIndex", data.index);
tests/qmltests/Dash/Previews/tst_PreviewPayments.qml+5−5
@@ -84,7 +84,7 @@ Rectangle {
84 var button = findChild(previewPayments, "paymentButton");
84 var button = findChild(previewPayments, "paymentButton");
85 verify(button, "Button not found.");
85 verify(button, "Button not found.");
86
86
87− mouseClick(button, button.width / 2, button.height / 2);
87+ mouseClick(button);
88
88
89 paymentClient.process();
89 paymentClient.process();
90 spy.wait();
90 spy.wait();
@@ -107,7 +107,7 @@ Rectangle {
107 tryCompare(button, "visible", true);
107 tryCompare(button, "visible", true);
108 tryCompare(button, "opacity", 1);
108 tryCompare(button, "opacity", 1);
109
109
110− mouseClick(button, button.width / 2, button.height / 2);
110+ mouseClick(button);
111
111
112 paymentClient.process();
112 paymentClient.process();
113 spy.wait();
113 spy.wait();
@@ -130,7 +130,7 @@ Rectangle {
130 tryCompare(button, "visible", true);
130 tryCompare(button, "visible", true);
131 tryCompare(button, "opacity", 1);
131 tryCompare(button, "opacity", 1);
132
132
133− mouseClick(button, button.width / 2, button.height / 2);
133+ mouseClick(button);
134
134
135 tryCompare(progress, "visible", true);
135 tryCompare(progress, "visible", true);
136 tryCompare(progress, "opacity", 1);
136 tryCompare(progress, "opacity", 1);
@@ -154,7 +154,7 @@ Rectangle {
154 var button = findChild(previewPayments, "paymentButton");
154 var button = findChild(previewPayments, "paymentButton");
155 verify(button, "Button not found.");
155 verify(button, "Button not found.");
156
156
157− mouseClick(button, button.width / 2, button.height / 2);
157+ mouseClick(button);
158
158
159 paymentClient.process();
159 paymentClient.process();
160 spy.wait();
160 spy.wait();
@@ -175,7 +175,7 @@ Rectangle {
175 verify(button, "Button not found.");
175 verify(button, "Button not found.");
176 verify(progress, "Progress not found.");
176 verify(progress, "Progress not found.");
177
177
178− mouseClick(button, button.width / 2, button.height / 2);
178+ mouseClick(button);
179
179
180 tryCompare(progress, "visible", true);
180 tryCompare(progress, "visible", true);
181 tryCompare(progress, "opacity", 1);
181 tryCompare(progress, "opacity", 1);
tests/qmltests/Dash/Previews/tst_PreviewRatingDisplay.qml+1−1
@@ -118,7 +118,7 @@ Rectangle {
118 compare(rating.value, reviewsModel1["reviews"][1]["rating"]);
118 compare(rating.value, reviewsModel1["reviews"][1]["rating"]);
119
119
120 // Tap on first star
120 // Tap on first star
121− mouseClick(rating, 0, 0);
121+ mouseClick(rating);
122 compare(rating.value, reviewsModel1["reviews"][1]["rating"]);
122 compare(rating.value, reviewsModel1["reviews"][1]["rating"]);
123 }
123 }
124 }
124 }
tests/qmltests/Dash/Previews/tst_PreviewRatingInput.qml+2−2
@@ -139,7 +139,7 @@ Rectangle {
139 verify(reviewTextArea.visible === true);
139 verify(reviewTextArea.visible === true);
140
140
141 reviewTextArea.text = data.inputText;
141 reviewTextArea.text = data.inputText;
142− mouseClick(submitButton, submitButton.width / 2, submitButton.height / 2);
142+ mouseClick(submitButton);
143 switch (data.widgetData["required"]) {
143 switch (data.widgetData["required"]) {
144 case "rating": {
144 case "rating": {
145 if (rating.visible === false || data.inputRating < 0) {
145 if (rating.visible === false || data.inputRating < 0) {
@@ -187,7 +187,7 @@ Rectangle {
187 if (data.inputRating > 0) rating.value = data.inputRating;
187 if (data.inputRating > 0) rating.value = data.inputRating;
188 if (data.inputText !== "") {
188 if (data.inputText !== "") {
189 reviewTextArea.text = data.inputText;
189 reviewTextArea.text = data.inputText;
190− mouseClick(submitButton, submitButton.width / 2, submitButton.height / 2);
190+ mouseClick(submitButton);
191 }
191 }
192
192
193 compare(spy.count, 1);
193 compare(spy.count, 1);
tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml+2−2
@@ -72,11 +72,11 @@ Rectangle {
72
72
73 function test_zoomableImageOpenClose() {
73 function test_zoomableImageOpenClose() {
74 var overlayCloseButton = findChild(overlay, "overlayCloseButton");
74 var overlayCloseButton = findChild(overlay, "overlayCloseButton");
75− mouseClick(lazyImage, lazyImage.width / 2, lazyImage.height / 2);
75+ mouseClick(lazyImage);
76 tryCompare(overlay, "visible", true);
76 tryCompare(overlay, "visible", true);
77 tryCompare(overlay, "scale", 1.0);
77 tryCompare(overlay, "scale", 1.0);
78 tryCompare(overlayCloseButton, "visible", true);
78 tryCompare(overlayCloseButton, "visible", true);
79− mouseClick(overlayCloseButton, overlayCloseButton.width / 2, overlayCloseButton.height / 2);
79+ mouseClick(overlayCloseButton);
80 tryCompare(overlay, "visible", false);
80 tryCompare(overlay, "visible", false);
81 }
81 }
82 }
82 }
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingBoolean.qml+2−2
@@ -49,12 +49,12 @@ Rectangle {
49
49
50 function test_updated() {
50 function test_updated() {
51 var control = findChild(scopeSetting, "control");
51 var control = findChild(scopeSetting, "control");
52− mouseClick(control, control.width / 2, control.height / 2);
52+ mouseClick(control);
53 spy.wait();
53 spy.wait();
54 compare(spy.signalArguments[0][0], false);
54 compare(spy.signalArguments[0][0], false);
55
55
56 spy.clear();
56 spy.clear();
57− mouseClick(scopeSetting, scopeSetting.width / 2, scopeSetting.height / 2);
57+ mouseClick(scopeSetting);
58 spy.wait();
58 spy.wait();
59 compare(spy.signalArguments[0][0], true);
59 compare(spy.signalArguments[0][0], true);
60 }
60 }
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingNumber.qml+3−3
@@ -57,7 +57,7 @@ Rectangle {
57 }
57 }
58
58
59 function test_updated_on_unfocus() {
59 function test_updated_on_unfocus() {
60− mouseClick(control, control.width / 2, control.height / 2);
60+ mouseClick(control);
61 control.selectAll();
61 control.selectAll();
62 control.cut();
62 control.cut();
63 control.insert(0, newNumber);
63 control.insert(0, newNumber);
@@ -67,7 +67,7 @@ Rectangle {
67 }
67 }
68
68
69 function test_updated_on_accepted() {
69 function test_updated_on_accepted() {
70− mouseClick(control, control.width / 2, control.height / 2);
70+ mouseClick(control);
71 control.selectAll();
71 control.selectAll();
72 control.cut();
72 control.cut();
73 control.insert(0, newNumber);
73 control.insert(0, newNumber);
@@ -86,7 +86,7 @@ Rectangle {
86 }
86 }
87
87
88 function test_unacceptable_input() {
88 function test_unacceptable_input() {
89− mouseClick(control, control.width / 2, control.height / 2);
89+ mouseClick(control);
90 control.selectAll();
90 control.selectAll();
91 control.cut();
91 control.cut();
92 control.insert(0, "not valid");
92 control.insert(0, "not valid");
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingString.qml+2−2
@@ -57,7 +57,7 @@ Rectangle {
57 }
57 }
58
58
59 function test_updated_on_unfocus() {
59 function test_updated_on_unfocus() {
60− mouseClick(control, control.width / 2, control.height / 2);
60+ mouseClick(control);
61 control.selectAll();
61 control.selectAll();
62 control.cut();
62 control.cut();
63 control.insert(0, newText);
63 control.insert(0, newText);
@@ -67,7 +67,7 @@ Rectangle {
67 }
67 }
68
68
69 function test_updated_on_accepted() {
69 function test_updated_on_accepted() {
70− mouseClick(control, control.width / 2, control.height / 2);
70+ mouseClick(control);
71 control.selectAll();
71 control.selectAll();
72 control.cut();
72 control.cut();
73 control.insert(0, newText);
73 control.insert(0, newText);
tests/qmltests/Dash/tst_Card.qml+2−2
@@ -539,9 +539,9 @@ Rectangle {
539 var touchdown = findChild(card, "touchdown");
539 var touchdown = findChild(card, "touchdown");
540
540
541 compare(touchdown.visible, false);
541 compare(touchdown.visible, false);
542− mousePress(card, card.width/2, card.height/2);
542+ mousePress(card);
543 compare(touchdown.visible, true);
543 compare(touchdown.visible, true);
544− mouseRelease(card, card.width/2, card.height/2);
544+ mouseRelease(card);
545 compare(touchdown.visible, false);
545 compare(touchdown.visible, false);
546 }
546 }
547
547
tests/qmltests/Dash/tst_Dash.qml+42−25
@@ -89,8 +89,8 @@ Item {
89 // Go back
89 // Go back
90 var scopesList = findChild(dash, "scopesList");
90 var scopesList = findChild(dash, "scopesList");
91 var scopesListPageHeader = findChild(scopesList, "pageHeader");
91 var scopesListPageHeader = findChild(scopesList, "pageHeader");
92− var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton");
92+ var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");
93− mouseClick(backButton, 0, 0);
93+ mouseClick(backButton);
94 tryCompare(bottomEdgeController, "progress", 0);
94 tryCompare(bottomEdgeController, "progress", 0);
95 }
95 }
96
96
@@ -106,7 +106,7 @@ Item {
106 tryCompare(favScopesListCategoryList, "currentIndex", 0);
106 tryCompare(favScopesListCategoryList, "currentIndex", 0);
107
107
108 // Click in first item
108 // Click in first item
109− mouseClick(favScopesListCategoryList.currentItem, 0, 0);
109+ mouseClick(favScopesListCategoryList.currentItem);
110
110
111 // Make sure animation went back
111 // Make sure animation went back
112 tryCompare(bottomEdgeController, "progress", 0);
112 tryCompare(bottomEdgeController, "progress", 0);
@@ -128,7 +128,7 @@ Item {
128
128
129 // Click in second item
129 // Click in second item
130 favScopesListCategoryList.currentIndex = 1;
130 favScopesListCategoryList.currentIndex = 1;
131− mouseClick(favScopesListCategoryList.currentItem, 0, 0);
131+ mouseClick(favScopesListCategoryList.currentItem);
132
132
133 // Make sure animation went back
133 // Make sure animation went back
134 tryCompare(bottomEdgeController, "progress", 0);
134 tryCompare(bottomEdgeController, "progress", 0);
@@ -148,7 +148,7 @@ Item {
148 tryCompare(nonfavScopesListCategoryList, "currentIndex", 0);
148 tryCompare(nonfavScopesListCategoryList, "currentIndex", 0);
149
149
150 // Click on a non favorite scope
150 // Click on a non favorite scope
151− mouseClick(nonfavScopesListCategoryList.currentItem, 0, 0);
151+ mouseClick(nonfavScopesListCategoryList.currentItem);
152
152
153 // Check the bottom edge (manage dash) is disabled from temp scope
153 // Check the bottom edge (manage dash) is disabled from temp scope
154 var overviewDragHandle = findChild(dash, "overviewDragHandle");
154 var overviewDragHandle = findChild(dash, "overviewDragHandle");
@@ -164,8 +164,8 @@ Item {
164
164
165 // Go back
165 // Go back
166 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
166 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
167− var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "backButton");
167+ var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");
168− mouseClick(backButton, 0, 0);
168+ mouseClick(backButton);
169
169
170 // Check temp scope is gone
170 // Check temp scope is gone
171 tryCompare(dashTempScopeItem, "x", dash.width);
171 tryCompare(dashTempScopeItem, "x", dash.width);
@@ -189,7 +189,7 @@ Item {
189 var scopesList = findChild(dash, "scopesList");
189 var scopesList = findChild(dash, "scopesList");
190 var scopesListPageHeader = findChild(scopesList, "pageHeader");
190 var scopesListPageHeader = findChild(scopesList, "pageHeader");
191 var searchButton = findChild(scopesListPageHeader, "search_header_button");
191 var searchButton = findChild(scopesListPageHeader, "search_header_button");
192− mouseClick(searchButton, 0, 0);
192+ mouseClick(searchButton);
193
193
194 // Type something
194 // Type something
195 keyClick(Qt.Key_H);
195 keyClick(Qt.Key_H);
@@ -201,7 +201,7 @@ Item {
201 var cardTempScope = findChild(dashCategorysearchA, "delegate2");
201 var cardTempScope = findChild(dashCategorysearchA, "delegate2");
202
202
203 waitForRendering(cardTempScope);
203 waitForRendering(cardTempScope);
204− mouseClick(cardTempScope, cardTempScope.width / 2, cardTempScope.height / 2);
204+ mouseClick(cardTempScope);
205
205
206 // Check the bottom edge (overview) is disabled from temp scope
206 // Check the bottom edge (overview) is disabled from temp scope
207 var overviewDragHandle = findChild(dash, "overviewDragHandle");
207 var overviewDragHandle = findChild(dash, "overviewDragHandle");
@@ -217,8 +217,8 @@ Item {
217
217
218 // Go back
218 // Go back
219 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
219 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
220− var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "backButton");
220+ var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");
221− mouseClick(backButton, 0, 0);
221+ mouseClick(backButton);
222
222
223 // Check temp scope is gone
223 // Check temp scope is gone
224 tryCompare(dashTempScopeItem, "x", dash.width);
224 tryCompare(dashTempScopeItem, "x", dash.width);
@@ -243,8 +243,8 @@ Item {
243 // Go back
243 // Go back
244 var scopesList = findChild(dash, "scopesList");
244 var scopesList = findChild(dash, "scopesList");
245 var scopesListPageHeader = findChild(scopesList, "pageHeader");
245 var scopesListPageHeader = findChild(scopesList, "pageHeader");
246− var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton");
246+ var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");
247− mouseClick(backButton, 0, 0);
247+ mouseClick(backButton);
248 tryCompare(bottomEdgeController, "progress", 0);
248 tryCompare(bottomEdgeController, "progress", 0);
249 }
249 }
250
250
@@ -272,7 +272,7 @@ Item {
272 var scopeLoader0 = findChild(dashContent, "scopeLoader0");
272 var scopeLoader0 = findChild(dashContent, "scopeLoader0");
273 var dashCategory0 = findChild(scopeLoader0, "dashCategory0");
273 var dashCategory0 = findChild(scopeLoader0, "dashCategory0");
274 var delegate0 = findChild(dashCategory0, "delegate0");
274 var delegate0 = findChild(dashCategory0, "delegate0");
275− mouseClick(delegate0, delegate0.width / 2, delegate0.height / 2);
275+ mouseClick(delegate0);
276
276
277 tryCompare(dashContent, "subPageShown", true)
277 tryCompare(dashContent, "subPageShown", true)
278 waitForRendering(dash);
278 waitForRendering(dash);
@@ -320,7 +320,7 @@ Item {
320 // Click on the store
320 // Click on the store
321 var scopesListPageHeader = findChild(scopesList, "pageHeader");
321 var scopesListPageHeader = findChild(scopesList, "pageHeader");
322 var searchButton = findChild(scopesListPageHeader, "store_header_button");
322 var searchButton = findChild(scopesListPageHeader, "store_header_button");
323− mouseClick(searchButton, 0, 0);
323+ mouseClick(searchButton);
324
324
325 spy.wait();
325 spy.wait();
326 compare(spy.signalArguments[0][0], "scope://com.canonical.scopes.clickstore");
326 compare(spy.signalArguments[0][0], "scope://com.canonical.scopes.clickstore");
@@ -345,9 +345,9 @@ Item {
345 // Enter edit mode
345 // Enter edit mode
346 var scopesList = findChild(dash, "scopesList");
346 var scopesList = findChild(dash, "scopesList");
347 var clickScope = findChild(favScopesListCategoryList, "delegateclickscope");
347 var clickScope = findChild(favScopesListCategoryList, "delegateclickscope");
348− mousePress(clickScope, 0, 0);
348+ mousePress(clickScope);
349 tryCompare(scopesList, "state", "edit");
349 tryCompare(scopesList, "state", "edit");
350− mouseRelease(clickScope, 0, 0);
350+ mouseRelease(clickScope);
351
351
352 var starArea = findChild(clickScope, "starArea");
352 var starArea = findChild(clickScope, "starArea");
353 touchFlick(starArea, 0, 0, 0, -units.gu(10));
353 touchFlick(starArea, 0, 0, 0, -units.gu(10));
@@ -355,9 +355,9 @@ Item {
355 // Exit edit mode and go back
355 // Exit edit mode and go back
356 var scopesList = findChild(dash, "scopesList");
356 var scopesList = findChild(dash, "scopesList");
357 var scopesListPageHeader = findChild(scopesList, "pageHeader");
357 var scopesListPageHeader = findChild(scopesList, "pageHeader");
358− var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton");
358+ var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");
359− mouseClick(backButton, 0, 0);
359+ mouseClick(backButton);
360− mouseClick(backButton, 0, 0);
360+ mouseClick(backButton);
361 tryCompare(bottomEdgeController, "progress", 0);
361 tryCompare(bottomEdgeController, "progress", 0);
362
362
363 tryCompare(dashContentList, "currentIndex", 0);
363 tryCompare(dashContentList, "currentIndex", 0);
@@ -387,9 +387,9 @@ Item {
387 // Enter edit mode
387 // Enter edit mode
388 var scopesList = findChild(dash, "scopesList");
388 var scopesList = findChild(dash, "scopesList");
389 var clickScope = findChild(favScopesListCategoryList, "delegateclickscope");
389 var clickScope = findChild(favScopesListCategoryList, "delegateclickscope");
390− mousePress(clickScope, 0, 0);
390+ mousePress(clickScope);
391 tryCompare(scopesList, "state", "edit");
391 tryCompare(scopesList, "state", "edit");
392− mouseRelease(clickScope, 0, 0);
392+ mouseRelease(clickScope);
393
393
394 var starArea = findChild(clickScope, "starArea");
394 var starArea = findChild(clickScope, "starArea");
395 touchFlick(starArea, 0, 0, 0, -units.gu(10));
395 touchFlick(starArea, 0, 0, 0, -units.gu(10));
@@ -400,16 +400,33 @@ Item {
400 // Exit edit mode
400 // Exit edit mode
401 var scopesList = findChild(dash, "scopesList");
401 var scopesList = findChild(dash, "scopesList");
402 var scopesListPageHeader = findChild(scopesList, "pageHeader");
402 var scopesListPageHeader = findChild(scopesList, "pageHeader");
403− var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "backButton");
403+ var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");
404− mouseClick(backButton, 0, 0);
404+ mouseClick(backButton);
405
405
406 // Click on third scope
406 // Click on third scope
407 var mockScope5 = findChild(favScopesListCategoryList, "delegateMockScope5");
407 var mockScope5 = findChild(favScopesListCategoryList, "delegateMockScope5");
408 waitForRendering(mockScope5)
408 waitForRendering(mockScope5)
409− mouseClick(mockScope5, 0, 0);
409+ mouseClick(mockScope5);
410 tryCompare(bottomEdgeController, "progress", 0);
410 tryCompare(bottomEdgeController, "progress", 0);
411 tryCompare(dashContentList, "currentIndex", 2);
411 tryCompare(dashContentList, "currentIndex", 2);
412 compare(dashContentList.currentItem.scopeId, "MockScope5");
412 compare(dashContentList.currentItem.scopeId, "MockScope5");
413 }
413 }
414+
415+ function test_manage_dash_close_dashCommunicator() {
416+ var dashContentList = findChild(dash, "dashContentList");
417+ compare(dashContentList.currentIndex, 0);
418+ compare(dashContentList.currentItem.scopeId, "MockScope1");
419+
420+ // Show the manage dash
421+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
422+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
423+ tryCompare(bottomEdgeController, "progress", 1);
424+
425+ var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
426+ dashCommunicatorService.mockSetCurrentScope(1, true, false);
427+
428+ tryCompare(bottomEdgeController, "progress", 0);
429+ tryCompare(dashContentList, "currentIndex", 1)
430+ }
414 }
431 }
415}
432}
tests/qmltests/Dash/tst_DashContent.qml+48−27
@@ -288,7 +288,7 @@ Item {
288 var dashNavigationButton = findChild(dashContentList.currentItem, "navigationButton");
288 var dashNavigationButton = findChild(dashContentList.currentItem, "navigationButton");
289 compare(dashNavigationButton.showList, false);
289 compare(dashNavigationButton.showList, false);
290 waitForRendering(dashNavigationButton);
290 waitForRendering(dashNavigationButton);
291− mouseClick(dashNavigationButton, dashNavigationButton.width / 2, dashNavigationButton.height / 2);
291+ mouseClick(dashNavigationButton);
292 compare(dashNavigationButton.showList, true);
292 compare(dashNavigationButton.showList, true);
293
293
294 var navigationListView = findChild(dashNavigationButton, "navigationListView");
294 var navigationListView = findChild(dashNavigationButton, "navigationListView");
@@ -304,30 +304,30 @@ Item {
304 compare(allButton.visible, false);
304 compare(allButton.visible, false);
305
305
306 var navigation = findChild(dashNavigationButton, "navigation0child3");
306 var navigation = findChild(dashNavigationButton, "navigation0child3");
307− mouseClick(navigation, 0, 0);
307+ mouseClick(navigation);
308 compare(dashNavigationButton.showList, false);
308 compare(dashNavigationButton.showList, false);
309 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle3");
309 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle3");
310 tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
310 tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
311
311
312− mouseClick(dashNavigationButton, 0, 0);
312+ mouseClick(dashNavigationButton);
313 compare(dashNavigationButton.showList, true);
313 compare(dashNavigationButton.showList, true);
314 waitForRendering(navigationListView);
314 waitForRendering(navigationListView);
315 waitForRendering(navigationListView.currentItem);
315 waitForRendering(navigationListView.currentItem);
316 compare(allButton.visible, true);
316 compare(allButton.visible, true);
317
317
318− mouseClick(allButton, 0, 0);
318+ mouseClick(allButton);
319 compare(dashNavigationButton.showList, false);
319 compare(dashNavigationButton.showList, false);
320 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "root");
320 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "root");
321 tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
321 tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
322
322
323− mouseClick(dashNavigationButton, 0, 0);
323+ mouseClick(dashNavigationButton);
324 compare(dashNavigationButton.showList, true);
324 compare(dashNavigationButton.showList, true);
325 waitForRendering(navigationListView);
325 waitForRendering(navigationListView);
326 waitForRendering(navigationListView.currentItem);
326 waitForRendering(navigationListView.currentItem);
327 compare(allButton.visible, false);
327 compare(allButton.visible, false);
328
328
329 navigation = findChild(dashNavigationButton, "navigation0child2");
329 navigation = findChild(dashNavigationButton, "navigation0child2");
330− mouseClick(navigation, 0, 0);
330+ mouseClick(navigation);
331 compare(dashNavigationButton.showList, true);
331 compare(dashNavigationButton.showList, true);
332 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
332 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
333 tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
333 tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
@@ -340,12 +340,12 @@ Item {
340
340
341 tryCompare(navigationListView, "contentX", navigationList1.x);
341 tryCompare(navigationListView, "contentX", navigationList1.x);
342 waitForRendering(navigationListView);
342 waitForRendering(navigationListView);
343− mouseClick(allButton, 0, 0);
343+ mouseClick(allButton);
344 compare(dashNavigationButton.showList, false);
344 compare(dashNavigationButton.showList, false);
345 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
345 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
346 tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
346 tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
347
347
348− mouseClick(dashNavigationButton, 0, 0);
348+ mouseClick(dashNavigationButton);
349 compare(dashNavigationButton.showList, true);
349 compare(dashNavigationButton.showList, true);
350 waitForRendering(navigationListView);
350 waitForRendering(navigationListView);
351 waitForRendering(navigationListView.currentItem);
351 waitForRendering(navigationListView.currentItem);
@@ -354,47 +354,47 @@ Item {
354
354
355 tryCompare(navigationList1.navigation, "loaded", true);
355 tryCompare(navigationList1.navigation, "loaded", true);
356 navigation = findChild(dashNavigationButton, "navigation1child2");
356 navigation = findChild(dashNavigationButton, "navigation1child2");
357− mouseClick(navigation, 0, 0);
357+ mouseClick(navigation);
358 compare(dashNavigationButton.showList, false);
358 compare(dashNavigationButton.showList, false);
359 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "childmiddle22");
359 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "childmiddle22");
360 tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
360 tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
361
361
362− mouseClick(dashNavigationButton, 0, 0);
362+ mouseClick(dashNavigationButton);
363 compare(dashNavigationButton.showList, true);
363 compare(dashNavigationButton.showList, true);
364 waitForRendering(navigationListView);
364 waitForRendering(navigationListView);
365 waitForRendering(navigationListView.currentItem);
365 waitForRendering(navigationListView.currentItem);
366
366
367 tryCompare(navigationList1.navigation, "loaded", true);
367 tryCompare(navigationList1.navigation, "loaded", true);
368 navigation = findChild(dashNavigationButton, "navigation1child3");
368 navigation = findChild(dashNavigationButton, "navigation1child3");
369− mouseClick(navigation, 0, 0);
369+ mouseClick(navigation);
370 compare(dashNavigationButton.showList, false);
370 compare(dashNavigationButton.showList, false);
371 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "childmiddle23");
371 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "childmiddle23");
372 tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
372 tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
373
373
374− mouseClick(dashNavigationButton, 0, 0);
374+ mouseClick(dashNavigationButton);
375 compare(dashNavigationButton.showList, true);
375 compare(dashNavigationButton.showList, true);
376 waitForRendering(navigationListView);
376 waitForRendering(navigationListView);
377 waitForRendering(navigationListView.currentItem);
377 waitForRendering(navigationListView.currentItem);
378− mouseClick(backButton, 0, 0);
378+ mouseClick(backButton);
379
379
380 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "root");
380 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "root");
381 tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
381 tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
382 compare(dashNavigationButton.showList, true);
382 compare(dashNavigationButton.showList, true);
383− mouseClick(dashNavigationButton, 0, 0);
383+ mouseClick(dashNavigationButton);
384 compare(dashNavigationButton.showList, false);
384 compare(dashNavigationButton.showList, false);
385
385
386− mouseClick(dashNavigationButton, 0, 0);
386+ mouseClick(dashNavigationButton);
387 compare(dashNavigationButton.showList, true);
387 compare(dashNavigationButton.showList, true);
388 tryCompare(navigationListView.currentItem.navigation, "loaded", true);
388 tryCompare(navigationListView.currentItem.navigation, "loaded", true);
389 navigation = findChild(dashNavigationButton, "navigation0child2");
389 navigation = findChild(dashNavigationButton, "navigation0child2");
390− mouseClick(navigation, 0, 0);
390+ mouseClick(navigation);
391 compare(dashNavigationButton.showList, true);
391 compare(dashNavigationButton.showList, true);
392 navigationList1 = findChild(dashNavigationButton, "navigation1");
392 navigationList1 = findChild(dashNavigationButton, "navigation1");
393 compare(navigationList1.navigation.loaded, false);
393 compare(navigationList1.navigation.loaded, false);
394 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
394 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
395 allButton = findChild(navigationList1, "allButton");
395 allButton = findChild(navigationList1, "allButton");
396 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
396 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
397− mouseClick(allButton, 0, 0);
397+ mouseClick(allButton);
398 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
398 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "middle2");
399 }
399 }
400
400
@@ -408,7 +408,7 @@ Item {
408
408
409 compare(dashNavigationButton.showList, false);
409 compare(dashNavigationButton.showList, false);
410 waitForRendering(dashNavigationButton);
410 waitForRendering(dashNavigationButton);
411− mouseClick(dashNavigationButton, 0, 0);
411+ mouseClick(dashNavigationButton);
412 compare(dashNavigationButton.showList, true);
412 compare(dashNavigationButton.showList, true);
413
413
414 var navigationListView = findChild(dashNavigationButton, "navigationListView");
414 var navigationListView = findChild(dashNavigationButton, "navigationListView");
@@ -429,24 +429,24 @@ Item {
429 compare(backButton.visible, false);
429 compare(backButton.visible, false);
430
430
431 var navigation = findChild(dashNavigationButton, "navigation0child3");
431 var navigation = findChild(dashNavigationButton, "navigation0child3");
432− mouseClick(navigation, 0, 0);
432+ mouseClick(navigation);
433 compare(dashNavigationButton.showList, false);
433 compare(dashNavigationButton.showList, false);
434 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "altrootChild3");
434 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "altrootChild3");
435 tryCompare(navigationListView.currentItem.navigation, "navigationId", "altroot");
435 tryCompare(navigationListView.currentItem.navigation, "navigationId", "altroot");
436
436
437− mouseClick(dashNavigationButton, 0, 0);
437+ mouseClick(dashNavigationButton);
438 compare(dashNavigationButton.showList, true);
438 compare(dashNavigationButton.showList, true);
439 waitForRendering(navigationListView);
439 waitForRendering(navigationListView);
440 waitForRendering(navigationListView.currentItem);
440 waitForRendering(navigationListView.currentItem);
441 compare(allButton.visible, false);
441 compare(allButton.visible, false);
442
442
443 navigation = findChild(dashNavigationButton, "navigation0child2");
443 navigation = findChild(dashNavigationButton, "navigation0child2");
444− mouseClick(navigation, 0, 0);
444+ mouseClick(navigation);
445 compare(dashNavigationButton.showList, false);
445 compare(dashNavigationButton.showList, false);
446 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "altrootChild2");
446 tryCompare(dashNavigationButton.currentNavigation, "navigationId", "altrootChild2");
447 tryCompare(navigationListView.currentItem.navigation, "navigationId", "altroot");
447 tryCompare(navigationListView.currentItem.navigation, "navigationId", "altroot");
448
448
449− mouseClick(dashNavigationButton, 0, 0);
449+ mouseClick(dashNavigationButton);
450 compare(dashNavigationButton.showList, true);
450 compare(dashNavigationButton.showList, true);
451 waitForRendering(navigationListView);
451 waitForRendering(navigationListView);
452 waitForRendering(navigationListView.currentItem);
452 waitForRendering(navigationListView.currentItem);
@@ -454,7 +454,7 @@ Item {
454
454
455 compare(navigationListView.count, 1, "There should be no second-level navigation");
455 compare(navigationListView.count, 1, "There should be no second-level navigation");
456
456
457− mouseClick(dashNavigationButton, 0, 0);
457+ mouseClick(dashNavigationButton);
458 compare(dashNavigationButton.showList, false);
458 compare(dashNavigationButton.showList, false);
459 }
459 }
460
460
@@ -474,7 +474,7 @@ Item {
474 compare(dashNavigationButton.showList, false);
474 compare(dashNavigationButton.showList, false);
475 compare(dashAltNavigationButton.showList, false);
475 compare(dashAltNavigationButton.showList, false);
476
476
477− mouseClick(dashNavigation, 0, 0);
477+ mouseClick(dashAltNavigationButton);
478 compare(dashNavigationButton.showList, false);
478 compare(dashNavigationButton.showList, false);
479 compare(dashAltNavigationButton.showList, true);
479 compare(dashAltNavigationButton.showList, true);
480
480
@@ -487,24 +487,45 @@ Item {
487 var blackRect = findChild(dashNavigation, "blackRect");
487 var blackRect = findChild(dashNavigation, "blackRect");
488 tryCompare(blackRect, "opacity", 0.5);
488 tryCompare(blackRect, "opacity", 0.5);
489
489
490− mouseClick(dashNavigation, dashNavigationButton.x, 0);
490+ mouseClick(dashNavigationButton);
491 compare(dashNavigationButton.showList, false);
491 compare(dashNavigationButton.showList, false);
492 compare(dashAltNavigationButton.showList, false);
492 compare(dashAltNavigationButton.showList, false);
493
493
494 tryCompare(navigationListView, "visible", false);
494 tryCompare(navigationListView, "visible", false);
495
495
496− mouseClick(dashNavigation, dashNavigationButton.x, 0);
496+ mouseClick(dashNavigationButton);
497 compare(dashNavigationButton.showList, true);
497 compare(dashNavigationButton.showList, true);
498 compare(dashAltNavigationButton.showList, false);
498 compare(dashAltNavigationButton.showList, false);
499
499
500 navigationListView = findChild(dashNavigationButton, "navigationListView");
500 navigationListView = findChild(dashNavigationButton, "navigationListView");
501 tryCompare(navigationListView.currentItem.navigation, "loaded", true);
501 tryCompare(navigationListView.currentItem.navigation, "loaded", true);
502
502
503− mouseClick(dashNavigation, 0, 0);
503+ mouseClick(dashAltNavigationButton);
504 compare(dashNavigationButton.showList, false);
504 compare(dashNavigationButton.showList, false);
505 compare(dashAltNavigationButton.showList, false);
505 compare(dashAltNavigationButton.showList, false);
506 }
506 }
507
507
508+ function test_navigationsSwipeToNextScope() {
509+ var dashContentList = findChild(dashContent, "dashContentList");
510+ tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
511+ var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
512+ tryCompare(dashNavigation, "visible", true);
513+ var dashNavigationButton = findChild(dashContentList.currentItem, "altNavigationButton");
514+ verify(dashNavigationButton, "Can't find navigation button");
515+
516+ compare(dashNavigationButton.showList, false);
517+ waitForRendering(dashNavigationButton);
518+ mouseClick(dashNavigationButton, 0, 0);
519+ compare(dashNavigationButton.showList, true);
520+
521+ mouseFlick(dashNavigationButton, dashNavigationButton.width - units.gu(1), units.gu(1), units.gu(1), units.gu(1));
522+ compare(dashNavigationButton.showList, false);
523+
524+ var dashContentList = findChild(dashContent, "dashContentList");
525+ expectFail("", "should not change the parent list.");
526+ tryCompare(dashContentList, "currentIndex", 1);
527+ }
528+
508 function test_searchHint() {
529 function test_searchHint() {
509 var dashContentList = findChild(dashContent, "dashContentList");
530 var dashContentList = findChild(dashContent, "dashContentList");
510 verify(dashContentList !== null);
531 verify(dashContentList !== null);
tests/qmltests/Dash/tst_GenericScopeView.qml+26−26
@@ -163,12 +163,12 @@ Item {
163 verify(!category.expanded);
163 verify(!category.expanded);
164
164
165 var initialHeight = category.height;
165 var initialHeight = category.height;
166− mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
166+ mouseClick(seeAll);
167 verify(category.expanded);
167 verify(category.expanded);
168 tryCompare(category, "height", category.item.expandedHeight + seeAll.height);
168 tryCompare(category, "height", category.item.expandedHeight + seeAll.height);
169
169
170 waitForRendering(seeAll);
170 waitForRendering(seeAll);
171− mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
171+ mouseClick(seeAll);
172 verify(!category.expanded);
172 verify(!category.expanded);
173 }
173 }
174
174
@@ -186,17 +186,17 @@ Item {
186 verify(category2.expandable);
186 verify(category2.expandable);
187 verify(!category2.expanded);
187 verify(!category2.expanded);
188
188
189− mouseClick(seeAll2, seeAll2.width / 2, seeAll2.height / 2);
189+ mouseClick(seeAll2);
190 tryCompare(category2, "expanded", true);
190 tryCompare(category2, "expanded", true);
191
191
192 categoryListView.positionAtBeginning();
192 categoryListView.positionAtBeginning();
193
193
194 var category0 = findChild(genericScopeView, "dashCategory0")
194 var category0 = findChild(genericScopeView, "dashCategory0")
195 var seeAll0 = findChild(category0, "seeAll")
195 var seeAll0 = findChild(category0, "seeAll")
196− mouseClick(seeAll0, seeAll0.width / 2, seeAll0.height / 2);
196+ mouseClick(seeAll0);
197 tryCompare(category0, "expanded", true);
197 tryCompare(category0, "expanded", true);
198 tryCompare(category2, "expanded", false);
198 tryCompare(category2, "expanded", false);
199− mouseClick(seeAll0, seeAll0.width / 2, seeAll0.height / 2);
199+ mouseClick(seeAll0);
200 tryCompare(category0, "expanded", false);
200 tryCompare(category0, "expanded", false);
201 tryCompare(category2, "expanded", false);
201 tryCompare(category2, "expanded", false);
202 }
202 }
@@ -208,7 +208,7 @@ Item {
208 spy.target = genericScopeView.scope;
208 spy.target = genericScopeView.scope;
209 spy.signalName = "performQuery";
209 spy.signalName = "performQuery";
210
210
211− mouseClick(header, header.width / 2, header.height / 2);
211+ mouseClick(header);
212
212
213 spy.wait();
213 spy.wait();
214 compare(spy.signalArguments[0][0], genericScopeView.scope.categories.data(1, Categories.RoleHeaderLink));
214 compare(spy.signalArguments[0][0], genericScopeView.scope.categories.data(1, Categories.RoleHeaderLink));
@@ -248,13 +248,13 @@ Item {
248 categoryListView.contentY = units.gu(20);
248 categoryListView.contentY = units.gu(20);
249 var seeAll = findChild(category, "seeAll");
249 var seeAll = findChild(category, "seeAll");
250 var floatingSeeLess = findChild(genericScopeView, "floatingSeeLess");
250 var floatingSeeLess = findChild(genericScopeView, "floatingSeeLess");
251− mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2);
251+ mouseClick(seeAll);
252 tryCompare(category, "expanded", true);
252 tryCompare(category, "expanded", true);
253 tryCompareFunction(function() {
253 tryCompareFunction(function() {
254 return category.item.height + floatingSeeLess.height ==
254 return category.item.height + floatingSeeLess.height ==
255 genericScopeView.height - category.item.displayMarginBeginning - category.item.displayMarginEnd;
255 genericScopeView.height - category.item.displayMarginBeginning - category.item.displayMarginEnd;
256 }, true);
256 }, true);
257− mouseClick(floatingSeeLess, floatingSeeLess.width / 2, floatingSeeLess.height / 2);
257+ mouseClick(floatingSeeLess);
258 tryCompare(category, "expanded", false);
258 tryCompare(category, "expanded", false);
259 }
259 }
260
260
@@ -295,7 +295,7 @@ Item {
295 true);
295 true);
296 var tile = findChild(findChild(genericScopeView, "dashCategory"+category), "delegate"+delegate);
296 var tile = findChild(findChild(genericScopeView, "dashCategory"+category), "delegate"+delegate);
297 waitForRendering(tile);
297 waitForRendering(tile);
298− mouseClick(tile, tile.width / 2, tile.height / 2);
298+ mouseClick(tile);
299 tryCompare(testCase.subPageLoader, "open", true);
299 tryCompare(testCase.subPageLoader, "open", true);
300 tryCompare(testCase.subPageLoader, "x", 0);
300 tryCompare(testCase.subPageLoader, "x", 0);
301 tryCompare(findChild(genericScopeView, "categoryListView"), "visible", false);
301 tryCompare(findChild(genericScopeView, "categoryListView"), "visible", false);
@@ -340,15 +340,15 @@ Item {
340 tryCompare(testCase.subPageLoader, "open", false);
340 tryCompare(testCase.subPageLoader, "open", false);
341 tryCompare(testCase.subPageLoader, "visible", false);
341 tryCompare(testCase.subPageLoader, "visible", false);
342
342
343− mouseClick(tile, tile.width / 2, tile.height / 2);
343+ mouseClick(tile);
344
344
345 tryCompare(testCase.subPageLoader, "open", false);
345 tryCompare(testCase.subPageLoader, "open", false);
346 tryCompare(testCase.subPageLoader, "visible", false);
346 tryCompare(testCase.subPageLoader, "visible", false);
347
347
348− mousePress(tile, tile.width / 2, tile.height / 2);
348+ mousePress(tile);
349 tryCompare(testCase.subPageLoader, "open", false);
349 tryCompare(testCase.subPageLoader, "open", false);
350 tryCompare(testCase.subPageLoader, "visible", false);
350 tryCompare(testCase.subPageLoader, "visible", false);
351− mouseRelease(tile, tile.width / 2, tile.height / 2);
351+ mouseRelease(tile);
352 }
352 }
353
353
354 function test_showPreviewCarousel() {
354 function test_showPreviewCarousel() {
@@ -359,18 +359,18 @@ Item {
359 var tile = findChild(category, "carouselDelegate1");
359 var tile = findChild(category, "carouselDelegate1");
360 verify(tile, "Could not find delegate");
360 verify(tile, "Could not find delegate");
361
361
362− mouseClick(tile, tile.width / 2, tile.height / 2);
362+ mouseClick(tile);
363 tryCompare(tile, "explicitlyScaled", true);
363 tryCompare(tile, "explicitlyScaled", true);
364− mouseClick(tile, tile.width / 2, tile.height / 2);
364+ mouseClick(tile);
365 tryCompare(testCase.subPageLoader, "open", true);
365 tryCompare(testCase.subPageLoader, "open", true);
366 tryCompare(testCase.subPageLoader, "x", 0);
366 tryCompare(testCase.subPageLoader, "x", 0);
367
367
368 closePreview();
368 closePreview();
369
369
370− mousePress(tile, tile.width / 2, tile.height / 2);
370+ mousePress(tile);
371 tryCompare(testCase.subPageLoader, "open", true);
371 tryCompare(testCase.subPageLoader, "open", true);
372 tryCompare(testCase.subPageLoader, "x", 0);
372 tryCompare(testCase.subPageLoader, "x", 0);
373− mouseRelease(tile, tile.width / 2, tile.height / 2);
373+ mouseRelease(tile);
374
374
375 closePreview();
375 closePreview();
376 }
376 }
@@ -383,16 +383,16 @@ Item {
383 var tile = findChild(category, "delegate1");
383 var tile = findChild(category, "delegate1");
384 verify(tile, "Could not find delegate");
384 verify(tile, "Could not find delegate");
385
385
386− mouseClick(tile, tile.width / 2, tile.height / 2);
386+ mouseClick(tile);
387 tryCompare(testCase.subPageLoader, "open", true);
387 tryCompare(testCase.subPageLoader, "open", true);
388 tryCompare(testCase.subPageLoader, "x", 0);
388 tryCompare(testCase.subPageLoader, "x", 0);
389
389
390 closePreview();
390 closePreview();
391
391
392− mousePress(tile, tile.width / 2, tile.height / 2);
392+ mousePress(tile);
393 tryCompare(testCase.subPageLoader, "open", true);
393 tryCompare(testCase.subPageLoader, "open", true);
394 tryCompare(testCase.subPageLoader, "x", 0);
394 tryCompare(testCase.subPageLoader, "x", 0);
395− mouseRelease(tile, tile.width / 2, tile.height / 2);
395+ mouseRelease(tile);
396
396
397 closePreview();
397 closePreview();
398 }
398 }
@@ -429,7 +429,7 @@ Item {
429 tryCompare(testCase.subPageLoader, "open", false);
429 tryCompare(testCase.subPageLoader, "open", false);
430 tryCompare(testCase.subPageLoader, "visible", false);
430 tryCompare(testCase.subPageLoader, "visible", false);
431 var settings = findChild(innerHeader, "settings_header_button");
431 var settings = findChild(innerHeader, "settings_header_button");
432− mouseClick(settings, settings.width / 2, settings.height / 2);
432+ mouseClick(settings);
433 tryCompare(testCase.subPageLoader, "open", true);
433 tryCompare(testCase.subPageLoader, "open", true);
434 tryCompareFunction(function() { return (String(subPageLoader.source)).indexOf("ScopeSettingsPage.qml") != -1; }, true);
434 tryCompareFunction(function() { return (String(subPageLoader.source)).indexOf("ScopeSettingsPage.qml") != -1; }, true);
435 tryCompare(genericScopeView, "subPageShown", true);
435 tryCompare(genericScopeView, "subPageShown", true);
@@ -496,7 +496,7 @@ Item {
496 verify(category0.expandable);
496 verify(category0.expandable);
497 verify(!category0.expanded);
497 verify(!category0.expanded);
498
498
499− mouseClick(seeAll0, seeAll0.width / 2, seeAll0.height / 2);
499+ mouseClick(seeAll0);
500 verify(category0.expanded);
500 verify(category0.expanded);
501 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
501 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
502 tryCompare(genericScopeView.categoryView, "contentY", units.gu(14));
502 tryCompare(genericScopeView.categoryView, "contentY", units.gu(14));
@@ -509,7 +509,7 @@ Item {
509 verify(category1.expandable);
509 verify(category1.expandable);
510 verify(!category1.expanded);
510 verify(!category1.expanded);
511
511
512− mouseClick(seeAll1, seeAll1.width / 2, seeAll1.height / 2);
512+ mouseClick(seeAll1);
513 verify(!category0.expanded);
513 verify(!category0.expanded);
514 verify(category1.expanded);
514 verify(category1.expanded);
515 tryCompare(category1, "height", category1.item.expandedHeight + seeAll1.height);
515 tryCompare(category1, "height", category1.item.expandedHeight + seeAll1.height);
@@ -539,7 +539,7 @@ Item {
539 verify(category0.expandable);
539 verify(category0.expandable);
540 verify(!category0.expanded);
540 verify(!category0.expanded);
541
541
542− mouseClick(seeAll0, seeAll0.width / 2, seeAll0.height / 2);
542+ mouseClick(seeAll0);
543 verify(category0.expanded);
543 verify(category0.expanded);
544 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
544 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
545
545
@@ -550,7 +550,7 @@ Item {
550 verify(category1.expandable);
550 verify(category1.expandable);
551 verify(!category1.expanded);
551 verify(!category1.expanded);
552
552
553− mouseClick(seeAll1, seeAll1.width / 2, seeAll1.height / 2);
553+ mouseClick(seeAll1);
554 verify(!category0.expanded);
554 verify(!category0.expanded);
555 verify(category1.expanded);
555 verify(category1.expanded);
556 tryCompare(category1, "height", category1.item.expandedHeight + seeAll1.height);
556 tryCompare(category1, "height", category1.item.expandedHeight + seeAll1.height);
@@ -578,7 +578,7 @@ Item {
578 expectFail("Apps", "Click scope should not have a favorite button");
578 expectFail("Apps", "Click scope should not have a favorite button");
579 var favoriteAction = findChild(innerHeader, "favorite_header_button");
579 var favoriteAction = findChild(innerHeader, "favorite_header_button");
580 verify(favoriteAction, "Could not find the favorite action.");
580 verify(favoriteAction, "Could not find the favorite action.");
581− mouseClick(favoriteAction, favoriteAction.width / 2, favoriteAction.height / 2);
581+ mouseClick(favoriteAction);
582
582
583 tryCompare(genericScopeView.scope, "favorite", !data.favorite);
583 tryCompare(genericScopeView.scope, "favorite", !data.favorite);
584
584
@@ -629,7 +629,7 @@ Item {
629 var touchdown = findChild(item0, "touchdown");
629 var touchdown = findChild(item0, "touchdown");
630
630
631 compare(touchdown.visible, false);
631 compare(touchdown.visible, false);
632− mouseClick(item0, item0.width / 2, item0.height / 2);
632+ mouseClick(item0);
633 compare(touchdown.visible, false);
633 compare(touchdown.visible, false);
634
634
635 cardTool.template["non-interactive"] = false;
635 cardTool.template["non-interactive"] = false;
tests/qmltests/Dash/tst_PageHeader.qml+1−1
@@ -157,7 +157,7 @@ Item {
157 var recentSearches = findChild(headerContainer.popover, "recentSearches");
157 var recentSearches = findChild(headerContainer.popover, "recentSearches");
158 verify(recentSearches, "Could not find recent searches in the popover");
158 verify(recentSearches, "Could not find recent searches in the popover");
159 waitForRendering(recentSearches);
159 waitForRendering(recentSearches);
160− mouseClick(recentSearches.itemAt(0), 0, 0);
160+ mouseClick(recentSearches.itemAt(0));
161
161
162 compare(pageHeader.searchQuery, "Search2");
162 compare(pageHeader.searchQuery, "Search2");
163 tryCompareFunction(function() { return headerContainer.popover === null; }, true);
163 tryCompareFunction(function() { return headerContainer.popover === null; }, true);
tests/qmltests/Dash/tst_PreviewListView.qml+2−2
@@ -73,7 +73,7 @@ Rectangle {
73
73
74 function test_notProcessing() {
74 function test_notProcessing() {
75 expectFail("", "processingMouseArea should not receive the click.");
75 expectFail("", "processingMouseArea should not receive the click.");
76− mouseClick(listView, listView.width / 2, listView.height / 2);
76+ mouseClick(listView);
77 clickedSpy.wait();
77 clickedSpy.wait();
78 }
78 }
79
79
@@ -83,7 +83,7 @@ Rectangle {
83
83
84 tryCompare(listView, "processing", true);
84 tryCompare(listView, "processing", true);
85
85
86− mouseClick(listView, listView.width / 2, listView.height / 2);
86+ mouseClick(listView);
87 clickedSpy.wait();
87 clickedSpy.wait();
88 }
88 }
89
89
tests/qmltests/Launcher/tst_Launcher.qml+8−8
@@ -154,7 +154,7 @@ Item {
154 dragLauncherIntoView()
154 dragLauncherIntoView()
155
155
156 // tapping on the center of the screen should dismiss the launcher
156 // tapping on the center of the screen should dismiss the launcher
157− mouseClick(launcher, launcher.width/2, launcher.height/2)
157+ mouseClick(launcher)
158
158
159 // should eventually get fully retracted (hidden)
159 // should eventually get fully retracted (hidden)
160 tryCompare(panel, "x", -launcher.panelWidth, 1000)
160 tryCompare(panel, "x", -launcher.panelWidth, 1000)
@@ -175,7 +175,7 @@ Item {
175
175
176 verify(appIcon != undefined)
176 verify(appIcon != undefined)
177
177
178− mouseClick(appIcon, appIcon.width/2, appIcon.height/2)
178+ mouseClick(appIcon)
179
179
180 tryCompare(launcher, "lastSelectedApplication",
180 tryCompare(launcher, "lastSelectedApplication",
181 "dialer-app")
181 "dialer-app")
@@ -194,7 +194,7 @@ Item {
194 var dashIcon = findChild(launcher, "dashItem")
194 var dashIcon = findChild(launcher, "dashItem")
195 verify(dashIcon != undefined)
195 verify(dashIcon != undefined)
196
196
197− mouseClick(dashIcon, dashIcon.width/2, dashIcon.height/2)
197+ mouseClick(dashIcon)
198
198
199 tryCompare(launcher, "showDashHome_count", 1)
199 tryCompare(launcher, "showDashHome_count", 1)
200
200
@@ -413,7 +413,7 @@ Item {
413 compare(quickListShape.visible, false)
413 compare(quickListShape.visible, false)
414
414
415 // Doing longpress
415 // Doing longpress
416− mousePress(draggedItem, draggedItem.width / 2, draggedItem.height / 2)
416+ mousePress(draggedItem)
417 tryCompare(fakeDragItem, "visible", true) // Wait longpress happening
417 tryCompare(fakeDragItem, "visible", true) // Wait longpress happening
418 tryCompare(quickListShape, "visible", true)
418 tryCompare(quickListShape, "visible", true)
419
419
@@ -448,7 +448,7 @@ Item {
448 }
448 }
449
449
450 // Doing longpress
450 // Doing longpress
451− mousePress(draggedItem, draggedItem.width / 2, draggedItem.height / 2);
451+ mousePress(draggedItem);
452 tryCompare(quickListShape, "opacity", 0.96);
452 tryCompare(quickListShape, "opacity", 0.96);
453 mouseRelease(draggedItem);
453 mouseRelease(draggedItem);
454
454
@@ -481,7 +481,7 @@ Item {
481 tryCompare(quickListShape, "visible", false)
481 tryCompare(quickListShape, "visible", false)
482
482
483 // Doing longpress
483 // Doing longpress
484− mousePress(clickedItem, clickedItem.width / 2, clickedItem.height / 2)
484+ mousePress(clickedItem)
485 tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen
485 tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen
486 verify(quickListShape.visible, "QuickList must be visible")
486 verify(quickListShape.visible, "QuickList must be visible")
487
487
@@ -492,7 +492,7 @@ Item {
492 signalSpy.clear();
492 signalSpy.clear();
493 signalSpy.signalName = "quickListTriggered"
493 signalSpy.signalName = "quickListTriggered"
494
494
495− mouseClick(quickListEntry, quickListEntry.width / 2, quickListEntry.height / 2)
495+ mouseClick(quickListEntry)
496
496
497 if (data.clickable) {
497 if (data.clickable) {
498 // QuickList needs to be closed when some clickable item is clicked
498 // QuickList needs to be closed when some clickable item is clicked
@@ -524,7 +524,7 @@ Item {
524 tryCompare(quickList, "state", "")
524 tryCompare(quickList, "state", "")
525
525
526 // Doing longpress
526 // Doing longpress
527− mousePress(clickedItem, clickedItem.width / 2, clickedItem.height / 2)
527+ mousePress(clickedItem)
528 tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen
528 tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen
529 verify(quickList, "state", "open")
529 verify(quickList, "state", "open")
530
530
tests/qmltests/Notifications/tst_Notifications.qml+6−6
@@ -547,7 +547,7 @@ Item {
547 compare(valueLabel.visible, data.valueLabelVisible, "value-label visibility is incorrect")
547 compare(valueLabel.visible, data.valueLabelVisible, "value-label visibility is incorrect")
548
548
549 // test input does not fall through
549 // test input does not fall through
550− mouseClick(notification, notification.width / 2, notification.height / 2)
550+ mouseClick(notification)
551 if(data.type == Notification.Interactive) {
551 if(data.type == Notification.Interactive) {
552 actionSpy.wait()
552 actionSpy.wait()
553 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
553 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
@@ -568,7 +568,7 @@ Item {
568
568
569 // only test the left/cancel-button if two actions have been passed in
569 // only test the left/cancel-button if two actions have been passed in
570 if (data.actions.length == 2) {
570 if (data.actions.length == 2) {
571− tryCompareFunction(function() { mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2); return actionSpy.signalArguments.length > 0; }, true);
571+ tryCompareFunction(function() { mouseClick(buttonCancel); return actionSpy.signalArguments.length > 0; }, true);
572 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
572 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
573 actionSpy.clear()
573 actionSpy.clear()
574 }
574 }
@@ -577,7 +577,7 @@ Item {
577 verify(buttonAccept.color === data.buttonTinted ? "#3fb24f" : "#dddddd", "button has the wrong color-tint")
577 verify(buttonAccept.color === data.buttonTinted ? "#3fb24f" : "#dddddd", "button has the wrong color-tint")
578
578
579 // click the positive/right button
579 // click the positive/right button
580− tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
580+ tryCompareFunction(function() { mouseClick(buttonAccept); return actionSpy.signalArguments.length > 0; }, true);
581 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")
581 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")
582 actionSpy.clear()
582 actionSpy.clear()
583 waitForRendering (notification)
583 waitForRendering (notification)
@@ -592,19 +592,19 @@ Item {
592
592
593 // try clicking on choices in expanded comboList
593 // try clicking on choices in expanded comboList
594 var choiceButton1 = findChild(notification, "notify_button3")
594 var choiceButton1 = findChild(notification, "notify_button3")
595− tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
595+ tryCompareFunction(function() { mouseClick(choiceButton1); return actionSpy.signalArguments.length > 0; }, true);
596 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
596 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
597 actionSpy.clear()
597 actionSpy.clear()
598
598
599 var choiceButton2 = findChild(notification, "notify_button4")
599 var choiceButton2 = findChild(notification, "notify_button4")
600− tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
600+ tryCompareFunction(function() { mouseClick(choiceButton2); return actionSpy.signalArguments.length > 0; }, true);
601 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
601 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
602 actionSpy.clear()
602 actionSpy.clear()
603
603
604 // click to collapse
604 // click to collapse
605 //tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == false; }, true);
605 //tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == false; }, true);
606 } else {
606 } else {
607− mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
607+ mouseClick(buttonCancel)
608 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
608 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
609 }
609 }
610 }
610 }
tests/qmltests/Notifications/tst_OptionToggle.qml+7−7
@@ -223,7 +223,7 @@ Row {
223 }
223 }
224
224
225 // test input does not fall through
225 // test input does not fall through
226− mouseClick(notification, notification.width / 2, notification.height / 2)
226+ mouseClick(notification)
227 if(data.type == Notification.Interactive) {
227 if(data.type == Notification.Interactive) {
228 actionSpy.wait()
228 actionSpy.wait()
229 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
229 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
@@ -244,7 +244,7 @@ Row {
244
244
245 // only test the left/cancel-button if two actions have been passed in
245 // only test the left/cancel-button if two actions have been passed in
246 if (data.actions.length == 2) {
246 if (data.actions.length == 2) {
247− tryCompareFunction(function() { mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2); return actionSpy.signalArguments.length > 0; }, true);
247+ tryCompareFunction(function() { mouseClick(buttonCancel); return actionSpy.signalArguments.length > 0; }, true);
248 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
248 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
249 actionSpy.clear()
249 actionSpy.clear()
250 }
250 }
@@ -253,7 +253,7 @@ Row {
253 verify(buttonAccept.color === data.buttonTinted ? "#3fb24f" : "#dddddd", "button has the wrong color-tint")
253 verify(buttonAccept.color === data.buttonTinted ? "#3fb24f" : "#dddddd", "button has the wrong color-tint")
254
254
255 // click the positive/right button
255 // click the positive/right button
256− tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
256+ tryCompareFunction(function() { mouseClick(buttonAccept); return actionSpy.signalArguments.length > 0; }, true);
257 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")
257 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")
258 actionSpy.clear()
258 actionSpy.clear()
259 waitForRendering(notification)
259 waitForRendering(notification)
@@ -264,20 +264,20 @@ Row {
264 tryCompareFunction(function() { return optionToggle.expanded == false; }, true);
264 tryCompareFunction(function() { return optionToggle.expanded == false; }, true);
265
265
266 // click to expand
266 // click to expand
267− tryCompareFunction(function() { mouseClick(optionToggle, optionToggle.width / 2, optionToggle.height / 2); return optionToggle.expanded == true; }, true);
267+ tryCompareFunction(function() { mouseClick(optionToggle); return optionToggle.expanded == true; }, true);
268
268
269 // try clicking on choices in expanded comboList
269 // try clicking on choices in expanded comboList
270 var choiceButton1 = findChild(notification, "notify_button3")
270 var choiceButton1 = findChild(notification, "notify_button3")
271− tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
271+ tryCompareFunction(function() { mouseClick(choiceButton1); return actionSpy.signalArguments.length > 0; }, true);
272 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
272 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
273 actionSpy.clear()
273 actionSpy.clear()
274
274
275 var choiceButton2 = findChild(notification, "notify_button4")
275 var choiceButton2 = findChild(notification, "notify_button4")
276− tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
276+ tryCompareFunction(function() { mouseClick(choiceButton2); return actionSpy.signalArguments.length > 0; }, true);
277 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
277 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
278 actionSpy.clear()
278 actionSpy.clear()
279 } else {
279 } else {
280− mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
280+ mouseClick(buttonCancel)
281 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
281 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
282 }
282 }
283 }
283 }
tests/qmltests/Notifications/tst_SwipeToAct.qml+1−1
@@ -240,7 +240,7 @@ Item {
240 }
240 }
241
241
242 // test input does not fall through
242 // test input does not fall through
243− mouseClick(notification, notification.width / 2, notification.height / 2)
243+ mouseClick(notification)
244 if(data.type == Notification.Interactive) {
244 if(data.type == Notification.Interactive) {
245 actionSpy.wait()
245 actionSpy.wait()
246 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
246 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml+2−2
@@ -214,7 +214,7 @@ Row {
214
214
215 // click/tap on each snap-decision and verify only one is in expanded-state at any time
215 // click/tap on each snap-decision and verify only one is in expanded-state at any time
216 for (var index = 0; index < snap_decision.length; index++) {
216 for (var index = 0; index < snap_decision.length; index++) {
217− mouseClick(snap_decision[index], snap_decision[index].width / 2, snap_decision[index].height / 2)
217+ mouseClick(snap_decision[index])
218 for (var kindex = 0; kindex < snap_decision.length; kindex++) {
218 for (var kindex = 0; kindex < snap_decision.length; kindex++) {
219 if (kindex == index) {
219 if (kindex == index) {
220 compare(snap_decision[kindex].state, "expanded", "state of "+ kindex + ".snap-decision is not expanded");
220 compare(snap_decision[kindex].state, "expanded", "state of "+ kindex + ".snap-decision is not expanded");
@@ -227,7 +227,7 @@ Row {
227 // remove top-most and verify one of the remaining ones is still getting expanded
227 // remove top-most and verify one of the remaining ones is still getting expanded
228
228
229 // make first snap-decision expand
229 // make first snap-decision expand
230− mouseClick(snap_decision[0], snap_decision[0].width / 2, snap_decision[0].height / 2);
230+ mouseClick(snap_decision[0]);
231
231
232 for (var index = 1; index < snap_decision.length; index++) {
232 for (var index = 1; index < snap_decision.length; index++) {
233 removeTopMostNotification();
233 removeTopMostNotification();
tests/qmltests/Panel/Indicators/tst_IndicatorsLight.qmlnew file+129
@@ -0,0 +1,129 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import QtQuick.Layouts 1.1
19+import Unity.Test 0.1 as UT
20+import Unity.Indicators 0.1 as Indicators
21+import Ubuntu.Components 1.1
22+import Powerd 0.1
23+import Lights 0.1
24+import QMenuModel 0.1
25+import "../../../../qml/Panel/Indicators"
26+
27+Item {
28+ id: root
29+ width: units.gu(30)
30+ height: units.gu(30)
31+
32+ property var newMessage: {
33+ "messages" : {
34+ 'valid': true,
35+ 'state': {
36+ 'icons': [ 'indicator-messages-new' ]
37+ }
38+ }
39+ };
40+ property var noNewMessage: {
41+ "messages" : {
42+ 'valid': true,
43+ 'state': {
44+ 'icons': [ 'indicator-messages' ]
45+ }
46+ }
47+ };
48+
49+ Component {
50+ id: light
51+ IndicatorsLight {}
52+ }
53+
54+ Loader {
55+ id: loader
56+ sourceComponent: light
57+ }
58+
59+ Component.onCompleted: {
60+ ActionData.data = newMessage;
61+ Powerd.status = Powerd.On
62+ }
63+
64+ RowLayout {
65+ anchors.fill: parent
66+ anchors.margins: units.gu(1)
67+
68+ Item {
69+ Layout.fillWidth: true
70+ Layout.fillHeight: true
71+
72+ Rectangle {
73+ width: units.gu(4)
74+ height: width
75+ radius: width / 2
76+ anchors.centerIn: parent
77+
78+ color: Lights.state === Lights.On ? Lights.color : "transparent"
79+
80+ border.color: "black"
81+ border.width: 1
82+ }
83+ }
84+
85+ ColumnLayout {
86+ Layout.alignment: Qt.AlignTop
87+ Layout.fillWidth: false
88+ Layout.preferredWidth: units.gu(15)
89+
90+ Button {
91+ Layout.fillWidth: true
92+ text: Powerd.status === Powerd.On ? "Power Off" : "Power On"
93+ onClicked: {
94+ if (Powerd.status === Powerd.On) Powerd.status = Powerd.Off;
95+ else Powerd.status = Powerd.On;
96+ }
97+ }
98+ }
99+ }
100+
101+ UT.UnityTestCase {
102+ name: "IndicatorsLight"
103+ when: windowShown
104+
105+ function init() {
106+ // reload
107+ ActionData.data = noNewMessage;
108+ loader.sourceComponent = undefined;
109+ loader.sourceComponent = light;
110+ Powerd.status = Powerd.On
111+ }
112+
113+ function test_LightsStatus_data() {
114+ return [
115+ { tag: "Powerd.On with No Message", powerd: Powerd.On, actionData: noNewMessage, expected: Lights.Off },
116+ { tag: "Powerd.Off with No Message", powerd: Powerd.Off, actionData: noNewMessage, expected: Lights.Off },
117+ { tag: "Powerd.On with New Message", powerd: Powerd.On, actionData: newMessage, expected: Lights.Off },
118+ { tag: "Powerd.Off with New Message", powerd: Powerd.Off, actionData: newMessage, expected: Lights.On },
119+ ]
120+ }
121+
122+ function test_LightsStatus(data) {
123+ Powerd.status = data.powerd;
124+ ActionData.data = data.actionData;
125+
126+ compare(Lights.state, data.expected, "Light does not match expected value");
127+ }
128+ }
129+}
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+52−1
@@ -17,6 +17,7 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import QtTest 1.0
18import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20+import Ubuntu.Settings.Menus 0.1 as Menus
20import QMenuModel 0.1
21import QMenuModel 0.1
21import Utils 0.1 as Utils
22import Utils 0.1 as Utils
22import "../../../../qml/Panel/Indicators"
23import "../../../../qml/Panel/Indicators"
@@ -448,9 +449,59 @@ Item {
448 }
449 }
449
450
450 function test_create_transferMenu(data) {
451 function test_create_transferMenu(data) {
452+ ActionData.data = {
453+ "transfer-state.queued": {
454+ 'valid': true,
455+ 'state': {
456+ 'state': Menus.TransferState.Queued,
457+ 'percent': data.progress
458+ }
459+ },
460+ "transfer-state.running": {
461+ 'valid': true,
462+ 'state': {
463+ 'state': Menus.TransferState.Running,
464+ 'seconds-left': 100,
465+ 'percent': data.progress
466+ }
467+ },
468+ "transfer-state.paused": {
469+ 'valid': true,
470+ 'state': {
471+ 'state': Menus.TransferState.Paused,
472+ 'seconds-left': 100,
473+ 'percent': data.progress
474+ }
475+ },
476+ "transfer-state.cancelled": {
477+ 'valid': true,
478+ 'state': {
479+ 'state': Menus.TransferState.Canceled,
480+ 'percent': data.progress
481+ }
482+ },
483+ "transfer-state.finished": {
484+ 'valid': true,
485+ 'state': {
486+ 'state': Menus.TransferState.Finished,
487+ 'seconds-left': 0,
488+ 'percent': data.progress
489+ }
490+ },
491+ "transfer-state.error": {
492+ 'valid': true,
493+ 'state': {
494+ 'state': Menus.TransferState.Error,
495+ 'seconds-left': 100,
496+ 'percent': data.progress
497+ }
498+ }
499+ };
500+
451 menuData.type = "com.canonical.indicator.transfer";
501 menuData.type = "com.canonical.indicator.transfer";
452 menuData.label = data.label;
502 menuData.label = data.label;
453 menuData.sensitive = data.enabled;
503 menuData.sensitive = data.enabled;
504+ menuData.isToggled = data.active;
454 menuData.icon = data.icon;
505 menuData.icon = data.icon;
455 menuData.ext = {
506 menuData.ext = {
456 'xCanonicalUid': data.tag
507 'xCanonicalUid': data.tag
@@ -464,7 +515,7 @@ Item {
464 compare(loader.item.text, data.label, "Label does not match data");
515 compare(loader.item.text, data.label, "Label does not match data");
465 compare(loader.item.iconSource, data.icon, "Icon does not match data");
516 compare(loader.item.iconSource, data.icon, "Icon does not match data");
466 compare(loader.item.enabled, data.enabled, "Enabled does not match data");
517 compare(loader.item.enabled, data.enabled, "Enabled does not match data");
467− compare(loader.item.progress, data.progress, "Icon does not match data");
518+ compare(loader.item.progress, data.progress, "Progress does not match data");
468 compare(loader.item.active, data.active, "Active does not match data");
519 compare(loader.item.active, data.active, "Active does not match data");
469 compare(loader.item.stateText, data.stateText, "State text does not match data");
520 compare(loader.item.stateText, data.stateText, "State text does not match data");
470 }
521 }
tests/qmltests/Panel/tst_IndicatorsBar.qml+1−1
@@ -197,7 +197,7 @@ IndicatorTest {
197 if (indicatorsBar.mapFromItem(dataItem, dataItem.width/2, dataItem.height/2).x < 0) {
197 if (indicatorsBar.mapFromItem(dataItem, dataItem.width/2, dataItem.height/2).x < 0) {
198 skip("Out of bounds");
198 skip("Out of bounds");
199 }
199 }
200− mouseClick(dataItem, dataItem.width/2, dataItem.height/2);
200+ mouseClick(dataItem);
201 verify(dataItem.selected === true);
201 verify(dataItem.selected === true);
202 }
202 }
203
203
tests/qmltests/Stages/tst_PhoneStage.qml+2
@@ -205,6 +205,7 @@ Item {
205
205
206 if (data.targetPhase == 2) {
206 if (data.targetPhase == 2) {
207 var app2 = findChild(spreadView, "appDelegate2");
207 var app2 = findChild(spreadView, "appDelegate2");
208+ tryCompare(app2, "swipeToCloseEnabled", true);
208 mouseClick(app2, units.gu(1), units.gu(1));
209 mouseClick(app2, units.gu(1), units.gu(1));
209 }
210 }
210
211
@@ -249,6 +250,7 @@ Item {
249 }
250 }
250
251
251 console.log("clicking app", data.index, "(", appId, ")")
252 console.log("clicking app", data.index, "(", appId, ")")
253+ tryCompare(tile, "swipeToCloseEnabled", true);
252 mouseClick(spreadView, tile.mapToItem(spreadView).x + units.gu(1), spreadView.height / 2)
254 mouseClick(spreadView, tile.mapToItem(spreadView).x + units.gu(1), spreadView.height / 2)
253 tryCompare(ApplicationManager, "focusedApplicationId", appId);
255 tryCompare(ApplicationManager, "focusedApplicationId", appId);
254 tryCompare(spreadView, "phase", 0);
256 tryCompare(spreadView, "phase", 0);
tests/qmltests/Wizard/tst_Wizard.qml+36−12
@@ -18,6 +18,7 @@ import QtQuick 2.3
18import QtTest 1.0
18import QtTest 1.0
19import AccountsService 0.1
19import AccountsService 0.1
20import MeeGo.QOfono 0.2
20import MeeGo.QOfono 0.2
21+import QMenuModel 0.1
21import Ubuntu.Components 1.1
22import Ubuntu.Components 1.1
22import Ubuntu.SystemSettings.SecurityPrivacy 1.0
23import Ubuntu.SystemSettings.SecurityPrivacy 1.0
23import Unity.Test 0.1 as UT
24import Unity.Test 0.1 as UT
@@ -58,6 +59,16 @@ Item {
58 signalName: "setSecurityCalled"
59 signalName: "setSecurityCalled"
59 }
60 }
60
61
62+ SignalSpy {
63+ id: activateLocationSpy
64+ signalName: "activated"
65+ }
66+
67+ SignalSpy {
68+ id: activateGPSSpy
69+ signalName: "activated"
70+ }
71+
61 function setup() {
72 function setup() {
62 AccountsService.hereEnabled = false;
73 AccountsService.hereEnabled = false;
63 AccountsService.hereLicensePath = Qt.resolvedUrl("licenses");
74 AccountsService.hereLicensePath = Qt.resolvedUrl("licenses");
@@ -68,6 +79,19 @@ Item {
68
79
69 updateSessionLanguageSpy.clear();
80 updateSessionLanguageSpy.clear();
70 setSecuritySpy.clear();
81 setSecuritySpy.clear();
82+ activateLocationSpy.clear();
83+ activateGPSSpy.clear();
84+
85+ ActionData.data = {
86+ "location-detection-enabled": {
87+ 'valid': true,
88+ 'state': false
89+ },
90+ "gps-detection-enabled": {
91+ 'valid': true,
92+ 'state': false
93+ }
94+ };
71 }
95 }
72
96
73 Component.onCompleted: {
97 Component.onCompleted: {
@@ -360,8 +384,8 @@ Item {
360 var nopeCheck = findChild(page, "nopeCheck");
384 var nopeCheck = findChild(page, "nopeCheck");
361
385
362 var locationActionGroup = findInvisibleChild(page, "locationActionGroup");
386 var locationActionGroup = findInvisibleChild(page, "locationActionGroup");
363− tryCompare(locationActionGroup.location, "state", false);
387+ activateLocationSpy.target = locationActionGroup.location;
364− tryCompare(locationActionGroup.gps, "state", false);
388+ activateGPSSpy.target = locationActionGroup.gps;
365
389
366 tap(gpsCheck);
390 tap(gpsCheck);
367 tryCompare(gpsCheck, "checked", true);
391 tryCompare(gpsCheck, "checked", true);
@@ -370,8 +394,8 @@ Item {
370
394
371 tap(findChild(page, "forwardButton"));
395 tap(findChild(page, "forwardButton"));
372 tryCompare(AccountsService, "hereEnabled", false);
396 tryCompare(AccountsService, "hereEnabled", false);
373− tryCompare(locationActionGroup.location, "state", true);
397+ tryCompare(activateLocationSpy, "count", 1)
374− tryCompare(locationActionGroup.gps, "state", true);
398+ tryCompare(activateGPSSpy, "count", 1)
375 }
399 }
376
400
377 function test_locationNope() {
401 function test_locationNope() {
@@ -381,8 +405,8 @@ Item {
381 var nopeCheck = findChild(page, "nopeCheck");
405 var nopeCheck = findChild(page, "nopeCheck");
382
406
383 var locationActionGroup = findInvisibleChild(page, "locationActionGroup");
407 var locationActionGroup = findInvisibleChild(page, "locationActionGroup");
384− tryCompare(locationActionGroup.location, "state", false);
408+ activateLocationSpy.target = locationActionGroup.location;
385− tryCompare(locationActionGroup.gps, "state", false);
409+ activateGPSSpy.target = locationActionGroup.gps;
386
410
387 tap(nopeCheck);
411 tap(nopeCheck);
388 tryCompare(gpsCheck, "checked", false);
412 tryCompare(gpsCheck, "checked", false);
@@ -391,8 +415,8 @@ Item {
391
415
392 tap(findChild(page, "forwardButton"));
416 tap(findChild(page, "forwardButton"));
393 tryCompare(AccountsService, "hereEnabled", false);
417 tryCompare(AccountsService, "hereEnabled", false);
394− tryCompare(locationActionGroup.location, "state", false);
418+ tryCompare(activateLocationSpy, "count", 0)
395− tryCompare(locationActionGroup.gps, "state", false);
419+ tryCompare(activateGPSSpy, "count", 0)
396 }
420 }
397
421
398 function test_locationHere() {
422 function test_locationHere() {
@@ -402,8 +426,8 @@ Item {
402 var nopeCheck = findChild(page, "nopeCheck");
426 var nopeCheck = findChild(page, "nopeCheck");
403
427
404 var locationActionGroup = findInvisibleChild(page, "locationActionGroup");
428 var locationActionGroup = findInvisibleChild(page, "locationActionGroup");
405− tryCompare(locationActionGroup.location, "state", false);
429+ activateLocationSpy.target = locationActionGroup.location;
406− tryCompare(locationActionGroup.gps, "state", false);
430+ activateGPSSpy.target = locationActionGroup.gps;
407
431
408 // no tap because HERE is the default
432 // no tap because HERE is the default
409 tryCompare(gpsCheck, "checked", false);
433 tryCompare(gpsCheck, "checked", false);
@@ -412,8 +436,8 @@ Item {
412
436
413 tap(findChild(page, "forwardButton"));
437 tap(findChild(page, "forwardButton"));
414 tryCompare(AccountsService, "hereEnabled", true);
438 tryCompare(AccountsService, "hereEnabled", true);
415− tryCompare(locationActionGroup.location, "state", true);
439+ tryCompare(activateLocationSpy, "count", 1)
416− tryCompare(locationActionGroup.gps, "state", true);
440+ tryCompare(activateGPSSpy, "count", 1)
417 }
441 }
418
442
419 function test_locationHereTerms() {
443 function test_locationHereTerms() {
tests/qmltests/tst_Shell.qml+3−3
@@ -222,7 +222,7 @@ Item {
222
222
223 notifications.model = mockNotificationsModel;
223 notifications.model = mockNotificationsModel;
224
224
225− // FIXME: Hack: SortFilterProxyModelQML doesn't work with QML ListModels which we use
225+ // FIXME: Hack: UnitySortFilterProxyModelQML doesn't work with QML ListModels which we use
226 // for mocking here (RoleType can't be found in the QML model). As we only need to show
226 // for mocking here (RoleType can't be found in the QML model). As we only need to show
227 // one SnapDecision lets just disable the filtering and make appear any notification as a
227 // one SnapDecision lets just disable the filtering and make appear any notification as a
228 // SnapDecision.
228 // SnapDecision.
@@ -245,7 +245,7 @@ Item {
245
245
246 // Clicking the button should dismiss the notification and return focus
246 // Clicking the button should dismiss the notification and return focus
247 var buttonAccept = findChild(notification, "notify_button0");
247 var buttonAccept = findChild(notification, "notify_button0");
248− mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2);
248+ mouseClick(buttonAccept);
249
249
250 // Make sure we're back to normal
250 // Make sure we're back to normal
251 tryCompare(app.session.surface, "activeFocus", true);
251 tryCompare(app.session.surface, "activeFocus", true);
@@ -463,7 +463,7 @@ Item {
463 var launcher = findChild(shell, "launcherPanel")
463 var launcher = findChild(shell, "launcherPanel")
464 tryCompareFunction(function() {return launcher.x === 0 || launcher.x === -launcher.width;}, true);
464 tryCompareFunction(function() {return launcher.x === 0 || launcher.x === -launcher.width;}, true);
465 if (launcher.x === 0) {
465 if (launcher.x === 0) {
466− mouseClick(shell, shell.width / 2, shell.height / 2)
466+ mouseClick(shell)
467 }
467 }
468 tryCompare(launcher, "x", -launcher.width)
468 tryCompare(launcher, "x", -launcher.width)
469
469
tests/qmltests/tst_ShellWithPin.qml+31
@@ -116,6 +116,12 @@ Item {
116 signalName: "resettingDevice"
116 signalName: "resettingDevice"
117 }
117 }
118
118
119+ SignalSpy {
120+ id: promptSpy
121+ target: LightDM.Greeter
122+ signalName: "showPrompt"
123+ }
124+
119 Telephony.CallEntry {
125 Telephony.CallEntry {
120 id: phoneCall
126 id: phoneCall
121 phoneNumber: "+447812221111"
127 phoneNumber: "+447812221111"
@@ -472,5 +478,30 @@ Item {
472
478
473 }
479 }
474
480
481+ /* We had a bug (1395075) where if a user kept swiping as the greeter
482+ loaded, they would be able to get into the session before the
483+ lockscreen appeared. Make sure that doesn't happen. */
484+ function test_earlyDisable() {
485+ // Kill current shell
486+ shellLoader.itemDestroyed = false;
487+ shellLoader.active = false;
488+ tryCompare(shellLoader, "itemDestroyed", true);
489+ LightDM.Greeter.authenticate(""); // reset greeter
490+
491+ // Create new shell
492+ promptSpy.clear();
493+ shellLoader.active = true;
494+ tryCompareFunction(function() {return shell !== null}, true);
495+
496+ // Confirm that we start disabled
497+ compare(promptSpy.count, 0);
498+ verify(!shell.enabled);
499+
500+ // And that we only become enabled once the lockscreen is up
501+ tryCompare(shell, "enabled", true);
502+ verify(promptSpy.count > 0);
503+ var lockscreen = findChild(shell, "lockscreen");
504+ verify(lockscreen.shown);
505+ }
475 }
506 }
476}
507}
tests/qmltests/tst_TabletShell.qml+1−1
@@ -211,7 +211,7 @@ Row {
211 tryCompare(passwordMouseArea, "enabled", isButton)
211 tryCompare(passwordMouseArea, "enabled", isButton)
212
212
213 var passwordInput = findChild(shell, "passwordInput")
213 var passwordInput = findChild(shell, "passwordInput")
214− mouseClick(passwordInput, passwordInput.width / 2, passwordInput.height / 2)
214+ mouseClick(passwordInput)
215 }
215 }
216
216
217 function confirmLoggedIn(loggedIn) {
217 function confirmLoggedIn(loggedIn) {
tests/utils/modules/Unity/Test/UnityTestCase.qml+71
@@ -37,6 +37,67 @@ TestCase {
37 this.getCurrentTimeMs = function() {return this.currentTimeMs}
37 this.getCurrentTimeMs = function() {return this.currentTimeMs}
38 }
38 }
39
39
40+ function mouseClick(item, x, y, button, modifiers, delay) {
41+ if (button === undefined)
42+ button = Qt.LeftButton;
43+ if (modifiers === undefined)
44+ modifiers = Qt.NoModifier;
45+ if (delay === undefined)
46+ delay = -1;
47+ if (x === undefined)
48+ x = item.width / 2;
49+ if (y === undefined)
50+ y = item.height / 2;
51+ if (!qtest_events.mouseClick(item, x, y, button, modifiers, delay))
52+ qtest_fail("window not shown", 2);
53+ }
54+
55+ function mouseDoubleClick(item, x, y, button, modifiers, delay) {
56+ if (button === undefined)
57+ button = Qt.LeftButton;
58+ if (modifiers === undefined)
59+ modifiers = Qt.NoModifier;
60+ if (delay === undefined)
61+ delay = -1;
62+ if (x === undefined)
63+ x = item.width / 2;
64+ if (y === undefined)
65+ y = item.height / 2;
66+ if (!qtest_events.mouseDoubleClick(item, x, y, button, modifiers, delay))
67+ qtest_fail("window not shown", 2)
68+ }
69+
70+ function mousePress(item, x, y, button, modifiers, delay) {
71+ if (button === undefined)
72+ button = Qt.LeftButton;
73+ if (modifiers === undefined)
74+ modifiers = Qt.NoModifier;
75+ if (delay === undefined)
76+ delay = -1;
77+ if (x === undefined)
78+ x = item.width / 2;
79+ if (y === undefined)
80+ y = item.height / 2;
81+ if (!qtest_events.mousePress(item, x, y, button, modifiers, delay))
82+ qtest_fail("window not shown", 2)
83+ }
84+
85+ function mouseRelease(item, x, y, button, modifiers, delay) {
86+ if (button === undefined)
87+ button = Qt.LeftButton;
88+ if (modifiers === undefined)
89+ modifiers = Qt.NoModifier;
90+ if (delay === undefined)
91+ delay = -1;
92+ if (x === undefined)
93+ x = item.width / 2;
94+ if (y === undefined)
95+ y = item.height / 2;
96+ if (!qtest_events.mouseRelease(item, x, y, button, modifiers, delay))
97+ qtest_fail("window not shown", 2)
98+ }
99+
100+
40 // Flickable won't recognise a single mouse move as dragging the flickable.
101 // Flickable won't recognise a single mouse move as dragging the flickable.
41 // Use 5 steps because it's what
102 // Use 5 steps because it's what
42 // Qt uses in QQuickViewTestUtil::flick
103 // Qt uses in QQuickViewTestUtil::flick
@@ -381,4 +442,14 @@ TestCase {
381 }
442 }
382 }
443 }
383 }
444 }
445+
446+ // TODO This function can be removed altogether once we use Qt 5.5 which has the same feature
447+ function waitForRendering(item, timeout) {
448+ if (timeout === undefined)
449+ timeout = 5000;
450+ if (!item)
451+ qtest_fail("No item given to waitForRendering", 1);
452+ return qtest_results.waitForRendering(item, timeout);
453+ }
454+
384}
455}