on xenial help sign in
move screenshots out of the Dash dir
e53c88aMichael Zanetti
tests/mocks/Unity/Application/ApplicationInfo.cpp+4−6
@@ -101,6 +101,7 @@ void ApplicationInfo::setSession(Session* session)
101 if (m_session) {
101 if (m_session) {
102 m_session->setApplication(this);
102 m_session->setApplication(this);
103 m_session->setParent(this);
103 m_session->setParent(this);
104+ m_session->setScreenshot(m_screenshotFileName);
104 SessionManager::singleton()->registerSession(m_session);
105 SessionManager::singleton()->registerSession(m_session);
105 connect(m_session, &Session::surfaceChanged,
106 connect(m_session, &Session::surfaceChanged,
106 this, &ApplicationInfo::onSessionSurfaceChanged);
107 this, &ApplicationInfo::onSessionSurfaceChanged);
@@ -125,21 +126,18 @@ void ApplicationInfo::setScreenshotId(const QString &screenshotId)
125 QString screenshotFileName;
126 QString screenshotFileName;
126
127
127 if (screenshotId.endsWith(".svg")) {
128 if (screenshotId.endsWith(".svg")) {
128− screenshotFileName = QString("%1/Dash/graphics/phone/screenshots/%2")
129+ screenshotFileName = QString("qrc:///Unity/Application/screenshots/%2")
129− .arg(qmlDirectory())
130 .arg(screenshotId);
130 .arg(screenshotId);
131 } else {
131 } else {
132− screenshotFileName = QString("%1/Dash/graphics/phone/screenshots/%2@12.png")
132+ screenshotFileName = QString("qrc:///Unity/Application/screenshots/%2@12.png")
133− .arg(qmlDirectory())
134 .arg(screenshotId);
133 .arg(screenshotId);
135 }
134 }
136
135
137 if (screenshotFileName != m_screenshotFileName) {
136 if (screenshotFileName != m_screenshotFileName) {
138 m_screenshotFileName = screenshotFileName;
137 m_screenshotFileName = screenshotFileName;
139
138
140− QUrl screenshotUrl = QString("file://%1").arg(m_screenshotFileName);
141 if (m_session) {
139 if (m_session) {
142− m_session->setScreenshot(screenshotUrl);
140+ m_session->setScreenshot(screenshotFileName);
143 }
141 }
144 }
142 }
145}
143}
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