on xenial help sign in
move screenshots out of the Dash dir
6d6a46eMichael Zanetti
po/shn.po+6−5
@@ -6,17 +6,18 @@
6msgid ""
6msgid ""
7msgstr ""
7msgstr ""
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: \n"
10"POT-Creation-Date: 2015-11-04 15:02+0000\n"
10"POT-Creation-Date: 2015-11-04 15:02+0000\n"
11−"PO-Revision-Date: 2015-11-10 12:09+0000\n"
11+"PO-Revision-Date: 2013-10-07 11:46+0000\n"
12−"Last-Translator: Rockworld <sumoisrock@gmail.com>\n"
12+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Shan <shn@li.org>\n"
13"Language-Team: Shan <shn@li.org>\n"
14+"Language: shn\n"
14"MIME-Version: 1.0\n"
15"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=(n == 1) ? 0 : 1;\n"
18"Plural-Forms: nplurals=2; plural=(n == 1) ? 0 : 1;\n"
18−"X-Launchpad-Export-Date: 2015-11-21 05:34+0000\n"
19+"X-Launchpad-Export-Date: 2015-11-07 05:13+0000\n"
19−"X-Generator: Launchpad (build 17850)\n"
20+"X-Generator: Launchpad (build 17838)\n"
20
21
21#: plugins/IntegratedLightDM/Greeter.cpp:112
22#: plugins/IntegratedLightDM/Greeter.cpp:112
22msgid "Password: "
23msgid "Password: "
tests/mocks/Unity/Application/ApplicationInfo.cpp+4−8
@@ -73,8 +73,7 @@ void ApplicationInfo::createSession()
73{
73{
74 if (m_session || state() == ApplicationInfo::Stopped) { return; }
74 if (m_session || state() == ApplicationInfo::Stopped) { return; }
75
75
76− QUrl screenshotUrl = QString("file://%1").arg(m_screenshotFileName);
77− setSession(SessionManager::singleton()->createSession(appId(), screenshotUrl));
76+ setSession(SessionManager::singleton()->createSession(appId(), m_screenshotFileName));
78}
77}
79
78
80void ApplicationInfo::destroySession()
79void ApplicationInfo::destroySession()
@@ -125,21 +124,18 @@ void ApplicationInfo::setScreenshotId(const QString &screenshotId)
125 QString screenshotFileName;
124 QString screenshotFileName;
126
125
127 if (screenshotId.endsWith(".svg")) {
126 if (screenshotId.endsWith(".svg")) {
128− screenshotFileName = QString("%1/Dash/graphics/phone/screenshots/%2")
127+ screenshotFileName = QString("qrc:///Unity/Application/screenshots/%2")
129− .arg(qmlDirectory())
130 .arg(screenshotId);
128 .arg(screenshotId);
131 } else {
129 } else {
132− screenshotFileName = QString("%1/Dash/graphics/phone/screenshots/%2@12.png")
130+ screenshotFileName = QString("qrc:///Unity/Application/screenshots/%2@12.png")
133− .arg(qmlDirectory())
134 .arg(screenshotId);
131 .arg(screenshotId);
135 }
132 }
136
133
137 if (screenshotFileName != m_screenshotFileName) {
134 if (screenshotFileName != m_screenshotFileName) {
138 m_screenshotFileName = screenshotFileName;
135 m_screenshotFileName = screenshotFileName;
139
136
140− QUrl screenshotUrl = QString("file://%1").arg(m_screenshotFileName);
141 if (m_session) {
137 if (m_session) {
142− m_session->setScreenshot(screenshotUrl);
138+ m_session->setScreenshot(screenshotFileName);
143 }
139 }
144 }
140 }
145}
141}
tests/mocks/Unity/Application/ApplicationScreenshotProvider.cpp+6−2
@@ -44,9 +44,13 @@ QImage ApplicationScreenshotProvider::requestImage(const QString &imageId, QSize
44 return QImage();
44 return QImage();
45 }
45 }
46
46
47+ QString screenshot = app->screenshot();
48+ // QImage doesn't understand qrc:/// but we have QUrls in use which don't like the empty protcol ":/"
49+ screenshot.replace("qrc:///", ":/");
50+
47 QImage image;
51 QImage image;
48− if (!image.load(app->screenshot())) {
52+ if (!image.load(screenshot)) {
49− qWarning() << "failed loading app image" << app->screenshot();
53+ qWarning() << "failed loading app image" << screenshot;
50 }
54 }
51
55
52
56
tests/mocks/Unity/Application/ApplicationTestInterface.cpp+2−2
@@ -40,7 +40,7 @@ Session* ApplicationTestInterface::addChildSession(Session* existingSession, con
40{
40{
41 if (!existingSession) return nullptr;
41 if (!existingSession) return nullptr;
42
42
43− QUrl screenshotUrl = QString("file://%1/Dash/graphics/phone/screenshots/%2@12.png")
43+ QUrl screenshotUrl = QString("qrc:///Unity/Application/screenshots/%2@12.png")
44 .arg(qmlDirectory())
44 .arg(qmlDirectory())
45 .arg(surfaceImage);
45 .arg(surfaceImage);
46
46
@@ -90,7 +90,7 @@ quint32 ApplicationTestInterface::addChildSession(const QString& appId, quint32
90 return 0;
90 return 0;
91 }
91 }
92
92
93− QUrl screenshotUrl = QString("file://%1/Dash/graphics/phone/screenshots/%2@12.png")
93+ QUrl screenshotUrl = QString("qrc:///Unity/Application/screenshots/%2@12.png")
94 .arg(qmlDirectory())
94 .arg(qmlDirectory())
95 .arg(surfaceImage);
95 .arg(surfaceImage);
96
96
qml/Dash/graphics/phone/screenshots/browser@12.png → tests/mocks/Unity/Application/resources/screenshots/browser@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/camera@12.png → tests/mocks/Unity/Application/resources/screenshots/camera@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/dialer@12.png → tests/mocks/Unity/Application/resources/screenshots/dialer@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/facebook@12.png → tests/mocks/Unity/Application/resources/screenshots/facebook@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/gallery@12.png → tests/mocks/Unity/Application/resources/screenshots/gallery@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/gmail-webapp.svg → tests/mocks/Unity/Application/resources/screenshots/gmail-webapp.svgrenamed

The content is the same.

qml/Dash/graphics/phone/screenshots/libreoffice@12.png → tests/mocks/Unity/Application/resources/screenshots/libreoffice@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/map@12.png → tests/mocks/Unity/Application/resources/screenshots/map@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/music@12.png → tests/mocks/Unity/Application/resources/screenshots/music@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/twitter@12.png → tests/mocks/Unity/Application/resources/screenshots/twitter@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/ubuntu-weather-app.svg → tests/mocks/Unity/Application/resources/screenshots/ubuntu-weather-app.svgrenamed

The content is the same.

qml/Dash/graphics/phone/screenshots/unity8-dash@12.png → tests/mocks/Unity/Application/resources/screenshots/unity8-dash@12.pngrenamed

Binary file not shown.

qml/Dash/graphics/phone/screenshots/vkb_portrait.png → tests/mocks/Unity/Application/resources/screenshots/vkb_portrait.pngrenamed

Binary file not shown.

tests/mocks/Unity/Application/resources/surfaces.qrc+13
@@ -3,5 +3,18 @@
3 <file>VirtualKeyboard.qml</file>
3 <file>VirtualKeyboard.qml</file>
4 <file>MirSurfaceItem.qml</file>
4 <file>MirSurfaceItem.qml</file>
5 <file>vkb_portrait.png</file>
5 <file>vkb_portrait.png</file>
6+ <file>screenshots/browser@12.png</file>
7+ <file>screenshots/camera@12.png</file>
8+ <file>screenshots/dialer@12.png</file>
9+ <file>screenshots/facebook@12.png</file>
10+ <file>screenshots/gallery@12.png</file>
11+ <file>screenshots/gmail-webapp.svg</file>
12+ <file>screenshots/map@12.png</file>
13+ <file>screenshots/music@12.png</file>
14+ <file>screenshots/twitter@12.png</file>
15+ <file>screenshots/ubuntu-weather-app.svg</file>
16+ <file>screenshots/unity8-dash@12.png</file>
17+ <file>screenshots/vkb_portrait.png</file>
18+ <file>screenshots/libreoffice@12.png</file>
6 </qresource>
19 </qresource>
7</RCC>
20</RCC>
tests/qmltests/Components/tst_ZoomableImage.qml+1−1
@@ -36,7 +36,7 @@ Rectangle {
36 }
36 }
37
37
38 property var widgetData2: {
38 property var widgetData2: {
39− "source": "../../../qml/Dash/graphics/phone/screenshots/gallery@12.png",
39+ "source": "../../mocks/Unity/Application/resources/screenshots/gallery@12.png",
40 "zoomable": true
40 "zoomable": true
41 }
41 }
42
42