on xenial help sign in
Merge trunk
commit854e59e2eb30f246d62642cee84da24097576473 authorMichał Sawicz <michal.sawicz@canonical.com> dateWed 23 Sep 2015, 17:06 (11 years ago) parent048cdaa5d8d0b5
63 files changed+196−107
CMakeLists.txt+2−1 cmake/modules/QmlTest.cmake+1 debian/changelog+23 debian/tests/control+5 debian/tests/qmluitests.sh+19 include/paths.h.in+16−10 plugins/IntegratedLightDM/liblightdm/CMakeLists.txt+1−1 plugins/ScreenGrabber/screengrabber.cpp+4−2 plugins/Wizard/System.cpp+11−3 plugins/Wizard/System.h+3 po/hu.po+9−9 qml/Dash/PreviewListView.qml+12−4 qml/Greeter/Infographics.qml+1−1 src/Dash/main.cpp+1−1 src/Panel/Indicators/client/indicatorsclient.cpp+1−1 src/main.cpp+1−1 tests/CMakeLists.txt+9−3 tests/autopilot/unity8/fixture_setup.py+1−1 tests/autopilot/unity8/shell/tests/__init__.py+1−1 tests/mocks/AccountsService/AccountsService.cpp+1−1 tests/mocks/IntegratedLightDM/liblightdm/CMakeLists.txt+1−1 tests/mocks/Ubuntu/CMakeLists.txt+1 tests/mocks/Ubuntu/Web/CMakeLists.txt+1 tests/mocks/Ubuntu/Web/WebView.qml+25 tests/mocks/Ubuntu/Web/qmldir+4 tests/mocks/Unity/Application/CMakeLists.txt+1 tests/mocks/Unity/Application/MirSurface.cpp+2−2 tests/mocks/Unity/Application/MirSurface.h+3−3 tests/mocks/Unity/Application/MirSurfaceItem.cpp+3−4 tests/mocks/Unity/Application/VirtualKeyboard.cpp+2−4 tests/mocks/Unity/Application/MirSurfaceItem.qml → tests/mocks/Unity/Application/resources/MirSurfaceItem.qml tests/mocks/Unity/Application/VirtualKeyboard.qml → tests/mocks/Unity/Application/resources/VirtualKeyboard.qml tests/mocks/Unity/Application/resources/surfaces.qrc+7 tests/mocks/Unity/Application/resources/vkb_portrait.png tests/mocks/Unity/Launcher/MockLauncherItem.cpp+1−1 tests/mocks/Unity/fake_previewstack.cpp+2−2 tests/mocks/Unity/fake_previewstack.h+1−1 tests/mocks/Unity/fake_resultsmodel.cpp+1−1 tests/mocks/Unity/fake_scope.cpp+3−5 tests/mocks/Unity/fake_scopesoverview.cpp+1−1 tests/mocks/libusermetrics/UserMetrics.cpp+1−5 tests/plugins/Dash/CMakeLists.txt−1 tests/plugins/Dash/cardcreatortest.cpp−1 tests/plugins/Dash/horizontaljournaltest.cpp−1 tests/plugins/Dash/horizontaljournaltry.cpp−1 tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp−1 tests/plugins/Dash/listviewwithpageheadersectiontest.cpp−1 tests/plugins/Dash/listviewwithpageheadertest.cpp−1 tests/plugins/Dash/organicgridtest.cpp−1 tests/plugins/Dash/organicgridtry.cpp−1 tests/plugins/Dash/verticaljournaltest.cpp−1 tests/plugins/Dash/verticaljournaltry.cpp−1 tests/plugins/IntegratedLightDM/CMakeLists.txt+1−1 tests/plugins/Ubuntu/Gestures/CMakeLists.txt+3−7 tests/plugins/Ubuntu/Gestures/GestureTest.cpp−2 tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp−1 tests/qmltests/CMakeLists.txt+2−2 tests/qmltests/Components/CMakeLists.txt+1−4 tests/qmltests/Components/tst_DragHandle.cpp−2 tests/qmltests/Components/tst_EdgeDragEvaluator.cpp−1 tests/qmltests/Dash/tst_Card.qml+2−2 tests/qmltests/Greeter/tst_Infographics.qml+4−3 tools/scopetool.cpp+1−1
CMakeLists.txt+2−1
@@ -13,8 +13,9 @@ endif()
1313
1414set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
1515
16−# Instruct CMake to run moc automatically when needed.
16+# Instruct CMake to run moc and rcc automatically when needed.
1717set(CMAKE_AUTOMOC ON)
18+set(CMAKE_AUTORCC ON)
1819
1920# enable QML debugging
2021string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower) # Build types should always be lowercase but sometimes they are not.
cmake/modules/QmlTest.cmake+1
@@ -127,6 +127,7 @@ function(add_executable_test COMPONENT_NAME TARGET)
127127 file(MAKE_DIRECTORY ${ARTIFACTS_DIR}/${path})
128128 set(file_logger -o ${ARTIFACTS_DIR}/${path}/test${COMPONENT_NAME}.xml,xunitxml)
129129 else()
130+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
130131 set(file_logger -o ${CMAKE_CURRENT_BINARY_DIR}/test${COMPONENT_NAME}.xml,xunitxml)
131132 endif()
132133
debian/changelog+23
@@ -1,3 +1,26 @@
1+unity8 (8.11+15.10.20150922.1-0ubuntu1) wily; urgency=medium
2+
3+ [ Albert Astals Cid ]
4+ * Adapt test to code changes
5+ * Add DEP-8 test for all our UI and unit tests
6+ * Keep the PreviewStack around to avoid mem leaks (LP: #1495467)
7+
8+ [ CI Train Bot ]
9+ * Resync trunk.
10+
11+ [ Michael Terry ]
12+ * When libusermetrics gives us an empty string, still show the
13+ infographic circle rather than hiding it. This is a follow-on to a
14+ branch [1] that changes the "no data available" label to the empty
15+ string.
16+
17+ [ Michał Sawicz ]
18+ * Add DEP-8 test for all our UI and unit tests
19+ * Fix integrated LightDM path
20+ * Resync trunk
21+
22+ -- Michał Sawicz <michal.sawicz@canonical.com> Tue, 22 Sep 2015 12:57:15 +0000
23+
124unity8 (8.11+15.10.20150915-0ubuntu1) wily; urgency=medium
225
326 [ Albert Astals Cid ]
debian/tests/controlnew file+5
@@ -0,0 +1,5 @@
1+Tests: qmluitests.sh
2+Restrictions: allow-stderr
3+Depends: @,
4+ @builddeps@,
5+ xvfb,
debian/tests/qmluitests.shnew file+19
@@ -0,0 +1,19 @@
1+#!/bin/sh
2+
3+SHELL_QML_PATH=$(pkg-config --variable=plugindir unity-shell-api)
4+UNITY_SOURCE_DIR=$(readlink -f $(dirname $(readlink -f $0))/../..)
5+
6+dh_auto_configure -- -DCMAKE_INSTALL_LOCALSTATEDIR="/var" \
7+ -DARTIFACTS_DIR=${ADT_ARTIFACTS} \
8+ -DUNITY_PLUGINPATH=${SHELL_QML_PATH} \
9+ -DUNITY_MOCKPATH=${SHELL_QML_PATH}/mocks
10+dh_auto_build --parallel -- -C tests/mocks
11+dh_auto_build --parallel -- -C tests/plugins
12+dh_auto_build --parallel -- -C tests/qmltests
13+dh_auto_build --parallel -- -C tests/uqmlscene
14+dh_auto_build --parallel -- -C tests/utils
15+
16+export UNITY_SOURCE_DIR
17+
18+# FIXME: --parallel here causes some failures
19+dh_auto_build -- -k xvfballtests
include/paths.h.in+16−10
@@ -33,11 +33,21 @@ inline bool isRunningInstalled() {
3333 return installed;
3434}
3535
36+inline QString buildDirectory() {
37+ if (!qEnvironmentVariableIsEmpty("UNITY_BINARY_DIR")) return qgetenv("UNITY_BINARY_DIR");
38+ return QString("@CMAKE_BINARY_DIR@");
39+}
40+
41+inline QString sourceDirectory() {
42+ if (!qEnvironmentVariableIsEmpty("UNITY_SOURCE_DIR")) return qgetenv("UNITY_SOURCE_DIR");
43+ return QString("@CMAKE_SOURCE_DIR@");
44+}
45+
3646inline QString translationDirectory() {
3747 if (isRunningInstalled()) {
3848 return QString("@CMAKE_INSTALL_PREFIX@/share/locale");
3949 } else {
40− return QString("@CMAKE_BINARY_DIR@/po/locale");
50+ return QString(buildDirectory() + "/po/locale");
4151 }
4252}
4353
@@ -45,14 +55,14 @@ inline QString qmlDirectory() {
4555 if (isRunningInstalled()) {
4656 return QString("@CMAKE_INSTALL_PREFIX@/@SHELL_APP_DIR@/");
4757 } else {
48− return QString("@CMAKE_SOURCE_DIR@/qml/");
58+ return QString(sourceDirectory() + "/qml");
4959 }
5060}
5161
5262inline QStringList overrideImportPaths() {
5363 QStringList paths;
5464 if (!isRunningInstalled()) {
55− paths << QString("@CMAKE_BINARY_DIR@/plugins");
65+ paths << QString(buildDirectory() + "/plugins");
5666 }
5767 return paths;
5868}
@@ -62,7 +72,7 @@ inline QStringList nonMirImportPaths() {
6272 if (isRunningInstalled()) {
6373 paths << QString("@CMAKE_INSTALL_PREFIX@/@SHELL_INSTALL_QML@/nonmirplugins");
6474 } else {
65− paths << QString("@CMAKE_BINARY_DIR@/nonmirplugins");
75+ paths << QString(buildDirectory() + "/nonmirplugins");
6676 }
6777 return paths;
6878}
@@ -77,7 +87,7 @@ inline QStringList fallbackImportPaths() {
7787 } else {
7888 paths << QString("@USS_PRIVATE_PLUGINDIR@");
7989 paths << QString("@SHELL_PLUGINDIR@");
80− paths << QString("@CMAKE_BINARY_DIR@/tests/mocks");
90+ paths << QString(buildDirectory() + "/tests/mocks");
8191 }
8292 return paths;
8393}
@@ -86,7 +96,7 @@ inline QString mockPluginsDir() {
8696 if (isRunningInstalled()) {
8797 return QString("@CMAKE_INSTALL_PREFIX@/@SHELL_INSTALL_QML@/mocks");
8898 } else {
89− return QString("@CMAKE_BINARY_DIR@/tests/mocks");
99+ return QString(buildDirectory() + "/tests/mocks");
90100 }
91101}
92102
@@ -99,10 +109,6 @@ inline QStringList shellDataDirs() {
99109 return dirs;
100110}
101111
102−inline QString sourceDirectory() {
103− return QString("@CMAKE_SOURCE_DIR@/");
104−}
105−
106112inline void prependImportPaths(QQmlEngine *engine, const QStringList &paths)
107113{
108114 QStringList importPathList = engine->importPathList();
plugins/IntegratedLightDM/liblightdm/CMakeLists.txt+1−1
@@ -33,5 +33,5 @@ set_target_properties(MockLightDM-demo-shared PROPERTIES
3333 OUTPUT_NAME lightdm-qt5-2)
3434
3535install(TARGETS MockLightDM-demo-shared
36− DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/demo
36+ DESTINATION ${SHELL_INSTALL_QML}/mocks/IntegratedLightDM/demo
3737 )
plugins/ScreenGrabber/screengrabber.cpp+4−2
@@ -19,6 +19,7 @@
1919#include <QDir>
2020#include <QDateTime>
2121#include <QStandardPaths>
22+#include <QTemporaryDir>
2223#include <QtGui/QImage>
2324#include <QtGui/QGuiApplication>
2425#include <QtQuick/QQuickWindow>
@@ -42,8 +43,9 @@ ScreenGrabber::ScreenGrabber(QObject *parent)
4243 QDir screenshotsDir;
4344 if (qEnvironmentVariableIsSet("UNITY_TESTING")) {
4445 qDebug() << "Using test environment";
45− QStandardPaths::setTestModeEnabled(true);
46− screenshotsDir = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
46+ QTemporaryDir tDir;
47+ tDir.setAutoRemove(false);
48+ screenshotsDir = tDir.path();
4749 } else {
4850 qDebug() << "Using real environment";
4951 screenshotsDir = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
plugins/Wizard/System.cpp+11−3
@@ -33,8 +33,10 @@ System::System()
3333 // Register the argument needed for UpdateActivationEnvironment below
3434 qDBusRegisterMetaType<QMap<QString,QString>>();
3535
36− m_fsWatcher.addPath(wizardEnabledPath());
37− connect(&m_fsWatcher, &QFileSystemWatcher::fileChanged, this, &System::wizardEnabledChanged);
36+ if(!wizardEnabled()) {
37+ m_fsWatcher.addPath(wizardEnabledPath());
38+ }
39+ connect(&m_fsWatcher, &QFileSystemWatcher::fileChanged, this, &System::watcherFileChanged);
3840}
3941
4042QString System::wizardEnabledPath()
@@ -59,10 +61,16 @@ void System::setWizardEnabled(bool enabled)
5961 QDir(wizardEnabledPath()).mkpath("..");
6062 QFile(wizardEnabledPath()).open(QIODevice::WriteOnly);
6163 m_fsWatcher.addPath(wizardEnabledPath());
62− wizardEnabledChanged();
64+ Q_EMIT wizardEnabledChanged();
6365 }
6466}
6567
68+void System::watcherFileChanged()
69+{
70+ Q_EMIT wizardEnabledChanged();
71+ m_fsWatcher.removePath(wizardEnabledPath());
72+}
73+
6674void System::setSessionVariable(const QString &variable, const QString &value)
6775{
6876 // We need to update both upstart's and DBus's environment
plugins/Wizard/System.h+3
@@ -38,6 +38,9 @@ public Q_SLOTS:
3838Q_SIGNALS:
3939 void wizardEnabledChanged();
4040
41+private Q_SLOTS:
42+ void watcherFileChanged();
43+
4144private:
4245 Q_DISABLE_COPY(System)
4346
po/hu.po+9−9
@@ -8,15 +8,15 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2015-08-25 14:53+0200\n"
11−"PO-Revision-Date: 2015-09-18 08:40+0000\n"
11+"PO-Revision-Date: 2015-09-21 12:40+0000\n"
1212"Last-Translator: Richard Somlói <ricsipontaz@gmail.com>\n"
1313"Language-Team: Hungarian <hu@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2015-09-19 05:37+0000\n"
19−"X-Generator: Launchpad (build 17746)\n"
18+"X-Launchpad-Export-Date: 2015-09-22 06:01+0000\n"
19+"X-Generator: Launchpad (build 17749)\n"
2020
2121#: plugins/LightDM/Greeter.cpp:112
2222msgid "Password: "
@@ -73,7 +73,7 @@ msgstr "%a %p. %I.%M"
7373#. en_GB example: "%a %b %d\u2003%l:%M %p" --> "Fri 31 Oct 1:00 PM"
7474#: plugins/Utils/relativetimeformatter.cpp:190
7575msgid "%a %d %b %l:%M %p"
76−msgstr "%d. %b. %a, %p. %I.%M"
76+msgstr "%b. %d., %a %p. %I.%M"
7777
7878#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
7979#. This format string is used for showing, on a 24-hour clock, times that happen yesterday.
@@ -113,11 +113,11 @@ msgstr "%a %H.%M"
113113#. en_GB example: "%a %b %d\u2003%H:%M" --> "Fri 31 Oct 13:00"
114114#: plugins/Utils/relativetimeformatter.cpp:234
115115msgid "%a %d %b %H:%M"
116−msgstr "%d. %b., %a %H.%M"
116+msgstr "%b. %d., %a %H.%M"
117117
118118#: qml/Components/DelayedLockscreen.qml:49
119119msgid "Device Locked"
120−msgstr "Eszköz lezárva"
120+msgstr "Az eszköz zárolva"
121121
122122#: qml/Components/DelayedLockscreen.qml:64
123123msgid "You have been locked out due to too many failed passphrase attempts."
@@ -553,7 +553,7 @@ msgstr "Folytatás"
553553
554554#: qml/Wizard/Pages/passwd-set.qml:61
555555msgid "Choose your passcode"
556−msgstr "Jelkód kiválasztása"
556+msgstr "Jelkód megadása"
557557
558558#: qml/Wizard/Pages/passwd-set.qml:68
559559msgid "Passphrase must be 4 characters long"
@@ -573,12 +573,12 @@ msgstr "Kezdjünk is bele."
573573
574574#: qml/Wizard/Pages/20-sim.qml:25
575575msgid "Add a SIM card and restart your device"
576−msgstr "Helyezzen be egy SIM kártyát és indítsa újra az eszközét"
576+msgstr "Helyezzen be egy SIM kártyát és indítsa újra az eszközt"
577577
578578#: qml/Wizard/Pages/20-sim.qml:59
579579msgid "Without it, you won’t be able to make calls or use text messaging."
580580msgstr ""
581−"Anélkül nem indíthat vagy fogadhat hívásokat és nem küldhet vagy fogadhat "
581+"Anélkül nem indíthat vagy fogadhat hívásokat, és nem küldhet vagy fogadhat "
582582"üzeneteket."
583583
584584#: qml/Wizard/Pages/20-sim.qml:73 qml/Wizard/Pages/40-wifi.qml:215
qml/Dash/PreviewListView.qml+12−4
@@ -101,18 +101,26 @@ Item {
101101
102102 isCurrent: ListView.isCurrentItem
103103
104− previewModel: {
104+ readonly property var previewStack: {
105105 if (root.open) {
106106 if (index === root.initialIndex) {
107− return root.initialIndexPreviewStack.getPreviewModel(0);
107+ return root.initialIndexPreviewStack;
108108 } else {
109− var previewStack = root.scope.preview(result, root.categoryId);
110− return previewStack.getPreviewModel(0);
109+ return root.scope.preview(result, root.categoryId);
111110 }
112111 } else {
113112 return null;
114113 }
115114 }
115+
116+ previewModel: {
117+ if (previewStack) {
118+ return previewStack.getPreviewModel(0);
119+ } else {
120+ return null;
121+ }
122+ }
123+
116124 scopeStyle: root.scopeStyle
117125 }
118126 }
qml/Greeter/Infographics.qml+1−1
@@ -73,7 +73,7 @@ Item {
7373 notification.hideAnim.start()
7474 }
7575
76− visible: model.label !== ""
76+ visible: model.username !== ""
7777
7878 Component.onCompleted: startShowAnimation()
7979
src/Dash/main.cpp+1−1
@@ -101,7 +101,7 @@ int main(int argc, const char *argv[])
101101 mouseTouchAdaptor = MouseTouchAdaptor::instance();
102102 }
103103
104− QUrl source(::qmlDirectory()+"Dash/DashApplication.qml");
104+ QUrl source(::qmlDirectory() + "/Dash/DashApplication.qml");
105105 prependImportPaths(view->engine(), ::overrideImportPaths());
106106 appendImportPaths(view->engine(), ::fallbackImportPaths());
107107
src/Panel/Indicators/client/indicatorsclient.cpp+1−1
@@ -36,7 +36,7 @@ IndicatorsClient::IndicatorsClient(int &argc, char **argv)
3636 QStringList args = m_application->arguments();
3737
3838 m_view = new QQuickView;
39− m_view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()+"Panel/Indicators/client/"));
39+ m_view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory() + "/Panel/Indicators/client/"));
4040 prependImportPaths(m_view->engine(), ::overrideImportPaths());
4141 appendImportPaths(m_view->engine(), ::fallbackImportPaths());
4242
src/main.cpp+1−1
@@ -105,7 +105,7 @@ int main(int argc, const char *argv[])
105105 mouseTouchAdaptor = MouseTouchAdaptor::instance();
106106 }
107107
108− QUrl source(::qmlDirectory()+"OrientedShell.qml");
108+ QUrl source(::qmlDirectory() + "/OrientedShell.qml");
109109 prependImportPaths(view->engine(), ::overrideImportPaths());
110110 if (!isMirServer) {
111111 prependImportPaths(view->engine(), ::nonMirImportPaths());
tests/CMakeLists.txt+9−3
@@ -22,11 +22,17 @@ add_subdirectory(uqmlscene)
2222add_executable(qmlscene ALIAS uqmlscene)
2323import_executables(dbus-test-runner)
2424
25+set(UNITY_PLUGINPATH "${CMAKE_BINARY_DIR}/plugins" CACHE PATH "Path to pre-built unity8 plugin dir.")
26+set(UNITY_MOCKPATH "${CMAKE_BINARY_DIR}/tests/mocks" CACHE PATH "Path to pre-built unity8 mock dir.")
27+
28+# Pre-built mocks have preference, pre-built plugins replace local build
2529set(UNITY_IMPORT_PATHS
30+ ${UNITY_MOCKPATH}
2631 ${CMAKE_BINARY_DIR}/tests/mocks
2732 ${CMAKE_BINARY_DIR}/tests/utils/modules
28− ${CMAKE_BINARY_DIR}/plugins
33+ ${UNITY_PLUGINPATH}
2934)
35+list(REMOVE_DUPLICATES UNITY_IMPORT_PATHS)
3036set(UNITY_IMPORT_PATHS ${UNITY_IMPORT_PATHS} CACHE INTERNAL "")
3137
3238macro(unity8_parse_arguments)
@@ -40,8 +46,8 @@ macro(unity8_parse_arguments)
4046 set(ld_paths)
4147 if(U8TEST_LIGHTDM)
4248 list(APPEND ld_paths
43− ${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics
44− ${CMAKE_BINARY_DIR}/tests/mocks/LightDM/liblightdm
49+ ${UNITY_MOCKPATH}/libusermetrics
50+ ${UNITY_MOCKPATH}/IntegratedLightDM/liblightdm
4551 )
4652 endif()
4753
tests/autopilot/unity8/fixture_setup.py+1−1
@@ -74,7 +74,7 @@ class LaunchUnityWithFakeSensors(fixtures.Fixture):
7474 def _get_lightdm_mock_path(self):
7575 lib_path = get_mocks_library_path()
7676 lightdm_mock_path = os.path.abspath(
77− os.path.join(lib_path, "LightDM", "liblightdm")
77+ os.path.join(lib_path, "IntegratedLightDM", "liblightdm")
7878 )
7979
8080 if not os.path.exists(lightdm_mock_path):
tests/autopilot/unity8/shell/tests/__init__.py+1−1
@@ -261,7 +261,7 @@ class UnityTestCase(AutopilotTestCase):
261261 def _get_lightdm_mock_path(self):
262262 lib_path = get_mocks_library_path()
263263 lightdm_mock_path = os.path.abspath(
264− os.path.join(lib_path, "LightDM", "liblightdm")
264+ os.path.join(lib_path, "IntegratedLightDM", "liblightdm")
265265 )
266266
267267 if not os.path.exists(lightdm_mock_path):
tests/mocks/AccountsService/AccountsService.cpp+1−1
@@ -24,7 +24,7 @@ AccountsService::AccountsService(QObject* parent)
2424 : QObject(parent),
2525 m_enableLauncherWhileLocked(true),
2626 m_enableIndicatorsWhileLocked(true),
27− m_backgroundFile(qmlDirectory() + "graphics/phone_background.jpg"),
27+ m_backgroundFile(qmlDirectory() + "/graphics/phone_background.jpg"),
2828 m_statsWelcomeScreen(true),
2929 m_failedLogins(0),
3030 m_demoEdges(false),
tests/mocks/IntegratedLightDM/liblightdm/CMakeLists.txt+1−1
@@ -14,5 +14,5 @@ set_target_properties(MockLightDM PROPERTIES
1414 OUTPUT_NAME lightdm-qt5-2)
1515
1616install(TARGETS MockLightDM
17− DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/liblightdm
17+ DESTINATION ${SHELL_INSTALL_QML}/mocks/IntegratedLightDM/liblightdm
1818 )
tests/mocks/Ubuntu/CMakeLists.txt+1
@@ -5,3 +5,4 @@ add_subdirectory(SystemImage)
55add_subdirectory(SystemSettings)
66add_subdirectory(Telephony)
77add_subdirectory(Thumbnailer)
8+add_subdirectory(Web)
tests/mocks/Ubuntu/Web/CMakeLists.txtnew file+1
@@ -0,0 +1 @@
1+add_unity8_mock(Ubuntu.Web 0.2 Ubuntu/Web)
tests/mocks/Ubuntu/Web/WebView.qmlnew file+25
@@ -0,0 +1,25 @@
1+/*
2+ * Copyright (C) 2015 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+
18+import QtQuick 2.0
19+
20+Item {
21+ property url url
22+ property int loadProgress: 0
23+
24+ onUrlChanged: loadProgress = 100
25+}
tests/mocks/Ubuntu/Web/qmldirnew file+4
@@ -0,0 +1,4 @@
1+module Ubuntu.Web
2+typeinfo Web.qmltypes
3+
4+WebView 0.2 WebView.qml
tests/mocks/Unity/Application/CMakeLists.txt+1
@@ -18,6 +18,7 @@ set(FakeUnityApplicationQml_SOURCES
1818 ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/Mir.h
1919 ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/MirSurfaceInterface.h
2020 ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/MirSurfaceItemInterface.h
21+ resources/surfaces.qrc
2122)
2223
2324add_library(FakeUnityApplicationQml MODULE ${FakeUnityApplicationQml_SOURCES})
tests/mocks/Unity/Application/MirSurface.cpp+2−2
@@ -22,7 +22,7 @@ MirSurface::MirSurface(const QString& name,
2222 Mir::Type type,
2323 Mir::State state,
2424 const QUrl& screenshot,
25− const QString &qmlFilePath)
25+ const QUrl &qmlFilePath)
2626 : unity::shell::application::MirSurfaceInterface(nullptr)
2727 , m_name(name)
2828 , m_type(type)
@@ -87,7 +87,7 @@ void MirSurface::setLive(bool live)
8787 }
8888}
8989
90−QString MirSurface::qmlFilePath() const
90+QUrl MirSurface::qmlFilePath() const
9191{
9292 return m_qmlFilePath;
9393}
tests/mocks/Unity/Application/MirSurface.h+3−3
@@ -38,7 +38,7 @@ public:
3838 Mir::Type type,
3939 Mir::State state,
4040 const QUrl& screenshot,
41− const QString &qmlFilePath = QString());
41+ const QUrl &qmlFilePath = QUrl());
4242 virtual ~MirSurface();
4343
4444 ////
@@ -76,7 +76,7 @@ public:
7676 /////
7777 // internal mock stuff
7878
79− QString qmlFilePath() const;
79+ QUrl qmlFilePath() const;
8080
8181 QUrl screenshotUrl() const;
8282 void setScreenshotUrl(QUrl);
@@ -102,7 +102,7 @@ private:
102102 Mir::State m_state;
103103 Mir::OrientationAngle m_orientationAngle;
104104 QUrl m_screenshotUrl;
105− QString m_qmlFilePath;
105+ QUrl m_qmlFilePath;
106106 bool m_live;
107107 int m_viewCount;
108108 bool m_activeFocus;
tests/mocks/Unity/Application/MirSurfaceItem.cpp+3−4
@@ -215,12 +215,11 @@ void MirSurfaceItem::setSurface(MirSurfaceInterface* surface)
215215 QQuickView *quickView =
216216 qobject_cast<QQuickView*>(QGuiApplication::topLevelWindows()[0]);
217217
218− QString qmlComponentFilePath;
218+ QUrl qmlComponentFilePath;
219219 if (!m_qmlSurface->qmlFilePath().isEmpty()) {
220− qmlComponentFilePath.append(m_qmlSurface->qmlFilePath());
220+ qmlComponentFilePath = m_qmlSurface->qmlFilePath();
221221 } else {
222− qmlComponentFilePath = QString("%1/Unity/Application/MirSurfaceItem.qml")
223− .arg(mockPluginsDir());
222+ qmlComponentFilePath = QUrl("qrc:///Unity/Application/MirSurfaceItem.qml");
224223 }
225224
226225 m_qmlContentComponent = new QQmlComponent(quickView->engine(), qmlComponentFilePath);
tests/mocks/Unity/Application/VirtualKeyboard.cpp+2−4
@@ -26,10 +26,8 @@ VirtualKeyboard::VirtualKeyboard()
2626 : MirSurface("input-method",
2727 Mir::InputMethodType,
2828 Mir::MinimizedState,
29− QString("file://%1/Dash/graphics/phone/screenshots/vkb_portrait.png")
30− .arg(qmlDirectory()),
31− QString("%1/Unity/Application/VirtualKeyboard.qml")
32− .arg(mockPluginsDir()))
29+ QUrl("qrc:///Unity/Application/vkb_portrait.png"),
30+ QUrl("qrc:///Unity/Application/VirtualKeyboard.qml"))
3331{
3432}
3533
tests/mocks/Unity/Application/MirSurfaceItem.qml → tests/mocks/Unity/Application/resources/MirSurfaceItem.qmlrenamed

The content is the same.

tests/mocks/Unity/Application/VirtualKeyboard.qml → tests/mocks/Unity/Application/resources/VirtualKeyboard.qmlrenamed

The content is the same.

tests/mocks/Unity/Application/resources/surfaces.qrcnew file+7
@@ -0,0 +1,7 @@
1+<RCC>
2+ <qresource prefix="/Unity/Application">
3+ <file>VirtualKeyboard.qml</file>
4+ <file>MirSurfaceItem.qml</file>
5+ <file>vkb_portrait.png</file>
6+ </qresource>
7+</RCC>
tests/mocks/Unity/Application/resources/vkb_portrait.pngnew file

Binary file not shown.

tests/mocks/Unity/Launcher/MockLauncherItem.cpp+1−1
@@ -29,7 +29,7 @@ MockLauncherItem::MockLauncherItem(const QString &appId, const QString& desktopF
2929 m_appId(appId),
3030 m_desktopFile(desktopFile),
3131 m_name(name),
32− m_icon(qmlDirectory() + "graphics/applicationIcons/" + icon + ".png"),
32+ m_icon(qmlDirectory() + "/graphics/applicationIcons/" + icon + ".png"),
3333 m_pinned(false),
3434 m_running(false),
3535 m_recent(false),
tests/mocks/Unity/fake_previewstack.cpp+2−2
@@ -21,8 +21,8 @@
2121#include "fake_previewmodel.h"
2222#include "fake_scope.h"
2323
24−PreviewStack::PreviewStack(QObject* parent, Scope *scope)
25− : unity::shell::scopes::PreviewStackInterface(parent)
24+PreviewStack::PreviewStack(Scope *scope)
25+ : unity::shell::scopes::PreviewStackInterface(nullptr)
2626{
2727 m_previews << new PreviewModel(this, scope);
2828}
tests/mocks/Unity/fake_previewstack.h+1−1
@@ -32,7 +32,7 @@ class PreviewStack : public unity::shell::scopes::PreviewStackInterface
3232 Q_OBJECT
3333
3434public:
35− explicit PreviewStack(QObject* parent = 0, Scope* scope = 0);
35+ explicit PreviewStack(Scope* scope = 0);
3636 virtual ~PreviewStack();
3737
3838 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
tests/mocks/Unity/fake_resultsmodel.cpp+1−1
@@ -78,7 +78,7 @@ ResultsModel::data(const QModelIndex& index, int role) const
7878 case RoleTitle:
7979 return QString("Title.%1.%2").arg(m_categoryId).arg(index.row());
8080 case RoleArt:
81− return qmlDirectory() + "graphics/applicationIcons/dash.png";
81+ return qmlDirectory() + "/graphics/applicationIcons/dash.png";
8282 case RoleSubtitle:
8383 return QString("Subtitle.%1.%2").arg(m_categoryId).arg(index.row());
8484 case RoleMascot:
tests/mocks/Unity/fake_scope.cpp+3−5
@@ -201,9 +201,7 @@ PreviewStack* Scope::preview(QVariant const& result, QString const& /*categoryId
201201 if (m_returnNullPreview) {
202202 return nullptr;
203203 } else {
204− // This probably leaks, do we don't care
205− // it's a test after all
206− return new PreviewStack(this, this);
204+ return new PreviewStack(this);
207205 }
208206}
209207
@@ -253,11 +251,11 @@ QVariantMap Scope::customizations() const
253251 m["foreground-color"] = "blue";
254252 m["page-header"] = h;
255253 } else if (m_id == "MockScope4") {
256− h["navigation-background"] = QUrl(sourceDirectory() + "tests/qmltests/Dash/artwork/background.png");
254+ h["navigation-background"] = QUrl(sourceDirectory() + "/tests/qmltests/Dash/artwork/background.png");
257255 m["page-header"] = h;
258256 } else if (m_id == "MockScope5") {
259257 h["background"] = "gradient:///lightgrey/grey";
260− h["logo"] = QUrl(sourceDirectory() + "tests/qmltests/Dash/tst_PageHeader/logo-ubuntu-orange.svg");
258+ h["logo"] = QUrl(sourceDirectory() + "/tests/qmltests/Dash/tst_PageHeader/logo-ubuntu-orange.svg");
261259 h["divider-color"] = "red";
262260 h["navigation-background"] = "color:///black";
263261 m["page-header"] = h;
tests/mocks/Unity/fake_scopesoverview.cpp+1−1
@@ -308,7 +308,7 @@ QVariant ScopesOverviewResultsModel::data(const QModelIndex& index, int role) co
308308 case RoleSubtitle:
309309 return scope && scope->name() == "Videos this is long ab cd ef gh ij kl" ? "tube, movies, cinema, pictures, art, moving images, magic in a box" : QString();
310310 case RoleArt:
311− return qmlDirectory() + "graphics/applicationIcons/dash.png";
311+ return qmlDirectory() + "/graphics/applicationIcons/dash.png";
312312 case RoleMascot:
313313 case RoleEmblem:
314314 case RoleSummary:
tests/mocks/libusermetrics/UserMetrics.cpp+1−5
@@ -416,11 +416,7 @@ UserMetrics::~UserMetrics()
416416
417417QString UserMetrics::label() const
418418{
419− if (d_ptr->m_label.isEmpty()) {
420− return "No data";
421− } else {
422− return d_ptr->m_label;
423− }
419+ return d_ptr->m_label;
424420}
425421
426422QString UserMetrics::username() const
tests/plugins/Dash/CMakeLists.txt−1
@@ -23,7 +23,6 @@ include_directories(
2323remove_definitions(-DQT_NO_KEYWORDS)
2424
2525add_definitions(-DDASHVIEWSTEST_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}")
26−add_definitions(-DBUILT_PLUGINS_DIR="${CMAKE_BINARY_DIR}/plugins")
2726
2827macro(add_lvwph_test FILENAME TESTNAME)
2928 add_executable(${TESTNAME}TestExec
tests/plugins/Dash/cardcreatortest.cpp−1
@@ -35,7 +35,6 @@ private Q_SLOTS:
3535 void init()
3636 {
3737 view = new QQuickView();
38− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
3938 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/cardcreatortest.qml"));
4039 view->show();
4140 QTest::qWaitForWindowExposed(view);
tests/plugins/Dash/horizontaljournaltest.cpp−1
@@ -123,7 +123,6 @@ private Q_SLOTS:
123123 {
124124 view = new QQuickView();
125125 view->setResizeMode(QQuickView::SizeRootObjectToView);
126− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
127126
128127 model = new WidthModel();
129128 QStringList widthList;
tests/plugins/Dash/horizontaljournaltry.cpp−1
@@ -63,7 +63,6 @@ int main(int argc, char *argv[])
6363
6464 QQuickView *view = new QQuickView();
6565 view->setResizeMode(QQuickView::SizeRootObjectToView);
66− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
6766
6867 QWidthModela model;
6968 QStringList heightList;
tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp−1
@@ -168,7 +168,6 @@ private Q_SLOTS:
168168 void init()
169169 {
170170 view = new QQuickView();
171− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
172171 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertestsectionexternalmodel.qml"));
173172 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
174173 QVERIFY(lvwph);
tests/plugins/Dash/listviewwithpageheadersectiontest.cpp−1
@@ -133,7 +133,6 @@ private Q_SLOTS:
133133 void init()
134134 {
135135 view = new QQuickView();
136− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
137136 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertestsection.qml"));
138137 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
139138 model = view->rootObject()->findChild<QQmlListModel*>();
tests/plugins/Dash/listviewwithpageheadertest.cpp−1
@@ -119,7 +119,6 @@ private Q_SLOTS:
119119 void init()
120120 {
121121 view = new QQuickView();
122− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
123122 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertest.qml"));
124123 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
125124 model = view->rootObject()->findChild<QQmlListModel*>();
tests/plugins/Dash/organicgridtest.cpp−1
@@ -126,7 +126,6 @@ private Q_SLOTS:
126126 {
127127 view = new QQuickView();
128128 view->setResizeMode(QQuickView::SizeRootObjectToView);
129− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
130129
131130 model = new DummyModel();
132131 model->setCount(21);
tests/plugins/Dash/organicgridtry.cpp−1
@@ -73,7 +73,6 @@ int main(int argc, char *argv[])
7373
7474 QQuickView *view = new QQuickView();
7575 view->setResizeMode(QQuickView::SizeRootObjectToView);
76− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
7776
7877 DummyModel model;
7978 model.setCount(3);
tests/plugins/Dash/verticaljournaltest.cpp−1
@@ -125,7 +125,6 @@ private Q_SLOTS:
125125 {
126126 view = new QQuickView();
127127 view->setResizeMode(QQuickView::SizeRootObjectToView);
128− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
129128
130129 model = new HeightModel();
131130 QStringList heightList;
tests/plugins/Dash/verticaljournaltry.cpp−1
@@ -63,7 +63,6 @@ int main(int argc, char *argv[])
6363
6464 QQuickView *view = new QQuickView();
6565 view->setResizeMode(QQuickView::SizeRootObjectToView);
66− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
6766
6867 QHeightModel model;
6968 QStringList heightList;
tests/plugins/IntegratedLightDM/CMakeLists.txt+1−1
@@ -25,7 +25,7 @@ add_unity8_uitest(GreeterDBus dbus-test-runner
2525 ARG_PREFIX "--parameter"
2626 ARGS --task $<TARGET_FILE:GreeterDBusTestExec>
2727 DEPENDS MockLightDM
28− IMPORT_PATHS ${CMAKE_BINARY_DIR}/tests/mocks
28+ IMPORT_PATHS ${UNITY_MOCKPATH}
2929 LIGHTDM
3030 )
3131
tests/plugins/Ubuntu/Gestures/CMakeLists.txt+3−7
@@ -14,9 +14,6 @@ include_directories(
1414
1515export_qmlfiles(UbuntuGesturesTest .)
1616
17−add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
18−add_definitions(-DTESTS_UTILS_MODULES_DIR="${CMAKE_BINARY_DIR}/tests/utils/modules")
19−
2017macro(build_gesture_test CLASSNAME)
2118 add_executable(${CLASSNAME}TestExec tst_${CLASSNAME}.cpp GestureTest.cpp TestItem.cpp)
2219 qt5_use_modules(${CLASSNAME}TestExec Test Core Qml Gui Quick)
@@ -26,7 +23,7 @@ endmacro()
2623macro(add_gesture_unit_test CLASSNAME)
2724 build_gesture_test(${CLASSNAME})
2825 add_unity8_unittest(${CLASSNAME} ${CLASSNAME}TestExec
29− ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
26+ ENVIRONMENT LD_LIBRARY_PATH=${UNITY_PLUGINPATH}/Ubuntu/Gestures
3027 DEPENDS UbuntuGesturesTest-qmlfiles
3128 ${ARGN}
3229 )
@@ -35,12 +32,11 @@ endmacro()
3532macro(add_gesture_ui_test CLASSNAME)
3633 build_gesture_test(${CLASSNAME})
3734 add_unity8_uitest(${CLASSNAME} ${CLASSNAME}TestExec
38− ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
35+ ENVIRONMENT LD_LIBRARY_PATH=${UNITY_PLUGINPATH}/Ubuntu/Gestures
3936 DEPENDS UbuntuGesturesTest-qmlfiles
4037 ${ARGN}
4138 )
42− add_manual_qml_test(. ${CLASSNAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins
43− ${CMAKE_BINARY_DIR}/tests/utils/modules)
39+ add_manual_qml_test(. ${CLASSNAME} IMPORT_PATHS ${UNITY_PLUGINPATH})
4440endmacro()
4541
4642add_gesture_ui_test(DirectionalDragArea)
tests/plugins/Ubuntu/Gestures/GestureTest.cpp−2
@@ -44,8 +44,6 @@ void GestureTest::init()
4444{
4545 m_view = new QQuickView;
4646 m_view->setResizeMode(QQuickView::SizeRootObjectToView);
47− m_view->engine()->addImportPath(QStringLiteral(UBUNTU_GESTURES_PLUGIN_DIR));
48− m_view->engine()->addImportPath(QStringLiteral(TESTS_UTILS_MODULES_DIR));
4947 m_view->setSource(QUrl::fromLocalFile(m_qmlFilename));
5048 m_view->show();
5149 QVERIFY(QTest::qWaitForWindowExposed(m_view));
tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp−1
@@ -119,7 +119,6 @@ QQuickView *tst_TouchGate::createView()
119119 QQuickView *window = new QQuickView(0);
120120 window->setResizeMode(QQuickView::SizeRootObjectToView);
121121 window->resize(720, 720);
122− window->engine()->addImportPath(QLatin1String(UBUNTU_GESTURES_PLUGIN_DIR));
123122
124123 return window;
125124}
tests/qmltests/CMakeLists.txt+2−2
@@ -1,7 +1,7 @@
11
22add_subdirectory(Components)
33
4−add_unity8_qmltest(. OrientedShell)
4+add_unity8_qmltest(. OrientedShell LIGHTDM)
55add_unity8_qmltest(. Shell LIGHTDM)
66add_unity8_qmltest(. ShellWithPin LIGHTDM)
77add_unity8_qmltest(Components Background)
@@ -18,7 +18,7 @@ add_unity8_qmltest(Components Showable)
1818add_unity8_qmltest(Components ZoomableImage)
1919add_unity8_qmltest(Dash Dash)
2020add_unity8_qmltest(Dash DashContent)
21−add_unity8_qmltest(Dash DashShell)
21+add_unity8_qmltest(Dash DashShell LIGHTDM)
2222add_unity8_qmltest(Dash Card)
2323add_unity8_qmltest(Dash CardCarousel)
2424add_unity8_qmlbenchmark(Dash CardBenchmark 1000)
tests/qmltests/Components/CMakeLists.txt+1−4
@@ -1,6 +1,4 @@
1−add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
21add_definitions(-DTEST_DIR="${CMAKE_CURRENT_LIST_DIR}")
3−add_definitions(-DTESTS_UTILS_MODULES_DIR="${CMAKE_BINARY_DIR}/tests/utils/modules")
42
53########## tst_DragHandle
64
@@ -17,8 +15,7 @@ qt5_use_modules(DragHandleTestExec Test Core Qml Gui Quick)
1715target_link_libraries(DragHandleTestExec UbuntuGesturesQml UbuntuGestures)
1816
1917add_unity8_uitest(DragHandle DragHandleTestExec ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures)
20−add_manual_qml_test(. DragHandle IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${CMAKE_BINARY_DIR}/tests/utils/modules)
21−
18+add_manual_qml_test(. DragHandle IMPORT_PATHS ${UNITY_PLUGINPATH})
2219
2320########## tst_EdgeDragEvaluator
2421add_executable(EdgeDragEvaluatorTestExec tst_EdgeDragEvaluator.cpp)
tests/qmltests/Components/tst_DragHandle.cpp−2
@@ -113,9 +113,7 @@ QQuickView *tst_DragHandle::createView()
113113{
114114 QQuickView *window = new QQuickView(0);
115115 window->setResizeMode(QQuickView::SizeRootObjectToView);
116− window->engine()->addImportPath(QLatin1String(UBUNTU_GESTURES_PLUGIN_DIR));
117116 window->engine()->addImportPath(QLatin1String(TEST_DIR));
118− window->engine()->addImportPath(QStringLiteral(TESTS_UTILS_MODULES_DIR));
119117
120118 return window;
121119}
tests/qmltests/Components/tst_EdgeDragEvaluator.cpp−1
@@ -99,7 +99,6 @@ QQuickView *tst_EdgeDragEvaluator::createView()
9999{
100100 QQuickView *window = new QQuickView(0);
101101 window->setResizeMode(QQuickView::SizeRootObjectToView);
102− window->engine()->addImportPath(QLatin1String(UBUNTU_GESTURES_PLUGIN_DIR));
103102 window->engine()->addImportPath(QLatin1String(TEST_DIR));
104103
105104 return window;
tests/qmltests/Dash/tst_Card.qml+2−2
@@ -473,14 +473,14 @@ Rectangle {
473473
474474 card.cardData["mascot"] = "somethingbroken2";
475475 card.cardDataChanged();
476− compare(mascotImage.image.status, Image.Error);
476+ compare(mascotImage.status, Image.Error);
477477
478478 cardTool.components["mascot"] = {"fallback": Qt.resolvedUrl("artwork/emblem.png")};
479479 cardTool.componentsChanged();
480480 card.cardData["mascot"] = "somethingbroken2";
481481 card.cardDataChanged();
482482 waitForRendering(card);
483− tryCompare(mascotImage.image, "status", Image.Ready);
483+ tryCompare(mascotImage, "status", Image.Ready);
484484 }
485485
486486 function test_font_weights_data() {
tests/qmltests/Greeter/tst_Infographics.qml+4−3
@@ -74,15 +74,16 @@ Item {
7474
7575 function test_set_username_data() {
7676 return [
77− { username: "has-password", label: "<b>19</b> minutes talk time" },
78− { username: "two-factor", label: "No data" },
79− { username: "", label: "No data" },
77+ { username: "has-password", label: "<b>19</b> minutes talk time", visible: true },
78+ { username: "two-factor", label: "", visible: true },
79+ { username: "", label: "", visible: false },
8080 ]
8181 }
8282
8383 function test_set_username(data) {
8484 infographicModel.username = data.username
8585 tryCompare(label, "text", data.label)
86+ compare(infographic.visible, data.visible);
8687 }
8788 }
8889
tools/scopetool.cpp+1−1
@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
8989 view->setTitle(QGuiApplication::applicationName());
9090 view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()));
9191
92− QUrl source(::qmlDirectory() + "ScopeTool.qml");
92+ QUrl source(::qmlDirectory() + "/ScopeTool.qml");
9393 prependImportPaths(view->engine(), ::overrideImportPaths());
9494 prependImportPaths(view->engine(), ::nonMirImportPaths());
9595 appendImportPaths(view->engine(), ::fallbackImportPaths());