on xenial help sign in
move screenshots out of the Dash dir

This was consuming 2.5 megs of installed size while they really are only used for testing.

commite53c88a4e46f3d103e624db13a2bc530dd96a21c authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 5 Nov 2015, 18:59 (11 years ago) parent1dbbef5
17 files changed+20−9
tests/mocks/Unity/Application/ApplicationInfo.cpp+4−6 tests/mocks/Unity/Application/ApplicationTestInterface.cpp+2−2 qml/Dash/graphics/phone/screenshots/browser@12.png → tests/mocks/Unity/Application/resources/screenshots/browser@12.png qml/Dash/graphics/phone/screenshots/camera@12.png → tests/mocks/Unity/Application/resources/screenshots/camera@12.png qml/Dash/graphics/phone/screenshots/dialer@12.png → tests/mocks/Unity/Application/resources/screenshots/dialer@12.png qml/Dash/graphics/phone/screenshots/facebook@12.png → tests/mocks/Unity/Application/resources/screenshots/facebook@12.png qml/Dash/graphics/phone/screenshots/gallery@12.png → tests/mocks/Unity/Application/resources/screenshots/gallery@12.png qml/Dash/graphics/phone/screenshots/gmail-webapp.svg → tests/mocks/Unity/Application/resources/screenshots/gmail-webapp.svg qml/Dash/graphics/phone/screenshots/libreoffice@12.png → tests/mocks/Unity/Application/resources/screenshots/libreoffice@12.png qml/Dash/graphics/phone/screenshots/map@12.png → tests/mocks/Unity/Application/resources/screenshots/map@12.png qml/Dash/graphics/phone/screenshots/music@12.png → tests/mocks/Unity/Application/resources/screenshots/music@12.png qml/Dash/graphics/phone/screenshots/twitter@12.png → tests/mocks/Unity/Application/resources/screenshots/twitter@12.png qml/Dash/graphics/phone/screenshots/ubuntu-weather-app.svg → tests/mocks/Unity/Application/resources/screenshots/ubuntu-weather-app.svg qml/Dash/graphics/phone/screenshots/unity8-dash@12.png → tests/mocks/Unity/Application/resources/screenshots/unity8-dash@12.png qml/Dash/graphics/phone/screenshots/vkb_portrait.png → tests/mocks/Unity/Application/resources/screenshots/vkb_portrait.png tests/mocks/Unity/Application/resources/surfaces.qrc+13 tests/qmltests/Components/tst_ZoomableImage.qml+1−1
tests/mocks/Unity/Application/ApplicationInfo.cpp+4−6
@@ -101,6 +101,7 @@ void ApplicationInfo::setSession(Session* session)
101101 if (m_session) {
102102 m_session->setApplication(this);
103103 m_session->setParent(this);
104+ m_session->setScreenshot(m_screenshotFileName);
104105 SessionManager::singleton()->registerSession(m_session);
105106 connect(m_session, &Session::surfaceChanged,
106107 this, &ApplicationInfo::onSessionSurfaceChanged);
@@ -125,21 +126,18 @@ void ApplicationInfo::setScreenshotId(const QString &screenshotId)
125126 QString screenshotFileName;
126127
127128 if (screenshotId.endsWith(".svg")) {
128− screenshotFileName = QString("%1/Dash/graphics/phone/screenshots/%2")
129− .arg(qmlDirectory())
129+ screenshotFileName = QString("qrc:///Unity/Application/screenshots/%2")
130130 .arg(screenshotId);
131131 } else {
132− screenshotFileName = QString("%1/Dash/graphics/phone/screenshots/%2@12.png")
133− .arg(qmlDirectory())
132+ screenshotFileName = QString("qrc:///Unity/Application/screenshots/%2@12.png")
134133 .arg(screenshotId);
135134 }
136135
137136 if (screenshotFileName != m_screenshotFileName) {
138137 m_screenshotFileName = screenshotFileName;
139138
140− QUrl screenshotUrl = QString("file://%1").arg(m_screenshotFileName);
141139 if (m_session) {
142− m_session->setScreenshot(screenshotUrl);
140+ m_session->setScreenshot(screenshotFileName);
143141 }
144142 }
145143}
tests/mocks/Unity/Application/ApplicationTestInterface.cpp+2−2
@@ -40,7 +40,7 @@ Session* ApplicationTestInterface::addChildSession(Session* existingSession, con
4040{
4141 if (!existingSession) return nullptr;
4242
43− QUrl screenshotUrl = QString("file://%1/Dash/graphics/phone/screenshots/%2@12.png")
43+ QUrl screenshotUrl = QString("qrc:///Unity/Application/screenshots/%2@12.png")
4444 .arg(qmlDirectory())
4545 .arg(surfaceImage);
4646
@@ -90,7 +90,7 @@ quint32 ApplicationTestInterface::addChildSession(const QString& appId, quint32
9090 return 0;
9191 }
9292
93− QUrl screenshotUrl = QString("file://%1/Dash/graphics/phone/screenshots/%2@12.png")
93+ QUrl screenshotUrl = QString("qrc:///Unity/Application/screenshots/%2@12.png")
9494 .arg(qmlDirectory())
9595 .arg(surfaceImage);
9696
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 @@
33 <file>VirtualKeyboard.qml</file>
44 <file>MirSurfaceItem.qml</file>
55 <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>
619 </qresource>
720</RCC>
tests/qmltests/Components/tst_ZoomableImage.qml+1−1
@@ -36,7 +36,7 @@ Rectangle {
3636 }
3737
3838 property var widgetData2: {
39− "source": "../../../qml/Dash/graphics/phone/screenshots/gallery@12.png",
39+ "source": "../../mocks/Unity/Application/resources/screenshots/gallery@12.png",
4040 "zoomable": true
4141 }
4242