diff -Nru unity8-7.85+14.04.20140401.3/.bazaar/plugins/makecheck_unity_phablet.py unity8-7.85+14.04.20140403.1/.bazaar/plugins/makecheck_unity_phablet.py --- unity8-7.85+14.04.20140401.3/.bazaar/plugins/makecheck_unity_phablet.py 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/.bazaar/plugins/makecheck_unity_phablet.py 2014-04-03 10:38:38.000000000 +0000 @@ -18,7 +18,7 @@ from bzrlib.urlutils import dirname, local_path_from_url def execute_makecheck(local_branch, master_branch, old_revision_number, old_revision_id, future_revision_number, future_revision_id, tree_delta, future_tree): - if not master_branch.basis_tree().has_filename("Shell.qml"): + if not master_branch.basis_tree().has_filename("qml/Shell.qml"): return os.chdir(local_path_from_url(master_branch.base)) diff -Nru unity8-7.85+14.04.20140401.3/build unity8-7.85+14.04.20140403.1/build --- unity8-7.85+14.04.20140401.3/build 2014-04-01 22:56:02.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/build 2014-04-03 10:38:05.000000000 +0000 @@ -54,6 +54,7 @@ unity-scope-home \ unity-lens-applications \ unity-plugin-scopes \ + xvfb \ || exit 5 } diff -Nru unity8-7.85+14.04.20140401.3/cmake/modules/QmlTest.cmake unity8-7.85+14.04.20140403.1/cmake/modules/QmlTest.cmake --- unity8-7.85+14.04.20140401.3/cmake/modules/QmlTest.cmake 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/cmake/modules/QmlTest.cmake 2014-04-03 10:38:05.000000000 +0000 @@ -65,6 +65,7 @@ cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN}) set(qmltest_TARGET test${COMPONENT_NAME}) + set(qmltest_xvfb_TARGET xvfbtest${COMPONENT_NAME}) set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME}) set(qmltestrunner_imports "") @@ -82,24 +83,69 @@ string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_lower) if(cmake_generator_lower STREQUAL "unix makefiles") - set(qmltest_command - env ${qmltest_ENVIRONMENT} - ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml - ${qmltestrunner_imports} - -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml - -o -,txt - $(FUNCTION) - ) + set(function_ARGS $(FUNCTION)) else() - set(qmltest_command - env ${qmltest_ENVIRONMENT} - ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml - ${qmltestrunner_imports} - -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml - -o -,txt - ) + set(function_ARGS "") endif() + set(qmltest_command + env ${qmltest_ENVIRONMENT} + ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml + ${qmltestrunner_imports} + -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml + -o -,txt + ${function_ARGS} + ) + find_program( HAVE_GCC gcc ) + if (NOT ${HAVE_GCC} STREQUAL "") + exec_program( gcc ARGS "-dumpmachine" OUTPUT_VARIABLE ARCH_TRIPLET ) + set(LD_PRELOAD_PATH "LD_PRELOAD=/usr/lib/${ARCH_TRIPLET}/mesa/libGL.so.1") + endif() + set(qmltest_xvfb_command + env ${qmltest_ENVIRONMENT} ${LD_PRELOAD_PATH} + xvfb-run --server-args "-screen 0 1024x768x24" --auto-servernum + ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml + ${qmltestrunner_imports} + -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml + -o -,txt + ${function_ARGS} + ) + + add_qmltest_target(${qmltest_TARGET} "${qmltest_command}" TRUE ${qmltest_NO_ADD_TEST}) + add_qmltest_target(${qmltest_xvfb_TARGET} "${qmltest_xvfb_command}" ${qmltest_NO_TARGETS} TRUE) + add_manual_qml_test(${SUBPATH} ${COMPONENT_NAME} ${ARGN}) +endmacro(add_qml_test) + +macro(add_binary_qml_test CLASS_NAME LD_PATH DEPS) + set(testCommand + LD_LIBRARY_PATH=${LD_PATH} + ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_NAME}TestExec + -o ${CMAKE_BINARY_DIR}/${CLASSNAME}Test.xml,xunitxml + -o -,txt) + + add_qmltest_target(test${CLASS_NAME} "${testCommand}" FALSE TRUE) + add_dependencies(test${CLASS_NAME} ${CLASS_NAME}TestExec ${DEPS}) + + find_program( HAVE_GCC gcc ) + if (NOT ${HAVE_GCC} STREQUAL "") + exec_program( gcc ARGS "-dumpmachine" OUTPUT_VARIABLE ARCH_TRIPLET ) + set(LD_PRELOAD_PATH "LD_PRELOAD=/usr/lib/${ARCH_TRIPLET}/mesa/libGL.so.1") + endif() + set(xvfbtestCommand + ${LD_PRELOAD_PATH} + LD_LIBRARY_PATH=${LD_PATH} + xvfb-run --server-args "-screen 0 1024x768x24" --auto-servernum + ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_NAME}TestExec + -o ${CMAKE_BINARY_DIR}/${CLASS_NAME}Test.xml,xunitxml + -o -,txt) + + add_qmltest_target(xvfbtest${CLASS_NAME} "${xvfbtestCommand}" FALSE TRUE) + add_dependencies(qmluitests xvfbtest${CLASS_NAME}) + + add_manual_qml_test(. ${CLASS_NAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins) +endmacro(add_binary_qml_test) + +macro(add_qmltest_target qmltest_TARGET qmltest_command qmltest_NO_TARGETS qmltest_NO_ADD_TEST) add_custom_target(${qmltest_TARGET} ${qmltest_command}) if(NOT "${qmltest_PROPERTIES}" STREQUAL "") @@ -130,5 +176,4 @@ endif() endif("${qmltest_NO_TARGETS}" STREQUAL "FALSE") - add_manual_qml_test(${SUBPATH} ${COMPONENT_NAME} ${ARGN}) -endmacro(add_qml_test) +endmacro(add_qmltest_target) diff -Nru unity8-7.85+14.04.20140401.3/debian/changelog unity8-7.85+14.04.20140403.1/debian/changelog --- unity8-7.85+14.04.20140401.3/debian/changelog 2014-04-03 14:56:19.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/debian/changelog 2014-04-03 14:56:20.000000000 +0000 @@ -1,3 +1,31 @@ +unity8 (7.85+14.04.20140403.1-0ubuntu1) trusty; urgency=low + + [ Michael Terry ] + * Re-enable test_networkmanager_integration autopilot test on phone + platforms + + [ CI bot ] + * Resync trunk + + [ Leo Arias ] + * Reverted the open_preview autopilot helper to return a Preview + object. + + [ Albert Astals ] + * If not running in Mir load the "fake" application manager (LP: + #1301547) + * Remove unused properties from DashRenderer + + [ Michael Zanetti ] + * Fix tests after right edge merge. Drop old stages tests. Fix right + edge tests if someone doesn't have the GRID_UNIT_PX exported. make + GenericScopeView test more robust that broke because the ordering + changed + * add "make xvfbtestSomething" target to run qml tests in xvfb + * make the "make test" commit hook work again + + -- Ubuntu daily release Thu, 03 Apr 2014 10:38:53 +0000 + unity8 (7.85+14.04.20140401.3-0ubuntu1) trusty; urgency=medium [ Michał Sawicz ] diff -Nru unity8-7.85+14.04.20140401.3/debian/unity8-fake-env.install unity8-7.85+14.04.20140403.1/debian/unity8-fake-env.install --- unity8-7.85+14.04.20140401.3/debian/unity8-fake-env.install 2014-04-03 14:56:19.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/debian/unity8-fake-env.install 2014-04-03 14:56:20.000000000 +0000 @@ -1,3 +1,4 @@ +usr/lib/*/unity8/qml/nonmirplugins usr/lib/*/unity8/qml/mocks usr/lib/*/unity8/qml/scopefakes usr/share/unity8/mocks diff -Nru unity8-7.85+14.04.20140401.3/include/paths.h.in unity8-7.85+14.04.20140403.1/include/paths.h.in --- unity8-7.85+14.04.20140401.3/include/paths.h.in 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/include/paths.h.in 2014-04-03 10:37:47.000000000 +0000 @@ -57,6 +57,16 @@ return paths; } +inline QStringList nonMirImportPaths() { + QStringList paths; + if (isRunningInstalled()) { + paths << QString("@CMAKE_INSTALL_PREFIX@/@SHELL_INSTALL_QML@/nonmirplugins"); + } else { + paths << QString("@CMAKE_BINARY_DIR@/nonmirplugins"); + } + return paths; +} + inline QStringList fallbackImportPaths() { QStringList paths; if (isRunningInstalled()) { diff -Nru unity8-7.85+14.04.20140401.3/po/bg.po unity8-7.85+14.04.20140403.1/po/bg.po --- unity8-7.85+14.04.20140401.3/po/bg.po 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/po/bg.po 2014-04-03 10:37:38.000000000 +0000 @@ -8,14 +8,13 @@ "Project-Id-Version: unity\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2014-03-25 16:48+0100\n" -"PO-Revision-Date: 2014-01-28 19:22+0000\n" +"PO-Revision-Date: 2014-04-01 14:08+0000\n" "Last-Translator: Atanas Kovachki \n" "Language-Team: Bulgarian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n" +"X-Launchpad-Export-Date: 2014-04-03 06:06+0000\n" "X-Generator: Launchpad (build 16967)\n" #: plugins/Unity/Launcher/launcheritem.cpp:43 @@ -94,7 +93,7 @@ #: qml/Dash/DashApps.qml:38 msgid "Recent" -msgstr "" +msgstr "Последни" #: qml/Dash/PreviewListView.qml:52 #, qt-format @@ -107,7 +106,7 @@ #: qml/Dash/Previews/PreviewActionCombo.qml:34 msgid "Less..." -msgstr "" +msgstr "По-малко..." #: qml/Dash/Previews/PreviewRatingInput.qml:81 msgid "Rate this" @@ -170,19 +169,3 @@ #, qt-format msgid "Please enter %1" msgstr "Моля, въведете %1" - -#~ msgid "Review" -#~ msgstr "Отзив" - -#, qt-format -#~ msgid "%1 review" -#~ msgid_plural "%1 reviews" -#~ msgstr[0] "%1 отзив" -#~ msgstr[1] "%1 отзива" - -#, qt-format -#~ msgid "(%1)" -#~ msgstr "(%1)" - -#~ msgid "Comments:" -#~ msgstr "Коментари:" diff -Nru unity8-7.85+14.04.20140401.3/qml/Components/Stage.qml unity8-7.85+14.04.20140403.1/qml/Components/Stage.qml --- unity8-7.85+14.04.20140401.3/qml/Components/Stage.qml 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/qml/Components/Stage.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,571 +0,0 @@ -/* - * Copyright (C) 2013 Canonical, Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick 2.0 -import Unity.Application 0.1 -import Ubuntu.Components 0.1 -import Ubuntu.Gestures 0.1 - -/* - Responsible for application switching. - - Drag from the right edge to switch to the next application. - While being dragged, this component will show an animation for the user to - visualize that he's changing the stacking of applications (next/new app comes from - right edge and current/old app fades out). - */ -Showable { - id: stage - - width: units.gu(40) - height: units.gu(71) - - property int type: ApplicationInfo.MainStage - property var applicationManager - readonly property var applications: - type == ApplicationInfo.MainStage ? applicationManager.mainStageApplications - : applicationManager.sideStageApplications - property bool fullyShown: false - property bool fullyHidden: true - readonly property var focusedApplication: - type == ApplicationInfo.MainStage ? applicationManager.mainStageFocusedApplication - : applicationManager.sideStageFocusedApplication - property bool shouldUseScreenshots: true - - /* Will be true whenever application screenshots are being shown. - i.e. during application window transitions */ - readonly property bool usingScreenshots: { - if (newApplicationScreenshot.application != null && oldApplicationScreenshot.application != null) { - return newApplicationScreenshot.ready && oldApplicationScreenshot.ready; - } else { - return newApplicationScreenshot.ready || oldApplicationScreenshot.ready; - } - } - - property bool rightEdgeEnabled: true - property bool switchingFromFullscreenToFullscreen: false - - property alias rightEdgeDraggingAreaWidth: rightEdgeDraggingArea.width - - // Y coordinate for non-fullscreen applications - property int normalApplicationY: 0 - - function activateApplication(desktopFile, addDelay) { - var application = applicationManager.getApplicationFromDesktopFile(desktopFile, stage.type); - if (application == null) { - return; - } else if (application == stage.focusedApplication) { - stage.show(); - return; - } - - showStartingApplicationAnimation.prepare(application); - if (!stage.fullyShown) { - // if launching this app reveals the stage, make new application screenshot visible - newApplicationScreenshot.visible = true; - stage.show(); - } else { - showStartingApplicationAnimation.start(); - } - - if (addDelay) { - stage.__startingApplicationDesktopFile = desktopFile; - } - } - - Connections { - target: applicationManager - onFocusRequested: activateApplication(appId) - } - - /* Keep a reference to the focused application so that we can safely - unfocus it when the stage is not fully shown and refocus it when the stage - is fully shown again. - */ - property var focusedApplicationWhenUsingScreenshots - onShouldUseScreenshotsChanged: { - if (showStartingApplicationAnimation.running || switchToApplicationAnimation.running) { - return; - } - - if (shouldUseScreenshots) { - stage.__focusApplicationUsingScreenshots(stage.focusedApplication); - } else { - if (stage.focusedApplicationWhenUsingScreenshots) { - stage.__focusActualApplication(stage.focusedApplicationWhenUsingScreenshots); - } - } - } - - - property Item newApplicationScreenshot: ApplicationScreenshot { - parent: stage - width: stage.width - height: stage.height - y - } - property Item oldApplicationScreenshot: ApplicationScreenshot { - parent: stage - width: stage.width - height: stage.height - y - } - - function __getApplicationIndex(application) { - if (!application) - return -1 - for (var i = 0; i < stage.applications.count; i++ ) { - if (stage.applications.get(i).desktopFile == application.desktopFile) { - return i - } - } - return -1 - } - - - property string __startingApplicationDesktopFile - - Timer { - id: delayedHideScreenshots - interval: 500 // on Galaxy Nexus, Telephony app is slowest application to draw a frame so needs this delay - onTriggered: { - __hideScreenshots(); - } - } - - Timer { - id: hideScreenshotsAfterBriefDelay - // Since Mir & Qt have independent event loops, Mir often applies a focus request a frame later than when Qt - // asks for it. To work around, delay removing the screenshots a touch so Mir has definitely shown the app. - interval: 10 - onTriggered: stage.__hideScreenshots(); - } - - function __hideScreenshots() { - newApplicationScreenshot.clearApplication(); - oldApplicationScreenshot.clearApplication(); - newApplicationScreenshot.visible = false; - oldApplicationScreenshot.visible = false; - } - - function __focusApplication(application) { - if (!application) return - if (shouldUseScreenshots) { - stage.__focusApplicationUsingScreenshots(application); - } else { - stage.__focusActualApplication(application); - } - } - - - function __focusActualApplication(application) { - if (application == null) { - return; - } - - if (stage.focusedApplication == application) { - /* FIXME: this case is reached when showing the sidestage, we - need to refocus the side stage app in order to show it. - FIXME: this case is reached when doing a right edge swipe - while in the dash to bring back the stage. - FIXME: this case is reached when showStartingApplicationAnimation - finishes after the newly started application has been focused - automatically by the ApplicationManager. - */ - if (stage.type == ApplicationInfo.SideStage) { - applicationManager.focusApplication(application); - } - if (!delayedHideScreenshots.running) { - hideScreenshotsAfterBriefDelay.start(); - } - } else { - /* FIXME: calling ApplicationManager::focusApplication does not focus - the application immediately nor show the application's surface - immediately. Delay hiding the screenshots until it has done so. - */ - delayedHideScreenshots.stop(); - applicationManager.focusApplication(application); - } - stage.focusedApplicationWhenUsingScreenshots = null; - } - - function __focusApplicationUsingScreenshots(application) { - delayedHideScreenshots.stop(); - if (application == null) { - return; - } - - if (newApplicationScreenshot.application != null) { - stage.focusedApplicationWhenUsingScreenshots = application; - return; - } - - newApplicationScreenshot.setApplication(application); - newApplicationScreenshot.scheduleUpdate(); - newApplicationScreenshot.opacity = 1.0; - newApplicationScreenshot.x = 0.0; - newApplicationScreenshot.y = __getApplicationY(application); - newApplicationScreenshot.scale = 1.0; - newApplicationScreenshot.visible = true; - stage.focusedApplicationWhenUsingScreenshots = application; - stage.switchingFromFullscreenToFullscreen = false; - } - - function __getApplicationY(application) { - return Qt.binding( function(){ - return (application && application.fullscreen - && application.stage !== ApplicationInfo.SideStage) - ? 0 : normalApplicationY; - } ) - } - - /* FIXME: should hide the screenshots when the focused application's surface - is visible. There is no API in QtUbuntu to support that yet. - */ - Connections { - target: stage - onFocusedApplicationChanged: { - if (stage.focusedApplication != null) { - /* Move application to the beginning of the list of running applications */ - var index = stage.__getApplicationIndex(stage.focusedApplication); - applicationManager.moveRunningApplicationStackPosition(index, 0, stage.type); - - var startingApplication = applicationManager.getApplicationFromDesktopFile( - stage.__startingApplicationDesktopFile, stage.type); - - if (stage.focusedApplication == startingApplication) { - stage.__startingApplicationDesktopFile = ""; - - /* Screenshots might still be in use at this point and their - use can be stopped before delayedHideScreenshots is complete. - Prepare for that case by setting appropriately - stage.focusedApplicationWhenUsingScreenshots. - */ - stage.focusedApplicationWhenUsingScreenshots = stage.focusedApplication; - - /* FIXME: should hide the screenshots when the focused application's window - is visible. There is no API in qtubuntu to support that yet. Therefore - we delay their hiding to avoid a state where neither the screenshot nor - the application's window is visible. - */ - delayedHideScreenshots.start(); - } else { - stage.focusedApplicationWhenUsingScreenshots = null; - hideScreenshotsAfterBriefDelay.start(); - } - } - } - } - - Connections { - target: stage.applications - onCountChanged: { __discardObsoleteScreenshots(); } - ignoreUnknownSignals: true - } - onFullyHiddenChanged: { __discardObsoleteScreenshots(); } - function __discardObsoleteScreenshots() { - if (stage.fullyHidden && stage.applications && stage.applications.count == 0) { - stage.focusedApplicationWhenUsingScreenshots = undefined; - stage.__hideScreenshots(); - } - } - - - SequentialAnimation { - id: showStartingApplicationAnimation - - function prepare(newApplication) { - var oldApplication = stage.focusedApplication; - newApplicationScreenshot.setApplication(newApplication); - newApplicationScreenshot.updateFromCache(); - oldApplicationScreenshot.setApplication(oldApplication); - oldApplicationScreenshot.scheduleUpdate(); - newApplicationScreenshot.withBackground = true; // FIXME: should be withBackground = newApplication.state == Application.Starting - newApplicationScreenshot.y = __getApplicationY(newApplication); - oldApplicationScreenshot.y = __getApplicationY(oldApplication); - stage.focusedApplicationWhenUsingScreenshots = newApplication; - stage.switchingFromFullscreenToFullscreen = false; - } - - PropertyAction {target: newApplicationScreenshot; property: "visible"; value: false} - PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: false} - PropertyAction {target: newApplicationScreenshot; property: "z"; value: 0} - PropertyAction {target: oldApplicationScreenshot; property: "z"; value: 1} - PropertyAction {target: newApplicationScreenshot; property: "scale"; value: 0.8} - PropertyAction {target: oldApplicationScreenshot; property: "scale"; value: 1.0} - PropertyAction {target: newApplicationScreenshot; property: "opacity"; value: 0.0} - PropertyAction {target: oldApplicationScreenshot; property: "opacity"; value: 1.0} - PropertyAction {target: newApplicationScreenshot; property: "x"; value: 0.0} - PropertyAction {target: oldApplicationScreenshot; property: "x"; value: 0.0} - - ParallelAnimation { - PropertyAction {target: newApplicationScreenshot; property: "visible"; value: true} - NumberAnimation { - target: newApplicationScreenshot - property: "scale" - duration: 500 - easing.type: Easing.OutQuad - to: 1.0 - } - NumberAnimation { - target: newApplicationScreenshot - property: "opacity" - duration: 500 - easing.type: Easing.OutQuad - to: 1.0 - } - - PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: true} - - NumberAnimation { - target: oldApplicationScreenshot - property: "x" - duration: 400 - easing.type: Easing.OutQuad - to: stage.width - } - } - - ScriptAction { - script: { - // FIXME: only here to support case where application does - // not exist yet but is about to - if (stage.focusedApplicationWhenUsingScreenshots) { - stage.__focusApplication(stage.focusedApplicationWhenUsingScreenshots); - } - } - } - } - - - SequentialAnimation { - id: switchToApplicationAnimation - - function prepare(newApplication) { - var oldApplication = stage.focusedApplication; - newApplicationScreenshot.setApplication(newApplication); - newApplicationScreenshot.updateFromCache(); - oldApplicationScreenshot.setApplication(oldApplication); - oldApplicationScreenshot.scheduleUpdate(); - newApplicationScreenshot.withBackground = false; - newApplicationScreenshot.y = __getApplicationY(newApplication); - oldApplicationScreenshot.y = __getApplicationY(oldApplication); - stage.focusedApplicationWhenUsingScreenshots = newApplication; - stage.switchingFromFullscreenToFullscreen = newApplication && newApplication.fullscreen; - } - - PropertyAction {target: newApplicationScreenshot; property: "visible"; value: false} - PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: false} - PropertyAction {target: newApplicationScreenshot; property: "z"; value: 1} - PropertyAction {target: oldApplicationScreenshot; property: "z"; value: 0} - PropertyAction {target: newApplicationScreenshot; property: "scale"; value: 1.0} - PropertyAction {target: oldApplicationScreenshot; property: "scale"; value: 1.0} - PropertyAction {target: newApplicationScreenshot; property: "opacity"; value: 1.0} - PropertyAction {target: oldApplicationScreenshot; property: "opacity"; value: 1.0} - PropertyAction {target: newApplicationScreenshot; property: "x"; value: stage.width} - PropertyAction {target: oldApplicationScreenshot; property: "x"; value: 0.0} - PropertyAction {target: newApplicationScreenshot; property: "visible"; value: true} - PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: true} - - ParallelAnimation { - NumberAnimation { - target: oldApplicationScreenshot - property: "scale" - duration: 500 - easing.type: Easing.OutQuad - to: 0.8 - } - NumberAnimation { - target: oldApplicationScreenshot - property: "opacity" - duration: 500 - easing.type: Easing.OutQuad - to: 0.0 - } - - NumberAnimation { - target: newApplicationScreenshot - property: "x" - duration: 500 - easing.type: Easing.OutQuad - to: 0 - } - } - - ScriptAction { - script: { - // move previously focused application to the end of the list of running applications - var oldApplication = oldApplicationScreenshot.application; - if (oldApplication != null) { - var oldApplicationIndex = stage.__getApplicationIndex(oldApplicationScreenshot.application); - applicationManager.moveRunningApplicationStackPosition( - oldApplicationIndex, stage.applications.count - 1, stage.type); - } - - stage.__focusApplication(stage.focusedApplicationWhenUsingScreenshots); - } - } - } - - - function __dragValueToProgress(dragValue, startValue, applicationsCount) { - if (applicationsCount == 0) { - return 0; - } else if (applicationsCount == 1) { - // prevent the current app from moving more than 1/4 of the screen - var elasticValue = __elastic(dragValue, startValue/4); - return elasticValue / startValue; - } else { - return dragValue / startValue; - } - } - - function __elastic(x, limit) { - return limit * ( 1 - Math.pow( ( limit - 1 ) / limit, x ) ) - } - - property real __startValue: stage.width - - AnimationControllerWithSignals { - id: switchToApplicationAnimationController - - onAnimationCompletedAtBeginning: { - animation = null; - stage.__focusApplication(oldApplicationScreenshot.application); - } - } - - EdgeDragEvaluator { - id: dragEvaluator - trackedPosition: rightEdgeDraggingArea.touchX - direction: rightEdgeDraggingArea.direction - maxDragDistance: stage.width - } - - EdgeDragArea { - id: rightEdgeDraggingArea - - enabled: { - if (status == DirectionalDragArea.WaitingForTouch) { - return switchToApplicationAnimationController.completed - && stage.applications.count > 0 && stage.rightEdgeEnabled - && !delayedHideScreenshots.running - } else { - return true - } - } - width: units.gu(2) - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.right: parent.right - - direction: Direction.Leftwards - - onDistanceChanged: { - if (status !== DirectionalDragArea.Recognized) - return - - var targetProgress = __dragValueToProgress(-distance, __startValue, - stage.applications.count) - var delta = targetProgress - switchToApplicationAnimationController.progress - - // When the gesture finally gets recognized, the finger will likely be - // reasonably far from the edge. If we made the progress immediately - // follow the finger position it would be visually unpleasant as there - // would be a jump to meet the finger's current position. - // - // The trick is not to go all the way (1.0) as it would cause the - // aforementioned jump. - switchToApplicationAnimationController.progress += 0.4 * delta - } - - property int lastStatus: -1 - - onStatusChanged: { - if (status == DirectionalDragArea.Undecided) { - onUndecided(); - } else if (status == DirectionalDragArea.WaitingForTouch) { - if (lastStatus == DirectionalDragArea.Undecided) { - // got rejected - switchToApplicationAnimationController.completeToBeginningWithSignal(); - } else { - onGestureEnded(); - } - } - lastStatus = status; - } - - function onUndecided() { - dragEvaluator.reset(); - - var nextApplication = null; - if (stage.applications.count > 1) { - nextApplication = stage.applications.get(1); - } - switchToApplicationAnimationController.progress = 0 - switchToApplicationAnimation.prepare(nextApplication); - switchToApplicationAnimationController.animation = switchToApplicationAnimation; - - } - - function onGestureEnded() { - if (stage.applications.count > 1 && dragEvaluator.shouldAutoComplete()) { - switchToApplicationAnimationController.completeToEndWithSignal(); - } else { - switchToApplicationAnimationController.completeToBeginningWithSignal(); - } - } - } - - - // FIXME: very bad hack to detect when an application was closed or crashed - property var __previouslyFocusedApplication - Connections { - target: stage - onFocusedApplicationChanged: { - if (stage.focusedApplication == null - && __getApplicationIndex(stage.__previouslyFocusedApplication) == -1) { - stage.__onFocusedApplicationClosed(); - } - stage.__previouslyFocusedApplication = stage.focusedApplication; - } - } - - function __onFocusedApplicationClosed() { - if (!stage.shown) { - return; - } - - if (stage.applications.count > 0) { - // Do not change the focused application from within onFocusedApplicationChanged. - // This causes binding loop warnings besides being a bad practice in general - // (setting a property from within its "changed" signal handling) - // Hence the timer. - focusTopmostAppTimer.start(); - } else { - stage.hide(); - } - } - - Timer { - id: focusTopmostAppTimer - interval: 1; repeat: false - onTriggered: { - if (stage.applications.count > 0) { - stage.__focusApplication(stage.applications.get(0)); - } - } - } - -} diff -Nru unity8-7.85+14.04.20140401.3/qml/Dash/CardFilterGrid.qml unity8-7.85+14.04.20140403.1/qml/Dash/CardFilterGrid.qml --- unity8-7.85+14.04.20140401.3/qml/Dash/CardFilterGrid.qml 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/qml/Dash/CardFilterGrid.qml 2014-04-03 10:38:21.000000000 +0000 @@ -21,10 +21,7 @@ id: genericFilterGrid expandable: filterGrid.expandable - collapsedRowCount: Math.min(2, cardTool && cardTool.template && cardTool.template["collapsed-rows"] || 2) collapsedHeight: filterGrid.collapsedHeight - columns: filterGrid.columns - rows: filter ? collapsedRowCount : uncollapsedRowCount margins: filterGrid.margins uncollapsedHeight: filterGrid.uncollapsedHeight verticalSpacing: units.gu(1) @@ -44,7 +41,7 @@ verticalSpacing: genericFilterGrid.verticalSpacing model: genericFilterGrid.model filter: genericFilterGrid.filter - collapsedRowCount: genericFilterGrid.collapsedRowCount + collapsedRowCount: Math.min(2, cardTool && cardTool.template && cardTool.template["collapsed-rows"] || 2) delegateCreationBegin: genericFilterGrid.delegateCreationBegin delegateCreationEnd: genericFilterGrid.delegateCreationEnd delegate: Item { diff -Nru unity8-7.85+14.04.20140401.3/qml/Dash/DashRenderer.qml unity8-7.85+14.04.20140403.1/qml/Dash/DashRenderer.qml --- unity8-7.85+14.04.20140401.3/qml/Dash/DashRenderer.qml 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/qml/Dash/DashRenderer.qml 2014-04-03 10:38:21.000000000 +0000 @@ -23,14 +23,8 @@ // In case it can be expanded, should we filter it property bool filter: true - property int collapsedRowCount: 1 - property int collapsedHeight: height - property int columns: 1 - - property int rows: 1 - property int margins: 0 property int uncollapsedHeight: height diff -Nru unity8-7.85+14.04.20140401.3/src/main.cpp unity8-7.85+14.04.20140403.1/src/main.cpp --- unity8-7.85+14.04.20140401.3/src/main.cpp 2014-04-01 22:55:36.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/src/main.cpp 2014-04-03 10:37:47.000000000 +0000 @@ -117,6 +117,9 @@ QUrl source(::qmlDirectory()+"Shell.qml"); prependImportPaths(view->engine(), ::overrideImportPaths()); + if (!isUbuntuMirServer) { + prependImportPaths(view->engine(), ::nonMirImportPaths()); + } appendImportPaths(view->engine(), ::fallbackImportPaths()); view->setSource(source); diff -Nru unity8-7.85+14.04.20140401.3/tests/autopilot/unity8/shell/emulators/dash.py unity8-7.85+14.04.20140403.1/tests/autopilot/unity8/shell/emulators/dash.py --- unity8-7.85+14.04.20140401.3/tests/autopilot/unity8/shell/emulators/dash.py 2014-04-01 22:55:19.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/autopilot/unity8/shell/emulators/dash.py 2014-04-03 10:38:13.000000000 +0000 @@ -142,6 +142,7 @@ :parameter category: The name of the category where the application is. :app_name: The name of the application. + :return: The opened preview. """ category_element = self._get_category_element(category) @@ -150,8 +151,11 @@ # Some categories do not show previews, like recent apps. # --elopio - 2014-1-14 self.pointing_device.click_object(icon) - return self.get_root_instance().wait_select_single( + preview_list = self.get_root_instance().wait_select_single( 'PreviewListView', objectName='dashContentPreviewList') + preview_list.x.wait_for(0) + return preview_list.select_single( + Preview, objectName='preview{}'.format(preview_list.currentIndex)) def _get_category_element(self, category): try: @@ -180,3 +184,7 @@ if card.objectName != 'cardToolCard': result.append(card) return result + + +class Preview(emulators.UnityEmulatorBase): + """Autopilot custom proxy object for generic previews.""" diff -Nru unity8-7.85+14.04.20140401.3/tests/autopilot/unity8/shell/tests/test_emulators.py unity8-7.85+14.04.20140403.1/tests/autopilot/unity8/shell/tests/test_emulators.py --- unity8-7.85+14.04.20140401.3/tests/autopilot/unity8/shell/tests/test_emulators.py 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/autopilot/unity8/shell/tests/test_emulators.py 2014-04-03 10:38:21.000000000 +0000 @@ -141,7 +141,9 @@ def test_open_preview(self): preview = self.generic_scope.open_preview('0', 'Title.0.0') - preview.x.wait_for(0) + self.assertIsInstance(preview, dash_emulators.Preview) + self.assertTrue(preview.isCurrent) + class DashAppsEmulatorTestCase(DashBaseTestCase): @@ -185,8 +187,8 @@ category_element = self.applications_scope._get_category_element( category) grid = category_element.select_single('CardFilterGrid') - return grid.columns * grid.rows - - def test_open_preview(self): - preview = self.applications_scope.open_preview('2', 'Title.2.1') - preview.x.wait_for(0) + filtergrid = grid.select_single('FilterGrid') + if (grid.filter): + return filtergrid.collapsedRowCount * filtergrid.columns + else: + return filtergrid.uncollapsedRowCount * filtergrid.columns diff -Nru unity8-7.85+14.04.20140401.3/tests/autopilot/unity8/shell/tests/test_system_integration.py unity8-7.85+14.04.20140403.1/tests/autopilot/unity8/shell/tests/test_system_integration.py --- unity8-7.85+14.04.20140401.3/tests/autopilot/unity8/shell/tests/test_system_integration.py 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/autopilot/unity8/shell/tests/test_system_integration.py 2014-04-03 10:38:29.000000000 +0000 @@ -22,6 +22,7 @@ import subprocess import unittest +from autopilot import platform from unity8.shell.emulators import UnityEmulatorBase from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios @@ -31,7 +32,7 @@ scenarios = _get_device_emulation_scenarios() - @unittest.skip("Disabled until we can investigate jenkins failure") + @unittest.skipIf(platform.model() == "Desktop", "Test is broken on otto, see bug 1281634.") def test_networkmanager_integration(self): self.launch_unity() diff -Nru unity8-7.85+14.04.20140401.3/tests/CMakeLists.txt unity8-7.85+14.04.20140403.1/tests/CMakeLists.txt --- unity8-7.85+14.04.20140401.3/tests/CMakeLists.txt 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/CMakeLists.txt 2014-04-03 10:38:05.000000000 +0000 @@ -1,7 +1,7 @@ -# QML tests that do not require graphical capabitlies. +# QML tests that do not require graphical capabilities. add_custom_target(qmlunittests) -# QML tests that require graphical capabitlies. +# QML tests that require graphical capabilities. add_custom_target(qmluitests) add_custom_target(qmltests) diff -Nru unity8-7.85+14.04.20140401.3/tests/mocks/Unity/Application/ApplicationScreenshotProvider.cpp unity8-7.85+14.04.20140403.1/tests/mocks/Unity/Application/ApplicationScreenshotProvider.cpp --- unity8-7.85+14.04.20140401.3/tests/mocks/Unity/Application/ApplicationScreenshotProvider.cpp 2014-04-01 22:55:19.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/mocks/Unity/Application/ApplicationScreenshotProvider.cpp 2014-04-03 10:37:56.000000000 +0000 @@ -54,6 +54,9 @@ if (app->stage() == ApplicationInfo::SideStage) { QByteArray gus = qgetenv("GRID_UNIT_PX"); + if (gus.isEmpty() || gus.toInt() == 0) { + gus = "8"; + } image = image.scaledToWidth(gus.toInt() * 48); } else { // Lets scale main stage applications to be the size of the screen/window. diff -Nru unity8-7.85+14.04.20140401.3/tests/mocks/Unity/Application/CMakeLists.txt unity8-7.85+14.04.20140403.1/tests/mocks/Unity/Application/CMakeLists.txt --- unity8-7.85+14.04.20140401.3/tests/mocks/Unity/Application/CMakeLists.txt 2014-04-01 22:55:19.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/mocks/Unity/Application/CMakeLists.txt 2014-04-03 10:37:47.000000000 +0000 @@ -35,3 +35,17 @@ install(FILES qmldir InputFilterArea.qml OSKController.qml DESTINATION ${SHELL_INSTALL_QML}/mocks/Unity/Application ) + +# Duplicate the mock to nonmirplugins +# In shadow builds we just link it, in real installs we also install it to the other path +add_custom_target(OSKControllerQmlFile2 ALL + COMMAND mkdir -p ${CMAKE_BINARY_DIR}/nonmirplugins/Unity && rm -f ${CMAKE_BINARY_DIR}/nonmirplugins/Unity/Application && ln -s ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}/nonmirplugins/Unity + DEPENDS qmldir +) +install(TARGETS FakeUnityApplicationQml + DESTINATION ${SHELL_INSTALL_QML}/nonmirplugins/Unity/Application + ) + +install(FILES qmldir InputFilterArea.qml OSKController.qml + DESTINATION ${SHELL_INSTALL_QML}/nonmirplugins/Unity/Application + ) diff -Nru unity8-7.85+14.04.20140401.3/tests/plugins/Ubuntu/Gestures/CMakeLists.txt unity8-7.85+14.04.20140403.1/tests/plugins/Ubuntu/Gestures/CMakeLists.txt --- unity8-7.85+14.04.20140401.3/tests/plugins/Ubuntu/Gestures/CMakeLists.txt 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/plugins/Ubuntu/Gestures/CMakeLists.txt 2014-04-03 10:38:05.000000000 +0000 @@ -15,20 +15,11 @@ add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins") macro(add_gesture_ui_test CLASSNAME) - set(testCommand - LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures - ${CMAKE_CURRENT_BINARY_DIR}/${CLASSNAME}TestExec - -o ${CMAKE_BINARY_DIR}/${CLASSNAME}Test.xml,xunitxml - -o -,txt) - - add_custom_target(test${CLASSNAME} ${testCommand}) - add_dependencies(qmluitests test${CLASSNAME}) - add_dependencies(test${CLASSNAME} ${CLASSNAME}TestExec UbuntuGesturesTestQmlFiles) - add_executable(${CLASSNAME}TestExec tst_${CLASSNAME}.cpp GestureTest.cpp) qt5_use_modules(${CLASSNAME}TestExec Test Core Qml Gui Quick) target_link_libraries(${CLASSNAME}TestExec UbuntuGestureQml) - add_manual_qml_test(. ${CLASSNAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins) + + add_binary_qml_test(${CLASSNAME} ${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures UbuntuGesturesTestQmlFiles) endmacro(add_gesture_ui_test) macro(add_gesture_test CLASSNAME) diff -Nru unity8-7.85+14.04.20140401.3/tests/qmltests/CMakeLists.txt unity8-7.85+14.04.20140403.1/tests/qmltests/CMakeLists.txt --- unity8-7.85+14.04.20140401.3/tests/qmltests/CMakeLists.txt 2014-04-01 22:55:27.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/qmltests/CMakeLists.txt 2014-04-03 10:38:05.000000000 +0000 @@ -21,7 +21,6 @@ add_qml_test(. Shell IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single") -add_manual_qml_test(Components DragHandle IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins) add_qml_test(Components Carousel) add_qml_test(Components DraggingArea) add_qml_test(Components EdgeDemoOverlay) @@ -33,9 +32,6 @@ add_qml_test(Components Revealer) add_qml_test(Components SeeMore) add_qml_test(Components Showable) -add_qml_test(Components Stage IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} - ${CMAKE_BINARY_DIR}/tests/mocks - ${CMAKE_BINARY_DIR}/plugins) add_qml_test(Components PageHeaderLabel) add_qml_test(Dash Dash IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}) add_qml_test(Dash DashContent IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}) diff -Nru unity8-7.85+14.04.20140401.3/tests/qmltests/Components/CMakeLists.txt unity8-7.85+14.04.20140403.1/tests/qmltests/Components/CMakeLists.txt --- unity8-7.85+14.04.20140401.3/tests/qmltests/Components/CMakeLists.txt 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/qmltests/Components/CMakeLists.txt 2014-04-03 10:38:05.000000000 +0000 @@ -6,19 +6,11 @@ ${Qt5Gui_PRIVATE_INCLUDE_DIRS} ) -set(testCommand - LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures - ${CMAKE_CURRENT_BINARY_DIR}/DragHandleTestExec - -o ${CMAKE_BINARY_DIR}/DragHandleTest.xml,xunitxml - -o -,txt) - -add_custom_target(testDragHandle ${testCommand}) -add_dependencies(qmluitests testDragHandle) -add_dependencies(testDragHandle DragHandleTestExec) - add_executable(DragHandleTestExec tst_DragHandle.cpp) qt5_use_modules(DragHandleTestExec Test Core Qml Gui Quick) target_link_libraries(DragHandleTestExec UbuntuGestureQml) +add_binary_qml_test(DragHandle ${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures "") + add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins") add_definitions(-DTEST_DIR="${CMAKE_CURRENT_LIST_DIR}") diff -Nru unity8-7.85+14.04.20140401.3/tests/qmltests/Components/tst_LazyImage.qml unity8-7.85+14.04.20140403.1/tests/qmltests/Components/tst_LazyImage.qml --- unity8-7.85+14.04.20140401.3/tests/qmltests/Components/tst_LazyImage.qml 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/qmltests/Components/tst_LazyImage.qml 2014-04-03 10:38:05.000000000 +0000 @@ -152,6 +152,7 @@ function test_lazyimage(data) { data.func(); + waitForRendering(baseRect); if (data.transition) { // wait for the transition to complete diff -Nru unity8-7.85+14.04.20140401.3/tests/qmltests/Components/tst_Stage/AppControl.qml unity8-7.85+14.04.20140403.1/tests/qmltests/Components/tst_Stage/AppControl.qml --- unity8-7.85+14.04.20140401.3/tests/qmltests/Components/tst_Stage/AppControl.qml 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/qmltests/Components/tst_Stage/AppControl.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright 2013 Canonical Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick 2.0 -import Ubuntu.Components 0.1 - -Row { - id: root - property string desktopFile - spacing: units.gu(1) - - property alias checked: checkbox.checked - - Label {text: root.desktopFile - anchors.verticalCenter: parent.verticalCenter - width:units.gu(5)} - - CheckBox { - id: checkbox - onCheckedChanged: { - if (checked) { - var app = fakeAppManager.activateApplication(root.desktopFile) - stage.activateApplication(root.desktopFile) - } else { - fakeAppManager.deacticateApplication(root.desktopFile) - } - } - } -} diff -Nru unity8-7.85+14.04.20140401.3/tests/qmltests/Components/tst_Stage/FakeApplicationScreenshot.qml unity8-7.85+14.04.20140403.1/tests/qmltests/Components/tst_Stage/FakeApplicationScreenshot.qml --- unity8-7.85+14.04.20140401.3/tests/qmltests/Components/tst_Stage/FakeApplicationScreenshot.qml 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/qmltests/Components/tst_Stage/FakeApplicationScreenshot.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2013 Canonical, Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick 2.0 - -Item { - property var application - property bool withBackground: true - property bool ready: application != undefined - - function setApplication(app) { - application = app - } - - function clearApplication() { - setApplication(undefined) - } - - function scheduleUpdate() {} - - function updateFromCache() {} - - Rectangle { - id: rect - anchors.fill: parent - Text {id:text} - } - - onApplicationChanged: { - if (application) { - rect.color = application.color - text.text = application.desktopFile + " screenshot" - rect.visible = true - } else { - rect.color = "white" - text.text = " screenshot" - rect.visible = false - } - } -} diff -Nru unity8-7.85+14.04.20140401.3/tests/qmltests/Components/tst_Stage.qml unity8-7.85+14.04.20140403.1/tests/qmltests/Components/tst_Stage.qml --- unity8-7.85+14.04.20140401.3/tests/qmltests/Components/tst_Stage.qml 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/qmltests/Components/tst_Stage.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,278 +0,0 @@ -/* - * Copyright 2013 Canonical Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick 2.0 -import QtTest 1.0 -import ".." -import "../../../qml/Components" -import Unity.Application 0.1 -import Ubuntu.Components 0.1 -import Unity.Test 0.1 as UT -import "tst_Stage" - -Rectangle { - width: units.gu(70) - height: stageRect.height - - // Even though we replace the ApplicationScreenshot instances in Stage - // with our own fake ones, ApplicationScreenshot.qml still gives out a warning - // if shell.importUbuntuApplicationAvailable is missing. - // For we have this here for the sake of keeping a clean log output. - Item { - id: shell - property bool importUbuntuApplicationAvailable: false - } - - // A fake ApplicationManager implementation to be passed to Stage - QtObject { - id: fakeAppManager - property ListModel mainStageApplications: ListModel {} - property ListModel sideStageApplications: ListModel {} - property var mainStageFocusedApplication - - property Component fakeAppWindowComponent: Component { - Rectangle { - width: stage.width - height: stage.height - property alias text : txt.text - Text {id:txt} - } - } - - function activateApplication(desktopFile, argument) { - var appWindow = fakeAppWindowComponent.createObject(fakeWindowContainer) - var application = { - 'icon': "foo", - 'handle': desktopFile, - 'name': "Foo", - 'fullscreen': false, - 'desktopFile': desktopFile, - 'stage': ApplicationInfo.MainStage, - 'argument': 0, - 'color': desktopFile, - 'window': appWindow - }; - appWindow.color = application.color - appWindow.text = desktopFile + " actual"; - - mainStageApplications.append(application) - updateZOrderOfWindows(mainStageApplications) - - return application - } - - function focusApplication(application) { - mainStageFocusedApplication = application - } - - function getApplicationFromDesktopFile(desktopFile, stageType) { - var sideStage = (stage == ApplicationInfo.SideStage); - var applications = sideStage ? sideStageApplications - : mainStageApplications; - - for (var i = 0; i < applications.count; i++ ) { - var application = applications.get(i); - if (application.desktopFile === desktopFile) { - return application; - } - } - return null; - } - - function moveRunningApplicationStackPosition(from, to, stage) { - var sideStage = (stage == ApplicationInfo.SideStage); - var applications = sideStage ? sideStageApplications - : mainStageApplications; - - if (from !== to && applications.count > 0 && from >= 0 && to >= 0) { - applications.move(from, to, 1); - } - - updateZOrderOfWindows(applications) - } - - function updateZOrderOfWindows(applications) { - var nextZ = 100 - for (var i = 0; i < applications.count; i++ ) { - var application = applications.get(i); - application.window.z = nextZ--; - } - } - - function deacticateApplication(desktopFile) { - for (var i = 0; i < mainStageApplications.count; i++ ) { - var application = mainStageApplications.get(i) - if (application.desktopFile === desktopFile) { - focusApplication(null) - application.window.destroy(); - mainStageApplications.remove(i) - updateZOrderOfWindows(mainStageApplications) - return; - } - } - } - } - - Rectangle { - id: stageRect - x:0 - y:0 - width: childrenRect.width - height: childrenRect.height - - color: "grey" - - // This is where the fake windows are held. - // They stay behind the stage, so that the stage's screenshots are shown - // on top of them - // On a real usage scenario, the current application's surface is composited behind - // the shell's surface (where Stage lives). fakeWindowContainer simulates this stacking - Item { - id: fakeWindowContainer - anchors.fill: parent - } - - - // A black rectangle behind the stage so that the window switch animations - // look good, just like in Stage's real usage. - Rectangle { - anchors.fill: parent - color: "black" - visible: stage.usingScreenshots - } - - Stage { - id: stage - y: 0 - shouldUseScreenshots: false - applicationManager: fakeAppManager - rightEdgeDraggingAreaWidth: units.gu(2) - fullyShown: true - fullyHidden: false - newApplicationScreenshot: FakeApplicationScreenshot { - id: newAppScreenshot - parent: stage - width: stage.width - height: stage.height - stage.y} - oldApplicationScreenshot: FakeApplicationScreenshot { - id: oldAppScreenshot - parent: stage - width: stage.width - height: stage.height - stage.y} - } - } - - Rectangle { - id: controlsRect - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: stageRect.right - anchors.right: parent.right - color: "lightgrey" - - Column { - id: controls - spacing: units.gu(1) - AppControl {id: redControl; desktopFile:"red"} - AppControl {id: greenControl; desktopFile:"green"} - AppControl {id: blueControl; desktopFile:"blue"} - } - } - - UT.UnityTestCase { - name: "Stage" - when: windowShown - - function isCurrentAppFadingOut() { - // it should get a bit translucent and smaller - return oldAppScreenshot.opacity < 0.99 - && oldAppScreenshot.opacity >= 0.1 - && oldAppScreenshot.scale < 0.99 - && oldAppScreenshot.scale >= 0.1 - && oldAppScreenshot.visible - } - - function init() { - redControl.checked = false; - greenControl.checked = false; - blueControl.checked = false; - // give some room for animations to start - wait(50) - // wait until animations end, if any - tryCompare(stage, "usingScreenshots", false) - } - - /* If you flick from the right edge of the stage leftwards it should cause an - application switch. */ - function test_dragFromRightEdgeToSwitchApplication() { - redControl.checked = true - - tryCompare(stage, "usingScreenshots", true) // wait for the animation to start - tryCompare(stage, "usingScreenshots", false) // and then for it to end - compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red") - compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red") - - greenControl.checked = true - - tryCompare(stage, "usingScreenshots", true) // wait for the animation to start - tryCompare(stage, "usingScreenshots", false) // and then for it to end - compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "green") - compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "green") - - var touchX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2) - var touchY = stage.height / 2 - touchFlick(stage, touchX, touchY, stage.width * 0.25, touchY) - - // wait until animations end, if any - tryCompare(stage, "usingScreenshots", false) - - // "red" should be the new topmost, focused, application - compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red") - compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red") - } - - /* When an application is launched, it needs a background before it's drawn on screen - so that the user does not see the previous running app while the new one is launching. - When switching between applications, backgrounds are unnecessary, 'cause the - applications are in front of them. */ - function test_background() { - redControl.checked = true - tryCompare(stage, "usingScreenshots", true) // wait for the animation to start - - compare(newAppScreenshot.withBackground, true, "starting app screenshot does not have background enabled") - - tryCompare(stage, "usingScreenshots", false) // wait for the animation to finish - - greenControl.checked = true - tryCompare(stage, "usingScreenshots", true) // wait for the animation to start - tryCompare(stage, "usingScreenshots", false) // and finish - - var draggingAreaCenterX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2) - var draggingAreaCenterY = stage.height / 2 - var finalTouchX = draggingAreaCenterX - units.gu(5) - touchFlick(stage, draggingAreaCenterX, draggingAreaCenterY, - finalTouchX, draggingAreaCenterY, - true /* beginTouch */, false /* endTouch */) - - // wait for the animation to start - tryCompare(stage, "usingScreenshots", true) - - compare(newAppScreenshot.withBackground, false, "switched app does have background enabled") - - touchRelease(stage, finalTouchX, draggingAreaCenterY) - } - } -} diff -Nru unity8-7.85+14.04.20140401.3/tests/qmltests/Dash/tst_GenericScopeView.qml unity8-7.85+14.04.20140403.1/tests/qmltests/Dash/tst_GenericScopeView.qml --- unity8-7.85+14.04.20140401.3/tests/qmltests/Dash/tst_GenericScopeView.qml 2014-04-01 22:56:21.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/qmltests/Dash/tst_GenericScopeView.qml 2014-04-03 10:37:56.000000000 +0000 @@ -67,6 +67,7 @@ when: scopes.loaded function init() { + genericScopeView.scope = scopes.get(2) shell.width = units.gu(120) genericScopeView.categoryView.positionAtBeginning(); tryCompare(genericScopeView.categoryView, "contentY", 0) diff -Nru unity8-7.85+14.04.20140401.3/tests/qmltests/SideStage/tst_SideStage.qml unity8-7.85+14.04.20140403.1/tests/qmltests/SideStage/tst_SideStage.qml --- unity8-7.85+14.04.20140401.3/tests/qmltests/SideStage/tst_SideStage.qml 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/qmltests/SideStage/tst_SideStage.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - * Copyright 2013 Canonical Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick 2.0 -import QtTest 1.0 -import Unity.Test 0.1 as UT -import ".." -import "../../../qml/SideStage" -import Ubuntu.Components 0.1 - -UT.UnityTestCase { - name: "SideStage" - - SideStage { - id: sideStage - width: units.gu(30) - height: units.gu(30) - handleExpanded: sideStageRevealer.pressed - handleSizeCollapsed: units.gu(2) - handleSizeExpanded: units.gu(5) - } - - function test_handle_data() { - return [ - {tag: "expanded", expanded: true}, - {tag: "collapsed", expanded: false} - ] - } - - function test_handle(data) { - sideStage.handleExpanded = data.expanded - - if (data.expanded) { - tryCompare(findChild(sideStage, "sideStageHandle"), "width", sideStage.handleSizeExpanded); - } else { - tryCompare(findChild(sideStage, "sideStageHandle"), "width", sideStage.handleSizeCollapsed); - } - } -} diff -Nru unity8-7.85+14.04.20140401.3/tests/qmltests/tst_Shell.qml unity8-7.85+14.04.20140403.1/tests/qmltests/tst_Shell.qml --- unity8-7.85+14.04.20140401.3/tests/qmltests/tst_Shell.qml 2014-04-01 22:55:19.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tests/qmltests/tst_Shell.qml 2014-04-03 10:37:56.000000000 +0000 @@ -192,7 +192,7 @@ verify(mainAppId != ""); var mainApp = ApplicationManager.findApplication(mainAppId); verify(mainApp); - tryCompare(mainApp.state, ApplicationInfo.Running); + tryCompare(mainApp, "state", ApplicationInfo.Running); // Try to suspend while proximity is engaged... Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity); diff -Nru unity8-7.85+14.04.20140401.3/tools/scopetool.cpp unity8-7.85+14.04.20140403.1/tools/scopetool.cpp --- unity8-7.85+14.04.20140401.3/tools/scopetool.cpp 2014-04-01 22:54:50.000000000 +0000 +++ unity8-7.85+14.04.20140403.1/tools/scopetool.cpp 2014-04-03 10:37:47.000000000 +0000 @@ -88,6 +88,7 @@ QUrl source(::qmlDirectory() + "ScopeTool.qml"); prependImportPaths(view->engine(), ::overrideImportPaths()); + prependImportPaths(view->engine(), ::nonMirImportPaths()); appendImportPaths(view->engine(), ::fallbackImportPaths()); view->setSource(source);