on xenial help sign in
Merged with trunk
commit8ff19dd75b6bb4bd6dfc0a2c4ad4a7320e98914e authorNick Dedekind <nicholas.dedekind@gmail.com> dateFri 20 Dec 2013, 10:03 (13 years ago) parentc54542c51ec53a
351 files changed+1732−205
CMakeLists.txt+11−64 CODING+39 data/CMakeLists.txt+7 unity8.desktop.in → data/unity8.desktop.in debian/unity8-private.install+1−1 include/CMakeLists.txt+1 paths.h.in → include/paths.h.in+3−3 plugins/CMakeLists.txt+1−1 plugins/ListViewWithPageHeader/CMakeLists.txt → plugins/DashViews/CMakeLists.txt+6−5 plugins/ListViewWithPageHeader/listviewwithpageheader.cpp → plugins/DashViews/listviewwithpageheader.cpp plugins/ListViewWithPageHeader/listviewwithpageheader.h → plugins/DashViews/listviewwithpageheader.h plugins/ListViewWithPageHeader/plugin.cpp → plugins/DashViews/plugin.cpp+4−2 plugins/ListViewWithPageHeader/plugin.h → plugins/DashViews/plugin.h+3−3 plugins/DashViews/qmldir+3 plugins/DashViews/verticaljournal.cpp+609 plugins/DashViews/verticaljournal.h+182 plugins/LightDM/CMakeLists.txt+1 plugins/LightDM/UsersModel.h+1−1 plugins/ListViewWithPageHeader/qmldir−3 plugins/Unity/Indicators/indicatorsmanager.cpp+1−1 plugins/Unity/Indicators/indicatorsmodel.cpp+4−3 Bottombar/Bottombar.qml → qml/Bottombar/Bottombar.qml Bottombar/HudButton.qml → qml/Bottombar/HudButton.qml Bottombar/graphics/hud@20.png → qml/Bottombar/graphics/hud@20.png Bottombar/graphics/hud_invoke_button_active@20.png → qml/Bottombar/graphics/hud_invoke_button_active@20.png qml/CMakeLists.txt+22 Components/AnimationControllerWithSignals.qml → qml/Components/AnimationControllerWithSignals.qml Components/ApplicationManagerWrapper.qml → qml/Components/ApplicationManagerWrapper.qml Components/ApplicationScreenshot.qml → qml/Components/ApplicationScreenshot.qml Components/ApplicationsModelStageFiltered.qml → qml/Components/ApplicationsModelStageFiltered.qml Components/BaseCarouselDelegate.qml → qml/Components/BaseCarouselDelegate.qml Components/Carousel.qml → qml/Components/Carousel.qml Components/Circle.qml → qml/Components/Circle.qml Components/DragHandle.qml → qml/Components/DragHandle.qml Components/DraggingArea.qml → qml/Components/DraggingArea.qml Components/EdgeDemo.qml → qml/Components/EdgeDemo.qml Components/EdgeDemoOverlay.qml → qml/Components/EdgeDemoOverlay.qml Components/EdgeDragArea.qml → qml/Components/EdgeDragArea.qml Components/EdgeDragEvaluator.qml → qml/Components/EdgeDragEvaluator.qml Components/FilterGrid.qml → qml/Components/FilterGrid.qml Components/LazyImage.qml → qml/Components/LazyImage.qml Components/ListItems/Base.qml → qml/Components/ListItems/Base.qml Components/ListItems/Header.qml → qml/Components/ListItems/Header.qml Components/ListItems/Highlight.qml → qml/Components/ListItems/Highlight.qml Components/ListItems/ThinDivider.qml → qml/Components/ListItems/ThinDivider.qml Components/ListItems/VerticalThinDivider.qml → qml/Components/ListItems/VerticalThinDivider.qml Components/ListItems/graphics/ListItemDividerHorizontal@18.png → qml/Components/ListItems/graphics/ListItemDividerHorizontal@18.png Components/ListItems/graphics/ListItemDividerVertical@18.png → qml/Components/ListItems/graphics/ListItemDividerVertical@18.png Components/OpenEffect.qml → qml/Components/OpenEffect.qml Components/PageHeader.qml → qml/Components/PageHeader.qml Components/PinPadButton.qml → qml/Components/PinPadButton.qml Components/RatingStars.qml → qml/Components/RatingStars.qml Components/ResponsiveFlowView.qml → qml/Components/ResponsiveFlowView.qml Components/ResponsiveGridView.qml → qml/Components/ResponsiveGridView.qml Components/Revealer.qml → qml/Components/Revealer.qml Components/SearchHistoryModel.qml → qml/Components/SearchHistoryModel.qml Components/Showable.qml → qml/Components/Showable.qml Components/Stage.qml → qml/Components/Stage.qml Components/StandardAnimation.qml → qml/Components/StandardAnimation.qml Components/Tile.qml → qml/Components/Tile.qml Components/TileStyle.qml → qml/Components/TileStyle.qml Components/UbuntuShapeForItem.qml → qml/Components/UbuntuShapeForItem.qml Components/VolumeControl.qml → qml/Components/VolumeControl.qml Components/WrongPasswordAnimation.qml → qml/Components/WrongPasswordAnimation.qml Components/carousel.js → qml/Components/carousel.js Components/graphics/PageHeaderBaseDivider@18.png → qml/Components/graphics/PageHeaderBaseDivider@18.png Components/graphics/PageHeaderBaseDivider@18.sci → qml/Components/graphics/PageHeaderBaseDivider@18.sci Components/graphics/close@20.png → qml/Components/graphics/close@20.png Components/graphics/icon_star_off@20.png → qml/Components/graphics/icon_star_off@20.png Components/graphics/icon_star_on@20.png → qml/Components/graphics/icon_star_on@20.png Components/graphics/non-selected@18.png → qml/Components/graphics/non-selected@18.png Components/graphics/non-selected@18.sci → qml/Components/graphics/non-selected@18.sci Dash/Apps/AppPreview.qml → qml/Dash/Apps/AppPreview.qml Dash/Apps/CloseIcon.qml → qml/Dash/Apps/CloseIcon.qml Dash/Apps/DashPluginFilterGrid.qml → qml/Dash/Apps/DashPluginFilterGrid.qml Dash/Apps/FrequentlyUsedAppsModel.qml → qml/Dash/Apps/FrequentlyUsedAppsModel.qml Dash/Apps/RunningApplicationTile.qml → qml/Dash/Apps/RunningApplicationTile.qml Dash/Apps/RunningApplicationsGrid.qml → qml/Dash/Apps/RunningApplicationsGrid.qml Dash/Apps/graphics/close_btn@9.png → qml/Dash/Apps/graphics/close_btn@9.png Dash/Dash.qml → qml/Dash/Dash.qml Dash/DashApps.qml → qml/Dash/DashApps.qml Dash/DashBar.qml → qml/Dash/DashBar.qml Dash/DashCarousel.qml → qml/Dash/DashCarousel.qml Dash/DashContent.qml → qml/Dash/DashContent.qml Dash/DashFilterGrid.qml → qml/Dash/DashFilterGrid.qml Dash/DashHome.qml → qml/Dash/DashHome.qml Dash/DashPreview.qml → qml/Dash/DashPreview.qml Dash/DashPreviewPlaceholder.qml → qml/Dash/DashPreviewPlaceholder.qml Dash/DashRenderer.qml → qml/Dash/DashRenderer.qml Dash/Generic/FlatTileStyle.qml → qml/Dash/Generic/FlatTileStyle.qml Dash/Generic/GenericCarousel.qml → qml/Dash/Generic/GenericCarousel.qml Dash/Generic/GenericFilterGrid.qml → qml/Dash/Generic/GenericFilterGrid.qml Dash/Generic/GenericFilterGridPotrait.qml → qml/Dash/Generic/GenericFilterGridPotrait.qml Dash/Generic/GenericPreview.qml → qml/Dash/Generic/GenericPreview.qml Dash/Generic/WeatherFilterGrid.qml → qml/Dash/Generic/WeatherFilterGrid.qml Dash/GenericScopeView.qml → qml/Dash/GenericScopeView.qml Dash/Movie/MoviePreview.qml → qml/Dash/Movie/MoviePreview.qml Dash/Music/CarouselDelegateMusic.qml → qml/Dash/Music/CarouselDelegateMusic.qml Dash/Music/MusicCarousel.qml → qml/Dash/Music/MusicCarousel.qml Dash/Music/MusicFilterGrid.qml → qml/Dash/Music/MusicFilterGrid.qml Dash/Music/MusicPreview.qml → qml/Dash/Music/MusicPreview.qml Dash/Music/MusicTileStyle.qml → qml/Dash/Music/MusicTileStyle.qml Dash/Music/graphics/music_progress_bg.png → qml/Dash/Music/graphics/music_progress_bg.png Dash/PreviewDelegateMapper.qml → qml/Dash/PreviewDelegateMapper.qml Dash/Previews/Header.qml → qml/Dash/Previews/Header.qml Dash/Previews/Reviews.qml → qml/Dash/Previews/Reviews.qml Dash/ScopeDelegateMapper.qml → qml/Dash/ScopeDelegateMapper.qml Dash/ScopeListView.qml → qml/Dash/ScopeListView.qml+1−1 Dash/SearchableResultModel.qml → qml/Dash/SearchableResultModel.qml Dash/Video/CarouselDelegateVideo.qml → qml/Dash/Video/CarouselDelegateVideo.qml Dash/Video/VideoCarousel.qml → qml/Dash/Video/VideoCarousel.qml Dash/Video/VideoFilterGrid.qml → qml/Dash/Video/VideoFilterGrid.qml Dash/Video/VideoTileStyle.qml → qml/Dash/Video/VideoTileStyle.qml Dash/Video/graphics/icon_button_amazon@20.png → qml/Dash/Video/graphics/icon_button_amazon@20.png Dash/Video/graphics/icon_button_u1@20.png → qml/Dash/Video/graphics/icon_button_u1@20.png Dash/Video/graphics/movie_icon_holder@27.png → qml/Dash/Video/graphics/movie_icon_holder@27.png Dash/graphics/header_handlearrow2@20.png → qml/Dash/graphics/header_handlearrow2@20.png Dash/graphics/header_handlearrow@20.png → qml/Dash/graphics/header_handlearrow@20.png Dash/graphics/icon_clear@20.png → qml/Dash/graphics/icon_clear@20.png Dash/graphics/icon_listview_clear@20.png → qml/Dash/graphics/icon_listview_clear@20.png Dash/graphics/icon_search_active@20.png → qml/Dash/graphics/icon_search_active@20.png Dash/graphics/icon_search_inactive@20.png → qml/Dash/graphics/icon_search_inactive@20.png Dash/graphics/phone/screenshots/browser@12.png → qml/Dash/graphics/phone/screenshots/browser@12.png Dash/graphics/phone/screenshots/camera@12.png → qml/Dash/graphics/phone/screenshots/camera@12.png Dash/graphics/phone/screenshots/facebook@12.png → qml/Dash/graphics/phone/screenshots/facebook@12.png Dash/graphics/phone/screenshots/gallery@12.png → qml/Dash/graphics/phone/screenshots/gallery@12.png Dash/graphics/phone/screenshots/map@12.png → qml/Dash/graphics/phone/screenshots/map@12.png Dash/graphics/phone/screenshots/music@12.png → qml/Dash/graphics/phone/screenshots/music@12.png Dash/graphics/phone/screenshots/phone@12.png → qml/Dash/graphics/phone/screenshots/phone@12.png Dash/graphics/phone/screenshots/settings@12.png → qml/Dash/graphics/phone/screenshots/settings@12.png Dash/graphics/phone/screenshots/twitter@12.png → qml/Dash/graphics/phone/screenshots/twitter@12.png Dash/graphics/play_button@18.png → qml/Dash/graphics/play_button@18.png Dash/graphics/play_button_active@18.png → qml/Dash/graphics/play_button_active@18.png Dash/graphics/play_button_active_big@20.png → qml/Dash/graphics/play_button_active_big@20.png Dash/graphics/play_button_big@20.png → qml/Dash/graphics/play_button_big@20.png Dash/graphics/tablet/icon_close_preview@20.png → qml/Dash/graphics/tablet/icon_close_preview@20.png Dash/graphics/tooltip_arrow@27.png → qml/Dash/graphics/tooltip_arrow@27.png Greeter/Clock.qml → qml/Greeter/Clock.qml Greeter/Dot.qml → qml/Greeter/Dot.qml Greeter/Gradient.js → qml/Greeter/Gradient.js Greeter/Greeter.qml → qml/Greeter/Greeter.qml Greeter/GreeterContent.qml → qml/Greeter/GreeterContent.qml Greeter/Infographics.qml → qml/Greeter/Infographics.qml Greeter/Lockscreen.qml → qml/Greeter/Lockscreen.qml+2−2 Greeter/LoginList.qml → qml/Greeter/LoginList.qml Greeter/ObjectPositioner.qml → qml/Greeter/ObjectPositioner.qml Greeter/PassphraseLockscreen.qml → qml/Greeter/PassphraseLockscreen.qml Greeter/PinLockscreen.qml → qml/Greeter/PinLockscreen.qml Greeter/graphics/dot_empty.png → qml/Greeter/graphics/dot_empty.png Greeter/graphics/dot_filled.png → qml/Greeter/graphics/dot_filled.png Greeter/graphics/dot_pointer.png → qml/Greeter/graphics/dot_pointer.png Greeter/graphics/icon_arrow.png → qml/Greeter/graphics/icon_arrow.png Greeter/graphics/infographic_circle_back.png → qml/Greeter/graphics/infographic_circle_back.png Hud/Hud.qml → qml/Hud/Hud.qml Hud/HudParametrizedActionsPage.qml → qml/Hud/HudParametrizedActionsPage.qml Hud/Result.qml → qml/Hud/Result.qml Hud/ResultList.qml → qml/Hud/ResultList.qml Hud/SearchBar.qml → qml/Hud/SearchBar.qml Hud/ShowingAnimation.qml → qml/Hud/ShowingAnimation.qml Hud/SliderLabel.qml → qml/Hud/SliderLabel.qml Hud/SoundAmplitudeDelegate.qml → qml/Hud/SoundAmplitudeDelegate.qml Hud/SoundAmplitudeVisual.qml → qml/Hud/SoundAmplitudeVisual.qml Hud/ToolBar.qml → qml/Hud/ToolBar.qml Hud/ToolBarIcon.qml → qml/Hud/ToolBarIcon.qml Hud/graphics/divider@20.png → qml/Hud/graphics/divider@20.png Hud/graphics/divider@20.sci → qml/Hud/graphics/divider@20.sci Hud/graphics/dropshadow_right@20.png → qml/Hud/graphics/dropshadow_right@20.png Hud/graphics/help@20.png → qml/Hud/graphics/help@20.png Hud/graphics/hud_bg@20.png → qml/Hud/graphics/hud_bg@20.png Hud/graphics/hud_handlearrow@20.png → qml/Hud/graphics/hud_handlearrow@20.png Hud/graphics/hud_handlebar@20.png → qml/Hud/graphics/hud_handlebar@20.png Hud/graphics/icon_arrow@20.png → qml/Hud/graphics/icon_arrow@20.png Hud/graphics/icon_clear@20.png → qml/Hud/graphics/icon_clear@20.png Hud/graphics/icon_search@20.png → qml/Hud/graphics/icon_search@20.png Hud/graphics/microphone@20.png → qml/Hud/graphics/microphone@20.png Hud/graphics/popup_triangle@20.png → qml/Hud/graphics/popup_triangle@20.png Hud/graphics/settings@20.png → qml/Hud/graphics/settings@20.png Hud/graphics/undo@20.png → qml/Hud/graphics/undo@20.png Hud/graphics/view-fullscreen@20.png → qml/Hud/graphics/view-fullscreen@20.png Launcher/FoldingLauncherDelegate.qml → qml/Launcher/FoldingLauncherDelegate.qml Launcher/Launcher.qml → qml/Launcher/Launcher.qml Launcher/LauncherDelegate.qml → qml/Launcher/LauncherDelegate.qml Launcher/LauncherPanel.qml → qml/Launcher/LauncherPanel.qml Launcher/graphics/focused_app_arrow@30.png → qml/Launcher/graphics/focused_app_arrow@30.png Launcher/graphics/highlight@18.png → qml/Launcher/graphics/highlight@18.png Launcher/graphics/home@18.png → qml/Launcher/graphics/home@18.png Launcher/graphics/launcher_bg@30.png → qml/Launcher/graphics/launcher_bg@30.png Launcher/graphics/launcher_bg@30.sci → qml/Launcher/graphics/launcher_bg@30.sci Launcher/graphics/non-selected@18.png → qml/Launcher/graphics/non-selected@18.png Launcher/graphics/non-selected@18.sci → qml/Launcher/graphics/non-selected@18.sci Launcher/graphics/notification@30.png → qml/Launcher/graphics/notification@30.png Launcher/graphics/notification@30.sci → qml/Launcher/graphics/notification@30.sci Launcher/graphics/progressbar-fill@30.png → qml/Launcher/graphics/progressbar-fill@30.png Launcher/graphics/progressbar-fill@30.sci → qml/Launcher/graphics/progressbar-fill@30.sci Launcher/graphics/progressbar-trough@30.png → qml/Launcher/graphics/progressbar-trough@30.png Launcher/graphics/progressbar-trough@30.sci → qml/Launcher/graphics/progressbar-trough@30.sci Launcher/graphics/quicklist_tooltip@30.png → qml/Launcher/graphics/quicklist_tooltip@30.png Launcher/graphics/selected@18.png → qml/Launcher/graphics/selected@18.png Launcher/graphics/selected@18.sci → qml/Launcher/graphics/selected@18.sci Launcher/graphics/triangle@18.png → qml/Launcher/graphics/triangle@18.png Notifications/Notification.qml → qml/Notifications/Notification.qml Notifications/NotificationMenuItemFactory.qml → qml/Notifications/NotificationMenuItemFactory.qml Notifications/Notifications.qml → qml/Notifications/Notifications.qml Notifications/ShapedIcon.qml → qml/Notifications/ShapedIcon.qml Panel/IndicatorItem.qml → qml/Panel/IndicatorItem.qml Panel/IndicatorRow.qml → qml/Panel/IndicatorRow.qml Panel/Indicators.qml → qml/Panel/Indicators.qml Panel/Indicators/DefaultIndicatorPage.qml → qml/Panel/Indicators/DefaultIndicatorPage.qml Panel/Indicators/DefaultIndicatorWidget.qml → qml/Panel/Indicators/DefaultIndicatorWidget.qml Panel/Indicators/client/IndicatorsClient.qml → qml/Panel/Indicators/client/IndicatorsClient.qml Panel/Indicators/client/IndicatorsList.qml → qml/Panel/Indicators/client/IndicatorsList.qml Panel/Indicators/client/IndicatorsPage.qml → qml/Panel/Indicators/client/IndicatorsPage.qml Panel/Indicators/client/IndicatorsTree.qml → qml/Panel/Indicators/client/IndicatorsTree.qml Panel/MenuContent.qml → qml/Panel/MenuContent.qml Panel/Panel.qml → qml/Panel/Panel.qml Panel/PanelBackground.qml → qml/Panel/PanelBackground.qml Panel/PanelSeparatorLine.qml → qml/Panel/PanelSeparatorLine.qml Panel/SearchIndicator.qml → qml/Panel/SearchIndicator.qml Panel/graphics/Battery@18.png → qml/Panel/graphics/Battery@18.png Panel/graphics/Bluetooth@18.png → qml/Panel/graphics/Bluetooth@18.png Panel/graphics/Clock@18.png → qml/Panel/graphics/Clock@18.png Panel/graphics/Location@18.png → qml/Panel/graphics/Location@18.png Panel/graphics/Messages@18.png → qml/Panel/graphics/Messages@18.png Panel/graphics/Network@18.png → qml/Panel/graphics/Network@18.png Panel/graphics/Sound@18.png → qml/Panel/graphics/Sound@18.png Panel/graphics/Sync@18.png → qml/Panel/graphics/Sync@18.png Panel/graphics/System@18.png → qml/Panel/graphics/System@18.png Panel/graphics/Time@18.png → qml/Panel/graphics/Time@18.png Panel/graphics/VerticalDivider@18.png → qml/Panel/graphics/VerticalDivider@18.png Panel/graphics/handle@12.png → qml/Panel/graphics/handle@12.png Panel/graphics/handle@12.sci → qml/Panel/graphics/handle@12.sci Panel/graphics/rectangular_dropshadow@30.png → qml/Panel/graphics/rectangular_dropshadow@30.png Panel/graphics/rectangular_dropshadow@30.sci → qml/Panel/graphics/rectangular_dropshadow@30.sci Panel/graphics/search@12.png → qml/Panel/graphics/search@12.png Panel/graphics/time_and_date@18.png → qml/Panel/graphics/time_and_date@18.png Shell.qml → qml/Shell.qml+2−1 SideStage/SideStage.qml → qml/SideStage/SideStage.qml SideStage/SidestageHandle.qml → qml/SideStage/SidestageHandle.qml SideStage/graphics/sidestage_handle@20.png → qml/SideStage/graphics/sidestage_handle@20.png SideStage/graphics/sidestage_handle@20.sci → qml/SideStage/graphics/sidestage_handle@20.sci graphics/12_10_background_wide@12.png → qml/graphics/12_10_background_wide@12.png graphics/applicationIcons/browser@18.png → qml/graphics/applicationIcons/browser@18.png graphics/applicationIcons/calendar@18.png → qml/graphics/applicationIcons/calendar@18.png graphics/applicationIcons/camera@18.png → qml/graphics/applicationIcons/camera@18.png graphics/applicationIcons/contacts-app@18.png → qml/graphics/applicationIcons/contacts-app@18.png graphics/applicationIcons/dash@18.png → qml/graphics/applicationIcons/dash@18.png graphics/applicationIcons/evernote@18.png → qml/graphics/applicationIcons/evernote@18.png graphics/applicationIcons/facebook@18.png → qml/graphics/applicationIcons/facebook@18.png graphics/applicationIcons/gallery@18.png → qml/graphics/applicationIcons/gallery@18.png graphics/applicationIcons/gmail@18.png → qml/graphics/applicationIcons/gmail@18.png graphics/applicationIcons/map@18.png → qml/graphics/applicationIcons/map@18.png graphics/applicationIcons/messages-app@18.png → qml/graphics/applicationIcons/messages-app@18.png graphics/applicationIcons/notepad@18.png → qml/graphics/applicationIcons/notepad@18.png graphics/applicationIcons/phone-app@18.png → qml/graphics/applicationIcons/phone-app@18.png graphics/applicationIcons/pinterest@18.png → qml/graphics/applicationIcons/pinterest@18.png graphics/applicationIcons/soundcloud@18.png → qml/graphics/applicationIcons/soundcloud@18.png graphics/applicationIcons/system-settings@18.png → qml/graphics/applicationIcons/system-settings@18.png graphics/applicationIcons/twitter@18.png → qml/graphics/applicationIcons/twitter@18.png graphics/applicationIcons/weather@18.png → qml/graphics/applicationIcons/weather@18.png graphics/applicationIcons/wikipedia@18.png → qml/graphics/applicationIcons/wikipedia@18.png graphics/applicationIcons/youtube@18.png → qml/graphics/applicationIcons/youtube@18.png graphics/avatars/amanda@12.png → qml/graphics/avatars/amanda@12.png graphics/avatars/anna_olsson@12.png → qml/graphics/avatars/anna_olsson@12.png graphics/avatars/funky@12.png → qml/graphics/avatars/funky@12.png graphics/clock@18.png → qml/graphics/clock@18.png graphics/phone_background.jpg → qml/graphics/phone_background.jpg graphics/tablet_background.jpg → qml/graphics/tablet_background.jpg run+1−1 runtests.sh+1−13 ApplicationArguments.h → src/ApplicationArguments.h src/CMakeLists.txt+27 MouseTouchAdaptor.cpp → src/MouseTouchAdaptor.cpp MouseTouchAdaptor.h → src/MouseTouchAdaptor.h src/Panel/Indicators/client/CMakeLists.txt−4 src/Panel/Indicators/client/indicatorsclient.cpp+3−2 main.cpp → src/main.cpp+3−3 tests/mocks/LightDM/CMakeLists.txt+1 tests/mocks/Unity/Application/ApplicationManager.cpp+4−3 tests/mocks/Unity/fake_scope.cpp+2−2 tests/mocks/libusermetrics/CMakeLists.txt+4 tests/mocks/libusermetrics/UserMetrics.cpp+1−1 tests/plugins/CMakeLists.txt+1−1 tests/plugins/ListViewWithPageHeader/CMakeLists.txt → tests/plugins/DashViews/CMakeLists.txt+16−5 tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cpp → tests/plugins/DashViews/listviewwithpageheadertest.cpp+1−1 tests/plugins/ListViewWithPageHeader/test.qml → tests/plugins/DashViews/listviewwithpageheadertest.qml+1−1 tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsection.cpp → tests/plugins/DashViews/listviewwithpageheadertestsection.cpp+1−1 tests/plugins/ListViewWithPageHeader/test_section.qml → tests/plugins/DashViews/listviewwithpageheadertestsection.qml+1−1 tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsectionexternalmodel.cpp → tests/plugins/DashViews/listviewwithpageheadertestsectionexternalmodel.cpp+1−1 tests/plugins/ListViewWithPageHeader/test_sectionexternalmodel.qml → tests/plugins/DashViews/listviewwithpageheadertestsectionexternalmodel.qml+1−1 tests/plugins/ListViewWithPageHeader/tst_listviewwithpageheaderqml.qml → tests/plugins/DashViews/tst_listviewwithpageheaderqml.qml+1−1 tests/plugins/DashViews/verticaljournaltest.cpp+438 tests/plugins/DashViews/verticaljournaltest.qml+44 tests/plugins/DashViews/verticaljournaltry.cpp+90 tests/plugins/DashViews/verticaljournaltry.qml+100 tests/plugins/Ubuntu/Gestures/CMakeLists.txt+1 tests/plugins/Unity/Indicators/indicatorsmanagertest.cpp+2−1 tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp+2−1 tests/qmltests/Components/CMakeLists.txt+1 tests/qmltests/Components/RevealingRectangle.qml+1−1 tests/qmltests/Components/tst_AnimationControllerWithSignals.qml+1−1 tests/qmltests/Components/tst_Carousel.qml+1−1 tests/qmltests/Components/tst_DragHandle.qml+1−1 tests/qmltests/Components/tst_DragHandle/HorizontalShowable.qml+1−1 tests/qmltests/Components/tst_DragHandle/VerticalShowable.qml+1−1 tests/qmltests/Components/tst_DraggingArea.qml+1−1 tests/qmltests/Components/tst_EdgeDemoOverlay.qml+1−1 tests/qmltests/Components/tst_FilterGrid.qml+1−1 tests/qmltests/Components/tst_LazyImage.qml+1−1 tests/qmltests/Components/tst_LazyImage/ImageControls.qml+1−1 tests/qmltests/Components/tst_OpenEffect.qml+1−1 tests/qmltests/Components/tst_PageHeader.qml+1−1 tests/qmltests/Components/tst_RatingStars.qml+1−1 tests/qmltests/Components/tst_ResponsiveFlowView.qml+1−1 tests/qmltests/Components/tst_ResponsiveGridView.qml+1−1 tests/qmltests/Components/tst_Showable.qml+1−1 tests/qmltests/Components/tst_Stage.qml+1−1 tests/qmltests/Components/tst_Tile.qml+1−1 tests/qmltests/Dash/Apps/tst_AppPreview.qml+1−1 tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml+1−1 tests/qmltests/Dash/Movie/tst_MoviePreview.qml+1−1 tests/qmltests/Dash/Music/tst_MusicPreview.qml+1−1 tests/qmltests/Dash/qml/FakeScopeView.qml+1−1 tests/qmltests/Dash/tst_Dash.qml+6−6 tests/qmltests/Dash/tst_DashBar.qml+1−1 tests/qmltests/Dash/tst_DashContent.qml+6−6 tests/qmltests/Dash/tst_DashPreview.qml+1−1 tests/qmltests/Dash/tst_FilterGrids.qml+3−3 tests/qmltests/Dash/tst_GenericPreview.qml+1−1 tests/qmltests/Dash/tst_GenericScopeView.qml+2−2 tests/qmltests/Greeter/tst_Clock.qml+1−1 tests/qmltests/Greeter/tst_Infographics.qml+1−1 tests/qmltests/Greeter/tst_Lockscreen.qml+1−1 tests/qmltests/Greeter/tst_Phone.qml+3−3 tests/qmltests/Greeter/tst_Tablet.qml+1−1 tests/qmltests/Hud/tst_Hud.qml+1−1 tests/qmltests/Hud/tst_Result.qml+1−1 tests/qmltests/Launcher/tst_Launcher.qml+1−1 tests/qmltests/Notifications/tst_Notifications.qml+1−1 tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml+1−1 tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml+1−1 tests/qmltests/Panel/tst_IndicatorItem.qml+1−1 tests/qmltests/Panel/tst_IndicatorRow.qml+1−1 tests/qmltests/Panel/tst_Indicators.qml+2−2 tests/qmltests/Panel/tst_MenuContent.qml+1−1 tests/qmltests/Panel/tst_Panel.qml+1−1 tests/qmltests/Panel/tst_SearchIndicator.qml+1−1 tests/qmltests/SideStage/tst_SideStage.qml+1−1 tests/qmltests/tst_Shell.qml+3−3 tests/uqmlscene/CMakeLists.txt+6−1 tests/uqmlscene/main.cpp+1−1 tests/utils/modules/Unity/Test/CMakeLists.txt+4
CMakeLists.txt+11−64
@@ -69,17 +69,6 @@ if(SHELL_PLUGINDIR STREQUAL "")
6969 message(FATAL_ERROR "Could not determine plugin import dir.")
7070endif()
7171
72−configure_file(paths.h.in ${CMAKE_CURRENT_BINARY_DIR}/paths.h @ONLY)
73−
74−pkg_check_modules(UNITY-MIR REQUIRED unity-mir)
75−
76−include_directories(
77− ${CMAKE_CURRENT_BINARY_DIR}
78− ${CMAKE_CURRENT_SOURCE_DIR}
79− ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
80− ${UNITY-MIR_INCLUDE_DIRS}
81− )
82−
8372set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
8473
8574set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra")
@@ -108,64 +97,22 @@ declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)
10897
10998set(SHELL_APP unity8)
11099
111−add_executable(${SHELL_APP}
112− ApplicationArguments.h
113− main.cpp
114− MouseTouchAdaptor.cpp
115− )
116−
117−qt5_use_modules(${SHELL_APP} Qml Quick Test)
118−pkg_check_modules(XCB REQUIRED xcb)
119−
120−if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
121− set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
122−
123− target_link_libraries(${SHELL_APP} ${XCB_LDFLAGS})
124−endif()
125−
126−
127−# install binaries
128−install(TARGETS ${SHELL_APP}
129− RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
130− )
131−
132−# install top level qml and js files
133−file(GLOB QML_JS_FILES *.qml *.js)
134−
135−install(FILES ${QML_JS_FILES}
136− DESTINATION ${SHELL_APP_DIR}
137− )
100+include_directories(
101+ ${CMAKE_SOURCE_DIR}/include
102+ ${CMAKE_BINARY_DIR}/include
103+)
138104
139105# add subdirectories to build
106+add_subdirectory(include)
107+add_subdirectory(src)
108+add_subdirectory(qml)
140109add_subdirectory(tests)
141110add_subdirectory(plugins)
142−add_subdirectory(src)
143111
144−# install subdirectories
145−set(QML_DIRS
146− Bottombar
147− Components
148− Dash
149− graphics
150− Greeter
151− Hud
152− Panel
153− Launcher
154− SideStage
155− Notifications
156− )
157−
158−install(DIRECTORY ${QML_DIRS}
159− DESTINATION ${SHELL_APP_DIR}
160− )
161−
162−# generate desktop file
163−configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)
164−
165−# install desktop file
166−install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
167− DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
168− )
112+#
113+# Data files
114+#
115+add_subdirectory(data)
169116
170117#
171118# Translation
CODING+39
@@ -127,3 +127,42 @@ Unity 8.
127127If using VIM, make sure you install some syntax highlighting for QML, like
128128https://github.com/peterhoeg/vim-qml
129129
130+Running tests
131+=============
132+
133+Tests are run from the build directory (which will be ./builddir if you used
134+the ./build script).
135+
136+To run the tests that do not require any graphical capability and therefore
137+are pretty fast run:
138+
139+$ make test
140+
141+or, alternatively:
142+
143+$ ctest
144+
145+To run all graphical tests, which can take a couple of minutes:
146+
147+$ make qmluitests
148+
149+To run the tests for a single component/class:
150+
151+$ make testComponentName
152+
153+So, for the DragHandle component that would be:
154+
155+$ make testDragHandle
156+
157+To run a test application that allow you to manually test or to simply try out
158+a given component:
159+
160+$ make tryComponentName
161+
162+So to try out, for instance, the DragHandle component, you would do:
163+
164+$ make tryDragHandle
165+
166+NB: Manual test or interation doesn't make sense for all components or classes,
167+particularly the non-graphical ones. In such cases no "tryFoo" make target is
168+provided.
data/CMakeLists.txtnew file+7
@@ -0,0 +1,7 @@
1+# generate desktop file
2+configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)
3+
4+# install desktop file
5+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
6+ DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
7+ )
unity8.desktop.in → data/unity8.desktop.inrenamed

The content is the same.

debian/unity8-private.install+1−1
@@ -1,7 +1,7 @@
11usr/lib/*/unity8/qml/AccountsService
22usr/lib/*/unity8/qml/HudClient
33usr/lib/*/unity8/qml/LightDM
4−usr/lib/*/unity8/qml/ListViewWithPageHeader
4+usr/lib/*/unity8/qml/DashViews
55usr/lib/*/unity8/qml/Powerd
66usr/lib/*/unity8/qml/SessionBroadcast
77usr/lib/*/unity8/qml/Ubuntu
include/CMakeLists.txtnew file+1
@@ -0,0 +1 @@
1+configure_file(paths.h.in ${CMAKE_CURRENT_BINARY_DIR}/paths.h @ONLY)
paths.h.in → include/paths.h.inrenamed+3−3
@@ -41,11 +41,11 @@ inline QString translationDirectory() {
4141 }
4242}
4343
44−inline QString shellAppDirectory() {
44+inline QString qmlDirectory() {
4545 if (isRunningInstalled()) {
4646 return QString("@CMAKE_INSTALL_PREFIX@/@SHELL_APP_DIR@/");
4747 } else {
48− return QString("@CMAKE_SOURCE_DIR@/");
48+ return QString("@CMAKE_SOURCE_DIR@/qml/");
4949 }
5050}
5151
@@ -79,7 +79,7 @@ inline QStringList shellDataDirs() {
7979 }
8080 else {
8181 // append so by default we use xdg files.
82− dirs.append(shellAppDirectory());
82+ dirs.append(qmlDirectory());
8383 }
8484 return dirs;
8585}
plugins/CMakeLists.txt+1−1
@@ -1,7 +1,7 @@
11add_subdirectory(AccountsService)
22add_subdirectory(HudClient)
33add_subdirectory(LightDM)
4−add_subdirectory(ListViewWithPageHeader)
4+add_subdirectory(DashViews)
55add_subdirectory(Powerd)
66add_subdirectory(SessionBroadcast)
77add_subdirectory(Ubuntu)
plugins/ListViewWithPageHeader/CMakeLists.txt → plugins/DashViews/CMakeLists.txtrenamed+6−5
@@ -24,19 +24,20 @@ remove_definitions(-DQT_NO_KEYWORDS)
2424set(QMLPLUGIN_SRC
2525 plugin.cpp
2626 listviewwithpageheader.cpp
27+ verticaljournal.cpp
2728 )
2829
29−add_library(ListViewWithPageHeader-qml MODULE
30+add_library(DashViews-qml MODULE
3031 ${QMLPLUGIN_SRC}
3132 )
3233
33−target_link_libraries(ListViewWithPageHeader-qml
34+target_link_libraries(DashViews-qml
3435 ${Qt5Gui_LIBRARIES}
3536 ${Qt5Quick_LIBRARIES}
3637 )
3738
38−qt5_use_modules(ListViewWithPageHeader-qml Qml Quick)
39+qt5_use_modules(DashViews-qml Qml Quick)
3940
4041# export the qmldir qmltypes and plugin files
41−export_qmlfiles(ListViewWithPageHeader ListViewWithPageHeader)
42−export_qmlplugin(ListViewWithPageHeader 0.1 ListViewWithPageHeader TARGETS ListViewWithPageHeader-qml)
42+export_qmlfiles(DashViews DashViews)
43+export_qmlplugin(DashViews 0.1 DashViews TARGETS DashViews-qml)
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp → plugins/DashViews/listviewwithpageheader.cpprenamed

The content is the same.

plugins/ListViewWithPageHeader/listviewwithpageheader.h → plugins/DashViews/listviewwithpageheader.hrenamed

The content is the same.

plugins/ListViewWithPageHeader/plugin.cpp → plugins/DashViews/plugin.cpprenamed+4−2
@@ -18,12 +18,14 @@
1818#include "plugin.h"
1919
2020#include "listviewwithpageheader.h"
21+#include "verticaljournal.h"
2122
2223#include <QAbstractItemModel>
2324
24−void ListViewWithPageHeaderPlugin::registerTypes(const char *uri)
25+void DashViewsPlugin::registerTypes(const char *uri)
2526{
26− Q_ASSERT(uri == QLatin1String("ListViewWithPageHeader"));
27+ Q_ASSERT(uri == QLatin1String("DashViews"));
2728 qmlRegisterType<QAbstractItemModel>();
2829 qmlRegisterType<ListViewWithPageHeader>(uri, 0, 1, "ListViewWithPageHeader");
30+ qmlRegisterType<VerticalJournal>(uri, 0, 1, "VerticalJournal");
2931}
plugins/ListViewWithPageHeader/plugin.h → plugins/DashViews/plugin.hrenamed+3−3
@@ -15,13 +15,13 @@
1515 *
1616 */
1717
18−#ifndef LISTVIEWWITHPAGEHEADER_PLUGIN_H
19−#define LISTVIEWWITHPAGEHEADER_PLUGIN_H
18+#ifndef DASHVIEWS_PLUGIN_H
19+#define DASHVIEWS_PLUGIN_H
2020
2121#include <QtQml/QQmlEngine>
2222#include <QtQml/QQmlExtensionPlugin>
2323
24−class ListViewWithPageHeaderPlugin : public QQmlExtensionPlugin
24+class DashViewsPlugin : public QQmlExtensionPlugin
2525{
2626 Q_OBJECT
2727 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
plugins/DashViews/qmldirnew file+3
@@ -0,0 +1,3 @@
1+module DashViews
2+plugin DashViews-qml
3+typeinfo plugin.qmltypes
plugins/DashViews/verticaljournal.cppnew file+609
@@ -0,0 +1,609 @@
1+/*
2+ * Copyright (C) 2013 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+ * The implementation is centered around m_columnVisibleItems
19+ * that holds a vector of lists. There's a list for each of the
20+ * columns the view has. In the list the items of the column are
21+ * ordered as they appear topdown in the view. m_indexColumnMap is
22+ * used when re-building the list up since given a position
23+ * in the middle of the list and the need to create the previous does
24+ * not give us enough information to know in which column we have
25+ * to position the item so that when we reach the item the view is
26+ * correctly layouted at 0 for all the columns
27+ */
28+#include "verticaljournal.h"
29+
30+#include <qqmlengine.h>
31+#pragma GCC diagnostic push
32+#pragma GCC diagnostic ignored "-pedantic"
33+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
34+#include <private/qquickvisualdatamodel_p.h>
35+#else
36+#include <private/qqmldelegatemodel_p.h>
37+#include <qqmlinfo.h>
38+#endif
39+#include <private/qquickitem_p.h>
40+#pragma GCC diagnostic pop
41+
42+static const qreal bufferRatio = 0.5;
43+
44+VerticalJournal::VerticalJournal()
45+ : m_delegateModel(nullptr)
46+ , m_asyncRequestedIndex(-1)
47+ , m_columnWidth(0)
48+ , m_columnSpacing(0)
49+ , m_rowSpacing(0)
50+ , m_delegateCreationBegin(0)
51+ , m_delegateCreationEnd(0)
52+ , m_delegateCreationBeginValid(false)
53+ , m_delegateCreationEndValid(false)
54+ , m_needsRelayout(false)
55+ , m_delegateValidated(false)
56+ , m_implicitHeightDirty(false)
57+{
58+ connect(this, SIGNAL(widthChanged()), this, SLOT(relayout()));
59+ connect(this, SIGNAL(heightChanged()), this, SLOT(onHeightChanged()));
60+}
61+
62+QAbstractItemModel *VerticalJournal::model() const
63+{
64+ return m_delegateModel ? m_delegateModel->model().value<QAbstractItemModel *>() : nullptr;
65+}
66+
67+void VerticalJournal::setModel(QAbstractItemModel *model)
68+{
69+ if (model != this->model()) {
70+ if (!m_delegateModel) {
71+ createDelegateModel();
72+ } else {
73+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
74+ disconnect(m_delegateModel, SIGNAL(modelUpdated(QQuickChangeSet,bool)), this, SLOT(onModelUpdated(QQuickChangeSet,bool)));
75+ }
76+ m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
77+ connect(m_delegateModel, SIGNAL(modelUpdated(QQuickChangeSet,bool)), this, SLOT(onModelUpdated(QQuickChangeSet,bool)));
78+#else
79+ disconnect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
80+ }
81+ m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
82+ connect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
83+#endif
84+
85+ cleanupExistingItems();
86+
87+ Q_EMIT modelChanged();
88+ polish();
89+ }
90+}
91+
92+QQmlComponent *VerticalJournal::delegate() const
93+{
94+ return m_delegateModel ? m_delegateModel->delegate() : nullptr;
95+}
96+
97+void VerticalJournal::setDelegate(QQmlComponent *delegate)
98+{
99+ if (delegate != this->delegate()) {
100+ if (!m_delegateModel) {
101+ createDelegateModel();
102+ }
103+
104+ cleanupExistingItems();
105+
106+ m_delegateModel->setDelegate(delegate);
107+
108+ Q_EMIT delegateChanged();
109+ m_delegateValidated = false;
110+ polish();
111+ }
112+}
113+
114+qreal VerticalJournal::columnWidth() const
115+{
116+ return m_columnWidth;
117+}
118+
119+void VerticalJournal::setColumnWidth(qreal columnWidth)
120+{
121+ if (columnWidth != m_columnWidth) {
122+ m_columnWidth = columnWidth;
123+ Q_EMIT columnWidthChanged();
124+
125+ if (isComponentComplete()) {
126+ Q_FOREACH(const auto &column, m_columnVisibleItems) {
127+ Q_FOREACH(const ViewItem &item, column) {
128+ item.m_item->setWidth(columnWidth);
129+ }
130+ }
131+ relayout();
132+ }
133+ }
134+}
135+
136+qreal VerticalJournal::columnSpacing() const
137+{
138+ return m_columnSpacing;
139+}
140+
141+void VerticalJournal::setColumnSpacing(qreal columnSpacing)
142+{
143+ if (columnSpacing != m_columnSpacing) {
144+ m_columnSpacing = columnSpacing;
145+ Q_EMIT columnSpacingChanged();
146+
147+ if (isComponentComplete()) {
148+ relayout();
149+ }
150+ }
151+}
152+
153+qreal VerticalJournal::rowSpacing() const
154+{
155+ return m_rowSpacing;
156+}
157+
158+void VerticalJournal::setRowSpacing(qreal rowSpacing)
159+{
160+ if (rowSpacing != m_rowSpacing) {
161+ m_rowSpacing = rowSpacing;
162+ Q_EMIT rowSpacingChanged();
163+
164+ if (isComponentComplete()) {
165+ relayout();
166+ }
167+ }
168+}
169+
170+qreal VerticalJournal::delegateCreationBegin() const
171+{
172+ return m_delegateCreationBegin;
173+}
174+
175+void VerticalJournal::setDelegateCreationBegin(qreal begin)
176+{
177+ m_delegateCreationBeginValid = true;
178+ if (m_delegateCreationBegin == begin)
179+ return;
180+ m_delegateCreationBegin = begin;
181+ if (isComponentComplete()) {
182+ polish();
183+ }
184+ emit delegateCreationBeginChanged();
185+}
186+
187+void VerticalJournal::resetDelegateCreationBegin()
188+{
189+ m_delegateCreationBeginValid = false;
190+ if (m_delegateCreationBegin == 0)
191+ return;
192+ m_delegateCreationBegin = 0;
193+ if (isComponentComplete()) {
194+ polish();
195+ }
196+ emit delegateCreationBeginChanged();
197+}
198+
199+qreal VerticalJournal::delegateCreationEnd() const
200+{
201+ return m_delegateCreationEnd;
202+}
203+
204+void VerticalJournal::setDelegateCreationEnd(qreal end)
205+{
206+ m_delegateCreationEndValid = true;
207+ if (m_delegateCreationEnd == end)
208+ return;
209+ m_delegateCreationEnd = end;
210+ if (isComponentComplete()) {
211+ polish();
212+ }
213+ emit delegateCreationEndChanged();
214+}
215+
216+void VerticalJournal::resetDelegateCreationEnd()
217+{
218+ m_delegateCreationEndValid = false;
219+ if (m_delegateCreationEnd == 0)
220+ return;
221+ m_delegateCreationEnd = 0;
222+ if (isComponentComplete()) {
223+ polish();
224+ }
225+ emit delegateCreationEndChanged();
226+}
227+
228+void VerticalJournal::createDelegateModel()
229+{
230+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
231+ m_delegateModel = new QQuickVisualDataModel(qmlContext(this), this);
232+ connect(m_delegateModel, SIGNAL(createdItem(int,QQuickItem*)), this, SLOT(itemCreated(int,QQuickItem*)));
233+#else
234+ m_delegateModel = new QQmlDelegateModel(qmlContext(this), this);
235+ connect(m_delegateModel, SIGNAL(createdItem(int,QObject*)), this, SLOT(itemCreated(int,QObject*)));
236+#endif
237+ if (isComponentComplete())
238+ m_delegateModel->componentComplete();
239+}
240+
241+void VerticalJournal::refill()
242+{
243+ if (!isComponentComplete()) {
244+ return;
245+ }
246+
247+ const bool delegateRangesValid = m_delegateCreationBeginValid && m_delegateCreationEndValid;
248+ const qreal from = delegateRangesValid ? m_delegateCreationBegin : 0;
249+ const qreal to = delegateRangesValid ? m_delegateCreationEnd : from + height();
250+ const qreal buffer = (to - from) * bufferRatio;
251+ const qreal bufferFrom = from - buffer;
252+ const qreal bufferTo = to + buffer;
253+
254+ bool added = addVisibleItems(from, to, false);
255+ bool removed = removeNonVisibleItems(bufferFrom, bufferTo);
256+ added |= addVisibleItems(bufferFrom, bufferTo, true);
257+
258+ if (added || removed) {
259+ m_implicitHeightDirty = true;
260+ }
261+}
262+
263+void VerticalJournal::findBottomModelIndexToAdd(int *modelIndex, qreal *yPos)
264+{
265+ *modelIndex = 0;
266+ *yPos = std::numeric_limits<qreal>::max();
267+
268+ Q_FOREACH(const auto &column, m_columnVisibleItems) {
269+ if (!column.isEmpty()) {
270+ const ViewItem &item = column.last();
271+ *yPos = qMin(*yPos, item.y() + item.height() + m_rowSpacing);
272+ *modelIndex = qMax(*modelIndex, item.m_modelIndex + 1);
273+ } else {
274+ *yPos = 0;
275+ }
276+ }
277+}
278+
279+void VerticalJournal::findTopModelIndexToAdd(int *modelIndex, qreal *yPos)
280+{
281+ *modelIndex = INT_MAX;
282+ *yPos = std::numeric_limits<qreal>::lowest();
283+ int columnToAddTo = -1;
284+
285+ // Find the topmost free column
286+ for (int i = 0; i < m_columnVisibleItems.count(); ++i) {
287+ const auto &column = m_columnVisibleItems[i];
288+ if (!column.isEmpty()) {
289+ const ViewItem &item = column.first();
290+ const auto itemTopPos = item.y() - m_rowSpacing;
291+ if (itemTopPos > *yPos) {
292+ *yPos = itemTopPos;
293+ *modelIndex = item.m_modelIndex - 1;
294+ columnToAddTo = i;
295+ }
296+ }
297+ }
298+
299+ if (*modelIndex > 0) {
300+ Q_ASSERT(m_indexColumnMap.contains(*modelIndex));
301+ while (m_indexColumnMap[*modelIndex] != columnToAddTo) {
302+ // We found out that we have to add to columnToAddTo
303+ // and thought that we had to add *modelIndex, but history tells
304+ // it is not correct, so find up from *modelIndex until we found the index
305+ // that has to end up in columnToAddTo
306+ *modelIndex = *modelIndex - 1;
307+ Q_ASSERT(m_indexColumnMap.contains(*modelIndex));
308+ }
309+ }
310+}
311+
312+bool VerticalJournal::addVisibleItems(qreal fillFrom, qreal fillTo, bool asynchronous)
313+{
314+ if (!delegate())
315+ return false;
316+
317+ if (m_delegateModel->count() == 0)
318+ return false;
319+
320+ int modelIndex;
321+ qreal yPos;
322+ findBottomModelIndexToAdd(&modelIndex, &yPos);
323+ bool changed = false;
324+ while (modelIndex < m_delegateModel->count() && yPos <= fillTo) {
325+ if (!createItem(modelIndex, asynchronous))
326+ break;
327+
328+ changed = true;
329+ findBottomModelIndexToAdd(&modelIndex, &yPos);
330+ }
331+
332+ findTopModelIndexToAdd(&modelIndex, &yPos);
333+ while (modelIndex >= 0 && yPos > fillFrom) {
334+ if (!createItem(modelIndex, asynchronous))
335+ break;
336+
337+ changed = true;
338+ findTopModelIndexToAdd(&modelIndex, &yPos);
339+ }
340+
341+ return changed;
342+}
343+
344+bool VerticalJournal::removeNonVisibleItems(qreal bufferFrom, qreal bufferTo)
345+{
346+ bool changed = false;
347+
348+ for (int i = 0; i < m_columnVisibleItems.count(); ++i) {
349+ QList<ViewItem> &column = m_columnVisibleItems[i];
350+ while (!column.isEmpty() && column.first().y() + column.first().height() < bufferFrom) {
351+ releaseItem(column.takeFirst());
352+ changed = true;
353+ }
354+
355+ while (!column.isEmpty() && column.last().y() > bufferTo) {
356+ releaseItem(column.takeLast());
357+ changed = true;
358+ }
359+ }
360+
361+ return changed;
362+}
363+
364+QQuickItem *VerticalJournal::createItem(int modelIndex, bool asynchronous)
365+{
366+ if (asynchronous && m_asyncRequestedIndex != -1)
367+ return nullptr;
368+
369+ m_asyncRequestedIndex = -1;
370+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
371+ QQuickItem *item = m_delegateModel->item(modelIndex, asynchronous);
372+#else
373+ QObject* object = m_delegateModel->object(modelIndex, asynchronous);
374+ QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
375+#endif
376+ if (!item) {
377+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
378+ m_asyncRequestedIndex = modelIndex;
379+#else
380+ if (object) {
381+ m_delegateModel->release(object);
382+ if (!m_delegateValidated) {
383+ m_delegateValidated = true;
384+ QObject* delegateObj = delegate();
385+ qmlInfo(delegateObj ? delegateObj : this) << "Delegate must be of Item type";
386+ }
387+ } else {
388+ m_asyncRequestedIndex = modelIndex;
389+ }
390+#endif
391+ return nullptr;
392+ } else {
393+ if (item->width() != m_columnWidth) {
394+ qWarning() << "Item" << modelIndex << "width is not the one that the columnWidth mandates, resetting it";
395+ item->setWidth(m_columnWidth);
396+ }
397+ positionItem(modelIndex, item);
398+ return item;
399+ }
400+}
401+
402+void VerticalJournal::positionItem(int modelIndex, QQuickItem *item)
403+{
404+ // Check if we add it to the bottom of existing column items
405+ const QList<ViewItem> &firstColumn = m_columnVisibleItems[0];
406+ qreal columnToAddY = !firstColumn.isEmpty() ? firstColumn.last().y() + firstColumn.last().height() : -m_rowSpacing;
407+ int columnToAddTo = 0;
408+ for (int i = 1; i < m_columnVisibleItems.count(); ++i) {
409+ const QList<ViewItem> &column = m_columnVisibleItems[i];
410+ const qreal iY = !column.isEmpty() ? column.last().y() + column.last().height() : -m_rowSpacing;
411+ if (iY < columnToAddY) {
412+ columnToAddTo = i;
413+ columnToAddY = iY;
414+ }
415+ }
416+
417+ const QList<ViewItem> &columnToAdd = m_columnVisibleItems[columnToAddTo];
418+ if (columnToAdd.isEmpty() || columnToAdd.last().m_modelIndex < modelIndex) {
419+ item->setX(columnToAddTo * (m_columnWidth + m_columnSpacing));
420+ item->setY(columnToAddY + m_rowSpacing);
421+
422+ m_columnVisibleItems[columnToAddTo] << ViewItem(item, modelIndex);
423+ m_indexColumnMap[modelIndex] = columnToAddTo;
424+ } else {
425+ Q_ASSERT(m_indexColumnMap.contains(modelIndex));
426+ columnToAddTo = m_indexColumnMap[modelIndex];
427+ columnToAddY = m_columnVisibleItems[columnToAddTo].first().y();
428+
429+ item->setX(columnToAddTo * (m_columnWidth + m_columnSpacing));
430+ item->setY(columnToAddY - m_rowSpacing - item->height());
431+
432+ m_columnVisibleItems[columnToAddTo].prepend(ViewItem(item, modelIndex));
433+ }
434+}
435+
436+void VerticalJournal::cleanupExistingItems()
437+{
438+ // Cleanup the existing items
439+ for (int i = 0; i < m_columnVisibleItems.count(); ++i) {
440+ QList<ViewItem> &column = m_columnVisibleItems[i];
441+ Q_FOREACH(const ViewItem &item, column)
442+ releaseItem(item);
443+ column.clear();
444+ }
445+ m_indexColumnMap.clear();
446+}
447+
448+void VerticalJournal::releaseItem(const ViewItem &item)
449+{
450+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
451+ QQuickVisualModel::ReleaseFlags flags = m_delegateModel->release(item.m_item);
452+ if (flags & QQuickVisualModel::Destroyed) {
453+#else
454+ QQmlDelegateModel::ReleaseFlags flags = m_delegateModel->release(item.m_item);
455+ if (flags & QQmlDelegateModel::Destroyed) {
456+#endif
457+ item.m_item->setParentItem(nullptr);
458+ }
459+}
460+
461+void VerticalJournal::calculateImplicitHeight()
462+{
463+ m_implicitHeightDirty = false;
464+
465+ int lastModelIndex = -1;
466+ qreal bottomMostY = 0;
467+ Q_FOREACH(const auto &column, m_columnVisibleItems) {
468+ if (!column.isEmpty()) {
469+ const ViewItem &item = column.last();
470+ lastModelIndex = qMax(lastModelIndex, item.m_modelIndex);
471+ bottomMostY = qMax(bottomMostY, item.y() + item.height());
472+ }
473+ }
474+ if (lastModelIndex >= 0) {
475+ const double averageHeight = bottomMostY / (lastModelIndex + 1);
476+ setImplicitHeight(bottomMostY + averageHeight * (model()->rowCount() - lastModelIndex - 1));
477+ } else {
478+ setImplicitHeight(0);
479+ }
480+}
481+
482+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
483+void VerticalJournal::itemCreated(int modelIndex, QQuickItem *item)
484+{
485+#else
486+void VerticalJournal::itemCreated(int modelIndex, QObject *object)
487+{
488+ QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
489+ if (!item) {
490+ qWarning() << "VerticalJournal::itemCreated got a non item for index" << modelIndex;
491+ return;
492+ }
493+#endif
494+ item->setParentItem(this);
495+ if (modelIndex == m_asyncRequestedIndex) {
496+ createItem(modelIndex, false);
497+ m_implicitHeightDirty = true;
498+ polish();
499+ }
500+}
501+
502+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
503+void VerticalJournal::onModelUpdated(const QQuickChangeSet &changeSet, bool reset)
504+#else
505+void VerticalJournal::onModelUpdated(const QQmlChangeSet &changeSet, bool reset)
506+#endif
507+{
508+ if (reset) {
509+ cleanupExistingItems();
510+ } else {
511+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
512+ Q_FOREACH(const QQuickChangeSet::Remove &remove, changeSet.removes()) {
513+#else
514+ Q_FOREACH(const QQmlChangeSet::Remove &remove, changeSet.removes()) {
515+#endif
516+ for (int i = remove.count - 1; i >= 0; --i) {
517+ const int indexToRemove = remove.index + i;
518+ // Since we only support removing from the end, indexToRemove
519+ // must refer to the last item of one of the columns.
520+ bool found = false;
521+ for (int i = 0; !found && i < m_columnVisibleItems.count(); ++i) {
522+ QList<ViewItem> &column = m_columnVisibleItems[i];
523+ if (!column.isEmpty() && column.last().m_modelIndex == indexToRemove) {
524+ releaseItem(column.takeLast());
525+ found = true;
526+ }
527+ }
528+ Q_ASSERT(found);
529+ }
530+ }
531+ }
532+ polish();
533+}
534+
535+
536+void VerticalJournal::relayout()
537+{
538+ m_needsRelayout = true;
539+ polish();
540+}
541+
542+void VerticalJournal::onHeightChanged()
543+{
544+ polish();
545+}
546+
547+void VerticalJournal::updatePolish()
548+{
549+ if (!model())
550+ return;
551+
552+ if (m_needsRelayout) {
553+ m_implicitHeightDirty = true;
554+
555+ QList<ViewItem> allItems;
556+ Q_FOREACH(const auto &column, m_columnVisibleItems)
557+ allItems << column;
558+
559+ qSort(allItems);
560+
561+ const int nColumns = qMax(1., floor((double)(width() + m_columnSpacing) / (m_columnWidth + m_columnSpacing)));
562+ m_columnVisibleItems.resize(nColumns);
563+ m_indexColumnMap.clear();
564+ for (int i = 0; i < nColumns; ++i)
565+ m_columnVisibleItems[i].clear();
566+
567+ // If the first of allItems doesn't contain index 0 we need to drop them
568+ // all since we can't consistently relayout without the first item being there
569+
570+ if (!allItems.isEmpty()) {
571+ if (allItems.first().m_modelIndex == 0) {
572+ Q_FOREACH(const ViewItem &item, allItems)
573+ positionItem(item.m_modelIndex, item.m_item);
574+ } else {
575+ Q_FOREACH(const ViewItem &item, allItems)
576+ releaseItem(item);
577+ }
578+ }
579+
580+ m_needsRelayout = false;
581+ }
582+
583+ refill();
584+
585+ const bool delegateRangesValid = m_delegateCreationBeginValid && m_delegateCreationEndValid;
586+ const qreal from = delegateRangesValid ? m_delegateCreationBegin : 0;
587+ const qreal to = delegateRangesValid ? m_delegateCreationEnd : from + height();
588+ Q_FOREACH(const auto &column, m_columnVisibleItems) {
589+ Q_FOREACH(const ViewItem &item, column) {
590+ QQuickItemPrivate::get(item.m_item)->setCulled(item.y() + item.height() <= from || item.y() >= to);
591+ }
592+ }
593+
594+ if (m_implicitHeightDirty) {
595+ calculateImplicitHeight();
596+ }
597+}
598+
599+void VerticalJournal::componentComplete()
600+{
601+ if (m_delegateModel)
602+ m_delegateModel->componentComplete();
603+
604+ QQuickItem::componentComplete();
605+
606+ m_needsRelayout = true;
607+
608+ polish();
609+}
plugins/DashViews/verticaljournal.hnew file+182
@@ -0,0 +1,182 @@
1+/*
2+ * Copyright (C) 2013 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+#ifndef VERTICALJOURNAL_H
18+#define VERTICALJOURNAL_H
19+
20+#include <QQuickItem>
21+
22+class QAbstractItemModel;
23+class QQmlComponent;
24+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
25+class QQuickChangeSet;
26+class QQuickVisualDataModel;
27+#else
28+class QQmlChangeSet;
29+class QQmlDelegateModel;
30+#endif
31+
32+ /** A vertical journal is a view that creates delegates
33+ * based on a model and layouts them in columns following
34+ * a top-left most position rule.
35+ *
36+ * The number of columns is calculated using the width of
37+ * the view itself, the columnWidth (i.e. the width of each individual delegate)
38+ * and the columnSpacing between columns.
39+ *
40+ * All delegates are forced to columnWidth if they don't have it.
41+ *
42+ * The first nColumns items are layouted at row 0 from column 0
43+ * to column nColumns-1 in order. After that every new item
44+ * is positioned in the column which provides the free topmost
45+ * position as possible. If more than one column tie in providing
46+ * the topmost free position the leftmost column will be used.
47+ *
48+ * Example:
49+ *
50+ * +-----+ +-----+ +-----+
51+ * | | | 2 | | |
52+ * | | | | | |
53+ * | 1 | +-----+ | 3 |
54+ * | | +-----+ | |
55+ * | | | | +-----+
56+ * +-----+ | 4 | +-----+
57+ * +-----+ | | | 5 |
58+ * | 6 | +-----+ | |
59+ * | | +-----+
60+ * +-----+
61+ *
62+ */
63+ class VerticalJournal : public QQuickItem
64+{
65+ Q_OBJECT
66+
67+ Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelChanged)
68+ Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
69+ Q_PROPERTY(qreal columnWidth READ columnWidth WRITE setColumnWidth NOTIFY columnWidthChanged)
70+ Q_PROPERTY(qreal columnSpacing READ columnSpacing WRITE setColumnSpacing NOTIFY columnSpacingChanged)
71+ Q_PROPERTY(qreal rowSpacing READ rowSpacing WRITE setRowSpacing NOTIFY rowSpacingChanged)
72+ Q_PROPERTY(qreal delegateCreationBegin READ delegateCreationBegin
73+ WRITE setDelegateCreationBegin
74+ NOTIFY delegateCreationBeginChanged
75+ RESET resetDelegateCreationBegin)
76+ Q_PROPERTY(qreal delegateCreationEnd READ delegateCreationEnd
77+ WRITE setDelegateCreationEnd
78+ NOTIFY delegateCreationEndChanged
79+ RESET resetDelegateCreationEnd)
80+
81+friend class VerticalJournalTest;
82+
83+public:
84+ VerticalJournal();
85+
86+ QAbstractItemModel *model() const;
87+ void setModel(QAbstractItemModel *model);
88+
89+ QQmlComponent *delegate() const;
90+ void setDelegate(QQmlComponent *delegate);
91+
92+ qreal columnWidth() const;
93+ void setColumnWidth(qreal columnWidth);
94+
95+ qreal columnSpacing() const;
96+ void setColumnSpacing(qreal columnSpacing);
97+
98+ qreal rowSpacing() const;
99+ void setRowSpacing(qreal rowSpacing);
100+
101+ qreal delegateCreationBegin() const;
102+ void setDelegateCreationBegin(qreal);
103+ void resetDelegateCreationBegin();
104+
105+ qreal delegateCreationEnd() const;
106+ void setDelegateCreationEnd(qreal);
107+ void resetDelegateCreationEnd();
108+
109+Q_SIGNALS:
110+ void modelChanged();
111+ void delegateChanged();
112+ void columnWidthChanged();
113+ void columnSpacingChanged();
114+ void rowSpacingChanged();
115+ void delegateCreationBeginChanged();
116+ void delegateCreationEndChanged();
117+
118+protected:
119+ void updatePolish();
120+ void componentComplete();
121+
122+private Q_SLOTS:
123+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
124+ void itemCreated(int modelIndex, QQuickItem *item);
125+ void onModelUpdated(const QQuickChangeSet &changeSet, bool reset);
126+#else
127+ void itemCreated(int modelIndex, QObject *object);
128+ void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
129+#endif
130+ void relayout();
131+ void onHeightChanged();
132+
133+private:
134+ class ViewItem
135+ {
136+ public:
137+ ViewItem(QQuickItem *item, int modelIndex) : m_item(item), m_modelIndex(modelIndex) {}
138+ qreal x() const { return m_item->x(); }
139+ qreal y() const { return m_item->y(); }
140+ qreal height() const { return m_item->height(); }
141+ bool operator<(const ViewItem &v) const { return m_modelIndex < v.m_modelIndex; }
142+
143+ QQuickItem *m_item;
144+ int m_modelIndex;
145+ };
146+
147+ void createDelegateModel();
148+ void refill();
149+ void findBottomModelIndexToAdd(int *modelIndex, qreal *yPos);
150+ void findTopModelIndexToAdd(int *modelIndex, qreal *yPos);
151+ bool addVisibleItems(qreal fillFrom, qreal fillTo, bool asynchronous);
152+ bool removeNonVisibleItems(qreal bufferFrom, qreal bufferTo);
153+ QQuickItem *createItem(int modelIndex, bool asynchronous);
154+ void positionItem(int modelIndex, QQuickItem *item);
155+ void cleanupExistingItems();
156+ void releaseItem(const ViewItem &item);
157+ void calculateImplicitHeight();
158+
159+#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
160+ QQuickVisualDataModel *m_delegateModel;
161+#else
162+ QQmlDelegateModel *m_delegateModel;
163+#endif
164+
165+ // Index we are waiting because we requested it asynchronously
166+ int m_asyncRequestedIndex;
167+
168+ QVector<QList<ViewItem>> m_columnVisibleItems;
169+ QHash<int, int> m_indexColumnMap;
170+ int m_columnWidth;
171+ int m_columnSpacing;
172+ int m_rowSpacing;
173+ qreal m_delegateCreationBegin;
174+ qreal m_delegateCreationEnd;
175+ bool m_delegateCreationBeginValid;
176+ bool m_delegateCreationEndValid;
177+ bool m_needsRelayout;
178+ bool m_delegateValidated;
179+ bool m_implicitHeightDirty;
180+};
181+
182+#endif
plugins/LightDM/CMakeLists.txt+1
@@ -10,6 +10,7 @@ pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)
1010include_directories(
1111 ${CMAKE_CURRENT_SOURCE_DIR}
1212 ${CMAKE_CURRENT_BINARY_DIR}
13+ ${CMAKE_SOURCE_DIR}/plugins/Utils
1314 ${CMAKE_SOURCE_DIR}/tests/mocks/LightDM
1415 #${LIBLIGHTDM_INCLUDE_DIRS}
1516 ${LIBUSERMETRICSOUTPUT_INCLUDE_DIRS}
plugins/LightDM/UsersModel.h+1−1
@@ -23,7 +23,7 @@
2323#ifndef UNITY_USERSMODEL_H
2424#define UNITY_USERSMODEL_H
2525
26−#include "plugins/Utils/qsortfilterproxymodelqml.h"
26+#include <qsortfilterproxymodelqml.h>
2727#include <QtCore/QObject>
2828
2929class UsersModel : public QSortFilterProxyModelQML
plugins/ListViewWithPageHeader/qmldirdeleted−3
@@ -1,3 +0,0 @@
1−module ListViewWithPageHeader
2−plugin ListViewWithPageHeader-qml
3−typeinfo plugin.qmltypes
plugins/Unity/Indicators/indicatorsmanager.cpp+1−1
@@ -24,7 +24,7 @@
2424#include <upstart.h>
2525#include <nih/alloc.h>
2626
27−#include "paths.h"
27+#include <paths.h>
2828
2929const QString profile = "phone";
3030
plugins/Unity/Indicators/indicatorsmodel.cpp+4−3
@@ -21,7 +21,8 @@
2121#include "indicatorsmanager.h"
2222#include "indicator.h"
2323#include "indicators.h"
24−#include "paths.h"
24+
25+#include <paths.h>
2526
2627#include <QQmlContext>
2728#include <QQmlEngine>
@@ -248,9 +249,9 @@ QVariant IndicatorsModel::data(const QModelIndex &index, int role) const
248249 }
249250 break;
250251 case IndicatorsModelRole::WidgetSource:
251− return shellAppDirectory()+"/Panel/Indicators/DefaultIndicatorWidget.qml";
252+ return qmlDirectory()+"/Panel/Indicators/DefaultIndicatorWidget.qml";
252253 case IndicatorsModelRole::PageSource:
253− return shellAppDirectory()+"/Panel/Indicators/DefaultIndicatorPage.qml";
254+ return qmlDirectory()+"/Panel/Indicators/DefaultIndicatorPage.qml";
254255 default:
255256 break;
256257 }
Bottombar/Bottombar.qml → qml/Bottombar/Bottombar.qmlrenamed

The content is the same.

Bottombar/HudButton.qml → qml/Bottombar/HudButton.qmlrenamed

The content is the same.

Bottombar/graphics/hud@20.png → qml/Bottombar/graphics/hud@20.pngrenamed

Binary file not shown.

Bottombar/graphics/hud_invoke_button_active@20.png → qml/Bottombar/graphics/hud_invoke_button_active@20.pngrenamed

Binary file not shown.

qml/CMakeLists.txtnew file+22
@@ -0,0 +1,22 @@
1+file(GLOB QML_JS_FILES *.qml *.js)
2+
3+install(FILES ${QML_JS_FILES}
4+ DESTINATION ${SHELL_APP_DIR}
5+ )
6+
7+set(QML_DIRS
8+ Bottombar
9+ Components
10+ Dash
11+ graphics
12+ Greeter
13+ Hud
14+ Panel
15+ Launcher
16+ SideStage
17+ Notifications
18+ )
19+
20+install(DIRECTORY ${QML_DIRS}
21+ DESTINATION ${SHELL_APP_DIR}
22+ )
Components/AnimationControllerWithSignals.qml → qml/Components/AnimationControllerWithSignals.qmlrenamed

The content is the same.

Components/ApplicationManagerWrapper.qml → qml/Components/ApplicationManagerWrapper.qmlrenamed

The content is the same.

Components/ApplicationScreenshot.qml → qml/Components/ApplicationScreenshot.qmlrenamed

The content is the same.

Components/ApplicationsModelStageFiltered.qml → qml/Components/ApplicationsModelStageFiltered.qmlrenamed

The content is the same.

Components/BaseCarouselDelegate.qml → qml/Components/BaseCarouselDelegate.qmlrenamed

The content is the same.

Components/Carousel.qml → qml/Components/Carousel.qmlrenamed

The content is the same.

Components/Circle.qml → qml/Components/Circle.qmlrenamed

The content is the same.

Components/DragHandle.qml → qml/Components/DragHandle.qmlrenamed

The content is the same.

Components/DraggingArea.qml → qml/Components/DraggingArea.qmlrenamed

The content is the same.

Components/EdgeDemo.qml → qml/Components/EdgeDemo.qmlrenamed

The content is the same.

Components/EdgeDemoOverlay.qml → qml/Components/EdgeDemoOverlay.qmlrenamed

The content is the same.

Components/EdgeDragArea.qml → qml/Components/EdgeDragArea.qmlrenamed

The content is the same.

Components/EdgeDragEvaluator.qml → qml/Components/EdgeDragEvaluator.qmlrenamed

The content is the same.

Components/FilterGrid.qml → qml/Components/FilterGrid.qmlrenamed

The content is the same.

Components/LazyImage.qml → qml/Components/LazyImage.qmlrenamed

The content is the same.

Components/ListItems/Base.qml → qml/Components/ListItems/Base.qmlrenamed

The content is the same.

Components/ListItems/Header.qml → qml/Components/ListItems/Header.qmlrenamed

The content is the same.

Components/ListItems/Highlight.qml → qml/Components/ListItems/Highlight.qmlrenamed

The content is the same.

Components/ListItems/ThinDivider.qml → qml/Components/ListItems/ThinDivider.qmlrenamed

The content is the same.

Components/ListItems/VerticalThinDivider.qml → qml/Components/ListItems/VerticalThinDivider.qmlrenamed

The content is the same.

Components/ListItems/graphics/ListItemDividerHorizontal@18.png → qml/Components/ListItems/graphics/ListItemDividerHorizontal@18.pngrenamed

Binary file not shown.

Components/ListItems/graphics/ListItemDividerVertical@18.png → qml/Components/ListItems/graphics/ListItemDividerVertical@18.pngrenamed

Binary file not shown.

Components/OpenEffect.qml → qml/Components/OpenEffect.qmlrenamed

The content is the same.

Components/PageHeader.qml → qml/Components/PageHeader.qmlrenamed

The content is the same.

Components/PinPadButton.qml → qml/Components/PinPadButton.qmlrenamed

The content is the same.

Components/RatingStars.qml → qml/Components/RatingStars.qmlrenamed

The content is the same.

Components/ResponsiveFlowView.qml → qml/Components/ResponsiveFlowView.qmlrenamed

The content is the same.

Components/ResponsiveGridView.qml → qml/Components/ResponsiveGridView.qmlrenamed

The content is the same.

Components/Revealer.qml → qml/Components/Revealer.qmlrenamed

The content is the same.

Components/SearchHistoryModel.qml → qml/Components/SearchHistoryModel.qmlrenamed

The content is the same.

Components/Showable.qml → qml/Components/Showable.qmlrenamed

The content is the same.

Components/Stage.qml → qml/Components/Stage.qmlrenamed

The content is the same.

Components/StandardAnimation.qml → qml/Components/StandardAnimation.qmlrenamed

The content is the same.

Components/Tile.qml → qml/Components/Tile.qmlrenamed

The content is the same.

Components/TileStyle.qml → qml/Components/TileStyle.qmlrenamed

The content is the same.

Components/UbuntuShapeForItem.qml → qml/Components/UbuntuShapeForItem.qmlrenamed

The content is the same.

Components/VolumeControl.qml → qml/Components/VolumeControl.qmlrenamed

The content is the same.

Components/WrongPasswordAnimation.qml → qml/Components/WrongPasswordAnimation.qmlrenamed

The content is the same.

Components/carousel.js → qml/Components/carousel.jsrenamed

The content is the same.

Components/graphics/PageHeaderBaseDivider@18.png → qml/Components/graphics/PageHeaderBaseDivider@18.pngrenamed

Binary file not shown.

Components/graphics/PageHeaderBaseDivider@18.sci → qml/Components/graphics/PageHeaderBaseDivider@18.scirenamed

The content is the same.

Components/graphics/close@20.png → qml/Components/graphics/close@20.pngrenamed

Binary file not shown.

Components/graphics/icon_star_off@20.png → qml/Components/graphics/icon_star_off@20.pngrenamed

Binary file not shown.

Components/graphics/icon_star_on@20.png → qml/Components/graphics/icon_star_on@20.pngrenamed

Binary file not shown.

Components/graphics/non-selected@18.png → qml/Components/graphics/non-selected@18.pngrenamed

Binary file not shown.

Components/graphics/non-selected@18.sci → qml/Components/graphics/non-selected@18.scirenamed

The content is the same.

Dash/Apps/AppPreview.qml → qml/Dash/Apps/AppPreview.qmlrenamed

The content is the same.

Dash/Apps/CloseIcon.qml → qml/Dash/Apps/CloseIcon.qmlrenamed

The content is the same.

Dash/Apps/DashPluginFilterGrid.qml → qml/Dash/Apps/DashPluginFilterGrid.qmlrenamed

The content is the same.

Dash/Apps/FrequentlyUsedAppsModel.qml → qml/Dash/Apps/FrequentlyUsedAppsModel.qmlrenamed

The content is the same.

Dash/Apps/RunningApplicationTile.qml → qml/Dash/Apps/RunningApplicationTile.qmlrenamed

The content is the same.

Dash/Apps/RunningApplicationsGrid.qml → qml/Dash/Apps/RunningApplicationsGrid.qmlrenamed

The content is the same.

Dash/Apps/graphics/close_btn@9.png → qml/Dash/Apps/graphics/close_btn@9.pngrenamed

Binary file not shown.

Dash/Dash.qml → qml/Dash/Dash.qmlrenamed

The content is the same.

Dash/DashApps.qml → qml/Dash/DashApps.qmlrenamed

The content is the same.

Dash/DashBar.qml → qml/Dash/DashBar.qmlrenamed

The content is the same.

Dash/DashCarousel.qml → qml/Dash/DashCarousel.qmlrenamed

The content is the same.

Dash/DashContent.qml → qml/Dash/DashContent.qmlrenamed

The content is the same.

Dash/DashFilterGrid.qml → qml/Dash/DashFilterGrid.qmlrenamed

The content is the same.

Dash/DashHome.qml → qml/Dash/DashHome.qmlrenamed

The content is the same.

Dash/DashPreview.qml → qml/Dash/DashPreview.qmlrenamed

The content is the same.

Dash/DashPreviewPlaceholder.qml → qml/Dash/DashPreviewPlaceholder.qmlrenamed

The content is the same.

Dash/DashRenderer.qml → qml/Dash/DashRenderer.qmlrenamed

The content is the same.

Dash/Generic/FlatTileStyle.qml → qml/Dash/Generic/FlatTileStyle.qmlrenamed

The content is the same.

Dash/Generic/GenericCarousel.qml → qml/Dash/Generic/GenericCarousel.qmlrenamed

The content is the same.

Dash/Generic/GenericFilterGrid.qml → qml/Dash/Generic/GenericFilterGrid.qmlrenamed

The content is the same.

Dash/Generic/GenericFilterGridPotrait.qml → qml/Dash/Generic/GenericFilterGridPotrait.qmlrenamed

The content is the same.

Dash/Generic/GenericPreview.qml → qml/Dash/Generic/GenericPreview.qmlrenamed

The content is the same.

Dash/Generic/WeatherFilterGrid.qml → qml/Dash/Generic/WeatherFilterGrid.qmlrenamed

The content is the same.

Dash/GenericScopeView.qml → qml/Dash/GenericScopeView.qmlrenamed

The content is the same.

Dash/Movie/MoviePreview.qml → qml/Dash/Movie/MoviePreview.qmlrenamed

The content is the same.

Dash/Music/CarouselDelegateMusic.qml → qml/Dash/Music/CarouselDelegateMusic.qmlrenamed

The content is the same.

Dash/Music/MusicCarousel.qml → qml/Dash/Music/MusicCarousel.qmlrenamed

The content is the same.

Dash/Music/MusicFilterGrid.qml → qml/Dash/Music/MusicFilterGrid.qmlrenamed

The content is the same.

Dash/Music/MusicPreview.qml → qml/Dash/Music/MusicPreview.qmlrenamed

The content is the same.

Dash/Music/MusicTileStyle.qml → qml/Dash/Music/MusicTileStyle.qmlrenamed

The content is the same.

Dash/Music/graphics/music_progress_bg.png → qml/Dash/Music/graphics/music_progress_bg.pngrenamed

Binary file not shown.

Dash/PreviewDelegateMapper.qml → qml/Dash/PreviewDelegateMapper.qmlrenamed

The content is the same.

Dash/Previews/Header.qml → qml/Dash/Previews/Header.qmlrenamed

The content is the same.

Dash/Previews/Reviews.qml → qml/Dash/Previews/Reviews.qmlrenamed

The content is the same.

Dash/ScopeDelegateMapper.qml → qml/Dash/ScopeDelegateMapper.qmlrenamed

The content is the same.

Dash/ScopeListView.qml → qml/Dash/ScopeListView.qmlrenamed+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18−import ListViewWithPageHeader 0.1
18+import DashViews 0.1
1919
2020ListViewWithPageHeader {
2121 maximumFlickVelocity: height * 10
Dash/SearchableResultModel.qml → qml/Dash/SearchableResultModel.qmlrenamed

The content is the same.

Dash/Video/CarouselDelegateVideo.qml → qml/Dash/Video/CarouselDelegateVideo.qmlrenamed

The content is the same.

Dash/Video/VideoCarousel.qml → qml/Dash/Video/VideoCarousel.qmlrenamed

The content is the same.

Dash/Video/VideoFilterGrid.qml → qml/Dash/Video/VideoFilterGrid.qmlrenamed

The content is the same.

Dash/Video/VideoTileStyle.qml → qml/Dash/Video/VideoTileStyle.qmlrenamed

The content is the same.

Dash/Video/graphics/icon_button_amazon@20.png → qml/Dash/Video/graphics/icon_button_amazon@20.pngrenamed

Binary file not shown.

Dash/Video/graphics/icon_button_u1@20.png → qml/Dash/Video/graphics/icon_button_u1@20.pngrenamed

Binary file not shown.

Dash/Video/graphics/movie_icon_holder@27.png → qml/Dash/Video/graphics/movie_icon_holder@27.pngrenamed

Binary file not shown.

Dash/graphics/header_handlearrow2@20.png → qml/Dash/graphics/header_handlearrow2@20.pngrenamed

Binary file not shown.

Dash/graphics/header_handlearrow@20.png → qml/Dash/graphics/header_handlearrow@20.pngrenamed

Binary file not shown.

Dash/graphics/icon_clear@20.png → qml/Dash/graphics/icon_clear@20.pngrenamed

Binary file not shown.

Dash/graphics/icon_listview_clear@20.png → qml/Dash/graphics/icon_listview_clear@20.pngrenamed

Binary file not shown.

Dash/graphics/icon_search_active@20.png → qml/Dash/graphics/icon_search_active@20.pngrenamed

Binary file not shown.

Dash/graphics/icon_search_inactive@20.png → qml/Dash/graphics/icon_search_inactive@20.pngrenamed

Binary file not shown.

Dash/graphics/phone/screenshots/browser@12.png → qml/Dash/graphics/phone/screenshots/browser@12.pngrenamed

Binary file not shown.

Dash/graphics/phone/screenshots/camera@12.png → qml/Dash/graphics/phone/screenshots/camera@12.pngrenamed

Binary file not shown.

Dash/graphics/phone/screenshots/facebook@12.png → qml/Dash/graphics/phone/screenshots/facebook@12.pngrenamed

Binary file not shown.

Dash/graphics/phone/screenshots/gallery@12.png → qml/Dash/graphics/phone/screenshots/gallery@12.pngrenamed

Binary file not shown.

Dash/graphics/phone/screenshots/map@12.png → qml/Dash/graphics/phone/screenshots/map@12.pngrenamed

Binary file not shown.

Dash/graphics/phone/screenshots/music@12.png → qml/Dash/graphics/phone/screenshots/music@12.pngrenamed

Binary file not shown.

Dash/graphics/phone/screenshots/phone@12.png → qml/Dash/graphics/phone/screenshots/phone@12.pngrenamed

Binary file not shown.

Dash/graphics/phone/screenshots/settings@12.png → qml/Dash/graphics/phone/screenshots/settings@12.pngrenamed

Binary file not shown.

Dash/graphics/phone/screenshots/twitter@12.png → qml/Dash/graphics/phone/screenshots/twitter@12.pngrenamed

Binary file not shown.

Dash/graphics/play_button@18.png → qml/Dash/graphics/play_button@18.pngrenamed

Binary file not shown.

Dash/graphics/play_button_active@18.png → qml/Dash/graphics/play_button_active@18.pngrenamed

Binary file not shown.

Dash/graphics/play_button_active_big@20.png → qml/Dash/graphics/play_button_active_big@20.pngrenamed

Binary file not shown.

Dash/graphics/play_button_big@20.png → qml/Dash/graphics/play_button_big@20.pngrenamed

Binary file not shown.

Dash/graphics/tablet/icon_close_preview@20.png → qml/Dash/graphics/tablet/icon_close_preview@20.pngrenamed

Binary file not shown.

Dash/graphics/tooltip_arrow@27.png → qml/Dash/graphics/tooltip_arrow@27.pngrenamed

Binary file not shown.

Greeter/Clock.qml → qml/Greeter/Clock.qmlrenamed

The content is the same.

Greeter/Dot.qml → qml/Greeter/Dot.qmlrenamed

The content is the same.

Greeter/Gradient.js → qml/Greeter/Gradient.jsrenamed

The content is the same.

Greeter/Greeter.qml → qml/Greeter/Greeter.qmlrenamed

The content is the same.

Greeter/GreeterContent.qml → qml/Greeter/GreeterContent.qmlrenamed

The content is the same.

Greeter/Infographics.qml → qml/Greeter/Infographics.qmlrenamed

The content is the same.

Greeter/Lockscreen.qml → qml/Greeter/Lockscreen.qmlrenamed+2−2
@@ -30,9 +30,9 @@ Showable {
3030 // In case the Lockscreen can show a greeter message, this is the username
3131 property string username: ""
3232
33− // As the numeric PIN pad doesn't have a OK button by design, we need to auto-confirm on a certain length.
33+ // Set this to a value greater 0 to enable auto-confirm behavior for the lockscreen.
3434 // This is ignored by the alphaNumeric lockscreen as that one is confirmed with pressing enter on the OSK.
35− property int pinLength: 4
35+ property int pinLength: -1
3636
3737 property url background: ""
3838
Greeter/LoginList.qml → qml/Greeter/LoginList.qmlrenamed

The content is the same.

Greeter/ObjectPositioner.qml → qml/Greeter/ObjectPositioner.qmlrenamed

The content is the same.

Greeter/PassphraseLockscreen.qml → qml/Greeter/PassphraseLockscreen.qmlrenamed

The content is the same.

Greeter/PinLockscreen.qml → qml/Greeter/PinLockscreen.qmlrenamed

The content is the same.

Greeter/graphics/dot_empty.png → qml/Greeter/graphics/dot_empty.pngrenamed

Binary file not shown.

Greeter/graphics/dot_filled.png → qml/Greeter/graphics/dot_filled.pngrenamed

Binary file not shown.

Greeter/graphics/dot_pointer.png → qml/Greeter/graphics/dot_pointer.pngrenamed

Binary file not shown.

Greeter/graphics/icon_arrow.png → qml/Greeter/graphics/icon_arrow.pngrenamed

Binary file not shown.

Greeter/graphics/infographic_circle_back.png → qml/Greeter/graphics/infographic_circle_back.pngrenamed

Binary file not shown.

Hud/Hud.qml → qml/Hud/Hud.qmlrenamed

The content is the same.

Hud/HudParametrizedActionsPage.qml → qml/Hud/HudParametrizedActionsPage.qmlrenamed

The content is the same.

Hud/Result.qml → qml/Hud/Result.qmlrenamed

The content is the same.

Hud/ResultList.qml → qml/Hud/ResultList.qmlrenamed

The content is the same.

Hud/SearchBar.qml → qml/Hud/SearchBar.qmlrenamed

The content is the same.

Hud/ShowingAnimation.qml → qml/Hud/ShowingAnimation.qmlrenamed

The content is the same.

Hud/SliderLabel.qml → qml/Hud/SliderLabel.qmlrenamed

The content is the same.

Hud/SoundAmplitudeDelegate.qml → qml/Hud/SoundAmplitudeDelegate.qmlrenamed

The content is the same.

Hud/SoundAmplitudeVisual.qml → qml/Hud/SoundAmplitudeVisual.qmlrenamed

The content is the same.

Hud/ToolBar.qml → qml/Hud/ToolBar.qmlrenamed

The content is the same.

Hud/ToolBarIcon.qml → qml/Hud/ToolBarIcon.qmlrenamed

The content is the same.

Hud/graphics/divider@20.png → qml/Hud/graphics/divider@20.pngrenamed

Binary file not shown.

Hud/graphics/divider@20.sci → qml/Hud/graphics/divider@20.scirenamed

The content is the same.

Hud/graphics/dropshadow_right@20.png → qml/Hud/graphics/dropshadow_right@20.pngrenamed

Binary file not shown.

Hud/graphics/help@20.png → qml/Hud/graphics/help@20.pngrenamed

Binary file not shown.

Hud/graphics/hud_bg@20.png → qml/Hud/graphics/hud_bg@20.pngrenamed

Binary file not shown.

Hud/graphics/hud_handlearrow@20.png → qml/Hud/graphics/hud_handlearrow@20.pngrenamed

Binary file not shown.

Hud/graphics/hud_handlebar@20.png → qml/Hud/graphics/hud_handlebar@20.pngrenamed

Binary file not shown.

Hud/graphics/icon_arrow@20.png → qml/Hud/graphics/icon_arrow@20.pngrenamed

Binary file not shown.

Hud/graphics/icon_clear@20.png → qml/Hud/graphics/icon_clear@20.pngrenamed

Binary file not shown.

Hud/graphics/icon_search@20.png → qml/Hud/graphics/icon_search@20.pngrenamed

Binary file not shown.

Hud/graphics/microphone@20.png → qml/Hud/graphics/microphone@20.pngrenamed

Binary file not shown.

Hud/graphics/popup_triangle@20.png → qml/Hud/graphics/popup_triangle@20.pngrenamed

Binary file not shown.

Hud/graphics/settings@20.png → qml/Hud/graphics/settings@20.pngrenamed

Binary file not shown.

Hud/graphics/undo@20.png → qml/Hud/graphics/undo@20.pngrenamed

Binary file not shown.

Hud/graphics/view-fullscreen@20.png → qml/Hud/graphics/view-fullscreen@20.pngrenamed

Binary file not shown.

Launcher/FoldingLauncherDelegate.qml → qml/Launcher/FoldingLauncherDelegate.qmlrenamed

The content is the same.

Launcher/Launcher.qml → qml/Launcher/Launcher.qmlrenamed

The content is the same.

Launcher/LauncherDelegate.qml → qml/Launcher/LauncherDelegate.qmlrenamed

The content is the same.

Launcher/LauncherPanel.qml → qml/Launcher/LauncherPanel.qmlrenamed

The content is the same.

Launcher/graphics/focused_app_arrow@30.png → qml/Launcher/graphics/focused_app_arrow@30.pngrenamed

Binary file not shown.

Launcher/graphics/highlight@18.png → qml/Launcher/graphics/highlight@18.pngrenamed

Binary file not shown.

Launcher/graphics/home@18.png → qml/Launcher/graphics/home@18.pngrenamed

Binary file not shown.

Launcher/graphics/launcher_bg@30.png → qml/Launcher/graphics/launcher_bg@30.pngrenamed

Binary file not shown.

Launcher/graphics/launcher_bg@30.sci → qml/Launcher/graphics/launcher_bg@30.scirenamed

The content is the same.

Launcher/graphics/non-selected@18.png → qml/Launcher/graphics/non-selected@18.pngrenamed

Binary file not shown.

Launcher/graphics/non-selected@18.sci → qml/Launcher/graphics/non-selected@18.scirenamed

The content is the same.

Launcher/graphics/notification@30.png → qml/Launcher/graphics/notification@30.pngrenamed

Binary file not shown.

Launcher/graphics/notification@30.sci → qml/Launcher/graphics/notification@30.scirenamed

The content is the same.

Launcher/graphics/progressbar-fill@30.png → qml/Launcher/graphics/progressbar-fill@30.pngrenamed

Binary file not shown.

Launcher/graphics/progressbar-fill@30.sci → qml/Launcher/graphics/progressbar-fill@30.scirenamed

The content is the same.

Launcher/graphics/progressbar-trough@30.png → qml/Launcher/graphics/progressbar-trough@30.pngrenamed

Binary file not shown.

Launcher/graphics/progressbar-trough@30.sci → qml/Launcher/graphics/progressbar-trough@30.scirenamed

The content is the same.

Launcher/graphics/quicklist_tooltip@30.png → qml/Launcher/graphics/quicklist_tooltip@30.pngrenamed

Binary file not shown.

Launcher/graphics/selected@18.png → qml/Launcher/graphics/selected@18.pngrenamed

Binary file not shown.

Launcher/graphics/selected@18.sci → qml/Launcher/graphics/selected@18.scirenamed

The content is the same.

Launcher/graphics/triangle@18.png → qml/Launcher/graphics/triangle@18.pngrenamed

Binary file not shown.

Notifications/Notification.qml → qml/Notifications/Notification.qmlrenamed

The content is the same.

Notifications/NotificationMenuItemFactory.qml → qml/Notifications/NotificationMenuItemFactory.qmlrenamed

The content is the same.

Notifications/Notifications.qml → qml/Notifications/Notifications.qmlrenamed

The content is the same.

Notifications/ShapedIcon.qml → qml/Notifications/ShapedIcon.qmlrenamed

The content is the same.

Panel/IndicatorItem.qml → qml/Panel/IndicatorItem.qmlrenamed

The content is the same.

Panel/IndicatorRow.qml → qml/Panel/IndicatorRow.qmlrenamed

The content is the same.

Panel/Indicators.qml → qml/Panel/Indicators.qmlrenamed

The content is the same.

Panel/Indicators/DefaultIndicatorPage.qml → qml/Panel/Indicators/DefaultIndicatorPage.qmlrenamed

The content is the same.

Panel/Indicators/DefaultIndicatorWidget.qml → qml/Panel/Indicators/DefaultIndicatorWidget.qmlrenamed

The content is the same.

Panel/Indicators/client/IndicatorsClient.qml → qml/Panel/Indicators/client/IndicatorsClient.qmlrenamed

The content is the same.

Panel/Indicators/client/IndicatorsList.qml → qml/Panel/Indicators/client/IndicatorsList.qmlrenamed

The content is the same.

Panel/Indicators/client/IndicatorsPage.qml → qml/Panel/Indicators/client/IndicatorsPage.qmlrenamed

The content is the same.

Panel/Indicators/client/IndicatorsTree.qml → qml/Panel/Indicators/client/IndicatorsTree.qmlrenamed

The content is the same.

Panel/MenuContent.qml → qml/Panel/MenuContent.qmlrenamed

The content is the same.

Panel/Panel.qml → qml/Panel/Panel.qmlrenamed

The content is the same.

Panel/PanelBackground.qml → qml/Panel/PanelBackground.qmlrenamed

The content is the same.

Panel/PanelSeparatorLine.qml → qml/Panel/PanelSeparatorLine.qmlrenamed

The content is the same.

Panel/SearchIndicator.qml → qml/Panel/SearchIndicator.qmlrenamed

The content is the same.

Panel/graphics/Battery@18.png → qml/Panel/graphics/Battery@18.pngrenamed

Binary file not shown.

Panel/graphics/Bluetooth@18.png → qml/Panel/graphics/Bluetooth@18.pngrenamed

Binary file not shown.

Panel/graphics/Clock@18.png → qml/Panel/graphics/Clock@18.pngrenamed

Binary file not shown.

Panel/graphics/Location@18.png → qml/Panel/graphics/Location@18.pngrenamed

Binary file not shown.

Panel/graphics/Messages@18.png → qml/Panel/graphics/Messages@18.pngrenamed

Binary file not shown.

Panel/graphics/Network@18.png → qml/Panel/graphics/Network@18.pngrenamed

Binary file not shown.

Panel/graphics/Sound@18.png → qml/Panel/graphics/Sound@18.pngrenamed

Binary file not shown.

Panel/graphics/Sync@18.png → qml/Panel/graphics/Sync@18.pngrenamed

Binary file not shown.

Panel/graphics/System@18.png → qml/Panel/graphics/System@18.pngrenamed

Binary file not shown.

Panel/graphics/Time@18.png → qml/Panel/graphics/Time@18.pngrenamed

Binary file not shown.

Panel/graphics/VerticalDivider@18.png → qml/Panel/graphics/VerticalDivider@18.pngrenamed

Binary file not shown.

Panel/graphics/handle@12.png → qml/Panel/graphics/handle@12.pngrenamed

Binary file not shown.

Panel/graphics/handle@12.sci → qml/Panel/graphics/handle@12.scirenamed

The content is the same.

Panel/graphics/rectangular_dropshadow@30.png → qml/Panel/graphics/rectangular_dropshadow@30.pngrenamed

Binary file not shown.

Panel/graphics/rectangular_dropshadow@30.sci → qml/Panel/graphics/rectangular_dropshadow@30.scirenamed

The content is the same.

Panel/graphics/search@12.png → qml/Panel/graphics/search@12.pngrenamed

Binary file not shown.

Panel/graphics/time_and_date@18.png → qml/Panel/graphics/time_and_date@18.pngrenamed

Binary file not shown.

Shell.qml → qml/Shell.qmlrenamed+2−1
@@ -44,7 +44,7 @@ FocusScope {
4444 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
4545
4646 property real edgeSize: units.gu(2)
47− property url defaultBackground: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
47+ property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
4848 property url background
4949 readonly property real panelHeight: panel.panelHeight
5050
@@ -413,6 +413,7 @@ FocusScope {
413413 width: parent.width
414414 height: parent.height - panel.panelHeight
415415 background: shell.background
416+ pinLength: 4
416417
417418 onEntered: LightDM.Greeter.respond(passphrase);
418419 onCancel: greeter.show()
SideStage/SideStage.qml → qml/SideStage/SideStage.qmlrenamed

The content is the same.

SideStage/SidestageHandle.qml → qml/SideStage/SidestageHandle.qmlrenamed

The content is the same.

SideStage/graphics/sidestage_handle@20.png → qml/SideStage/graphics/sidestage_handle@20.pngrenamed

Binary file not shown.

SideStage/graphics/sidestage_handle@20.sci → qml/SideStage/graphics/sidestage_handle@20.scirenamed

The content is the same.

graphics/12_10_background_wide@12.png → qml/graphics/12_10_background_wide@12.pngrenamed

Binary file not shown.

graphics/applicationIcons/browser@18.png → qml/graphics/applicationIcons/browser@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/calendar@18.png → qml/graphics/applicationIcons/calendar@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/camera@18.png → qml/graphics/applicationIcons/camera@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/contacts-app@18.png → qml/graphics/applicationIcons/contacts-app@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/dash@18.png → qml/graphics/applicationIcons/dash@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/evernote@18.png → qml/graphics/applicationIcons/evernote@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/facebook@18.png → qml/graphics/applicationIcons/facebook@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/gallery@18.png → qml/graphics/applicationIcons/gallery@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/gmail@18.png → qml/graphics/applicationIcons/gmail@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/map@18.png → qml/graphics/applicationIcons/map@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/messages-app@18.png → qml/graphics/applicationIcons/messages-app@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/notepad@18.png → qml/graphics/applicationIcons/notepad@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/phone-app@18.png → qml/graphics/applicationIcons/phone-app@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/pinterest@18.png → qml/graphics/applicationIcons/pinterest@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/soundcloud@18.png → qml/graphics/applicationIcons/soundcloud@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/system-settings@18.png → qml/graphics/applicationIcons/system-settings@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/twitter@18.png → qml/graphics/applicationIcons/twitter@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/weather@18.png → qml/graphics/applicationIcons/weather@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/wikipedia@18.png → qml/graphics/applicationIcons/wikipedia@18.pngrenamed

Binary file not shown.

graphics/applicationIcons/youtube@18.png → qml/graphics/applicationIcons/youtube@18.pngrenamed

Binary file not shown.

graphics/avatars/amanda@12.png → qml/graphics/avatars/amanda@12.pngrenamed

Binary file not shown.

graphics/avatars/anna_olsson@12.png → qml/graphics/avatars/anna_olsson@12.pngrenamed

Binary file not shown.

graphics/avatars/funky@12.png → qml/graphics/avatars/funky@12.pngrenamed

Binary file not shown.

graphics/clock@18.png → qml/graphics/clock@18.pngrenamed

Binary file not shown.

graphics/phone_background.jpg → qml/graphics/phone_background.jpgrenamed

Binary file not shown.

graphics/tablet_background.jpg → qml/graphics/tablet_background.jpgrenamed

Binary file not shown.

run+1−1
@@ -3,7 +3,7 @@
33. /etc/environment
44export QML2_IMPORT_PATH
55
6−QML_PHONE_SHELL_PATH=./builddir/unity8
6+QML_PHONE_SHELL_PATH=./builddir/src/unity8
77GDB=false
88FAKE=false
99PINLOCK=false
runtests.sh+1−13
@@ -26,19 +26,7 @@
2626# floating point operations and xml writing is natively supported.
2727
2828
29−if test -e Shell.qml; then
30− echo In-source build detected.
31− SRCDIR=`pwd`
32−elif test -e ../Shell.qml; then
33− echo Out-of-source build detected. Found source dir at ..
34− SRCDIR=`pwd`/..
35−else
36− echo Out-of-source build detected. Source dir not found at ..
37− echo Only in-source builds or out-of-source builds with source dir at .. are supported.
38− exit 1
39−fi
40−
41−cd $SRCDIR
29+SRCDIR=`dirname "$(readlink -f "$0")"`
4230
4331file_list=""
4432
ApplicationArguments.h → src/ApplicationArguments.hrenamed

The content is the same.

src/CMakeLists.txt+27
@@ -1 +1,28 @@
1+pkg_check_modules(UNITY-MIR REQUIRED unity-mir)
2+
3+include_directories(
4+ ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
5+ ${UNITY-MIR_INCLUDE_DIRS}
6+)
7+
8+add_executable(${SHELL_APP}
9+ ApplicationArguments.h
10+ main.cpp
11+ MouseTouchAdaptor.cpp
12+ )
13+
14+qt5_use_modules(${SHELL_APP} Gui Qml Quick Test)
15+pkg_check_modules(XCB REQUIRED xcb)
16+
17+if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
18+ set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
19+
20+ target_link_libraries(${SHELL_APP} ${XCB_LDFLAGS})
21+endif()
22+
23+# install binaries
24+install(TARGETS ${SHELL_APP}
25+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
26+ )
27+
128add_subdirectory(Panel)
MouseTouchAdaptor.cpp → src/MouseTouchAdaptor.cpprenamed

The content is the same.

MouseTouchAdaptor.h → src/MouseTouchAdaptor.hrenamed

The content is the same.

src/Panel/Indicators/client/CMakeLists.txt−4
@@ -14,10 +14,6 @@ add_executable(${INDICATORS_CLIENT_APP}
1414 ${INDICATORS_CLIENT_HEADERS}
1515)
1616
17−include_directories(
18− ${CMAKE_BINARY_DIR}
19−)
20−
2117qt5_use_modules(${INDICATORS_CLIENT_APP} Core Widgets Quick)
2218set_target_properties(${INDICATORS_CLIENT_APP} PROPERTIES COMPILE_FLAGS -fPIC)
2319
src/Panel/Indicators/client/indicatorsclient.cpp+3−2
@@ -19,7 +19,8 @@
1919 */
2020
2121#include "indicatorsclient.h"
22−#include "paths.h"
22+
23+#include <paths.h>
2324
2425#include <QQuickView>
2526#include <QQmlContext>
@@ -36,7 +37,7 @@ IndicatorsClient::IndicatorsClient(int &argc, char **argv)
3637 QStringList args = m_application->arguments();
3738
3839 m_view = new QQuickView;
39− m_view->engine()->setBaseUrl(QUrl::fromLocalFile(::shellAppDirectory()+"Panel/Indicators/client/"));
40+ m_view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()+"Panel/Indicators/client/"));
4041 prependImportPaths(m_view->engine(), ::overrideImportPaths());
4142 appendImportPaths(m_view->engine(), ::fallbackImportPaths());
4243
main.cpp → src/main.cpprenamed+3−3
@@ -30,7 +30,7 @@
3030#include <csignal>
3131
3232// local
33−#include "paths.h"
33+#include <paths.h>
3434#include "MouseTouchAdaptor.h"
3535#include "ApplicationArguments.h"
3636
@@ -86,7 +86,7 @@ int startShell(int argc, const char** argv, void* server)
8686 QQuickView* view = new QQuickView();
8787 view->setResizeMode(QQuickView::SizeRootObjectToView);
8888 view->setTitle("Qml Phone Shell");
89− view->engine()->setBaseUrl(QUrl::fromLocalFile(::shellAppDirectory()));
89+ view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()));
9090 view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
9191 if (args.contains(QLatin1String("-frameless"))) {
9292 view->setFlags(Qt::FramelessWindowHint);
@@ -109,7 +109,7 @@ int startShell(int argc, const char** argv, void* server)
109109 nativeInterface->setProperty("ubuntuSessionType", 1);
110110 view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
111111
112− QUrl source("Shell.qml");
112+ QUrl source(::qmlDirectory()+"Shell.qml");
113113 prependImportPaths(view->engine(), ::overrideImportPaths());
114114 appendImportPaths(view->engine(), ::fallbackImportPaths());
115115
tests/mocks/LightDM/CMakeLists.txt+1
@@ -13,6 +13,7 @@ add_subdirectory(single-passphrase)
1313include_directories(
1414 ${CMAKE_CURRENT_SOURCE_DIR}
1515 ${CMAKE_CURRENT_BINARY_DIR}
16+ ${CMAKE_SOURCE_DIR}/plugins/Utils
1617 ${CMAKE_SOURCE_DIR}/tests/mocks/libusermetrics
1718)
1819
tests/mocks/Unity/Application/ApplicationManager.cpp+4−3
@@ -16,7 +16,8 @@
1616
1717#include "ApplicationManager.h"
1818#include "ApplicationInfo.h"
19−#include "paths.h"
19+
20+#include <paths.h>
2021
2122#include <QDir>
2223#include <QGuiApplication>
@@ -273,7 +274,7 @@ void ApplicationManager::generateQmlStrings(ApplicationInfo *application)
273274 " smooth: true\n"
274275 " fillMode: Image.PreserveAspectCrop\n"
275276 "}").arg(topMargin)
276− .arg(shellAppDirectory())
277+ .arg(qmlDirectory())
277278 .arg(application->icon().toString());
278279 application->setWindowQml(windowQml);
279280
@@ -284,7 +285,7 @@ void ApplicationManager::generateQmlStrings(ApplicationInfo *application)
284285 " source: \"file://%1/Dash/graphics/phone/screenshots/%2.png\"\n"
285286 " smooth: true\n"
286287 " fillMode: Image.PreserveAspectCrop\n"
287− "}").arg(shellAppDirectory())
288+ "}").arg(qmlDirectory())
288289 .arg(application->icon().toString());
289290 application->setImageQml(imageQml);
290291}
tests/mocks/Unity/fake_scope.cpp+2−2
@@ -16,7 +16,7 @@
1616
1717#include "fake_scope.h"
1818#include "fake_preview.h"
19−#include "paths.h"
19+#include <paths.h>
2020
2121#include <dee.h>
2222
@@ -236,7 +236,7 @@ DeeModel* create_results_model(unsigned category_count, unsigned result_count) {
236236
237237 dee_model_append(results_model,
238238 ("uri://result."+std::to_string(i)).c_str(),
239− (shellAppDirectory() + "graphics/applicationIcons/dash.png").toLatin1().data(),
239+ (qmlDirectory() + "graphics/applicationIcons/dash.png").toLatin1().data(),
240240 category,
241241 0,
242242 "application/x-desktop",
tests/mocks/libusermetrics/CMakeLists.txt+4
@@ -8,6 +8,10 @@ add_library(MockUserMetrics SHARED ${mock_SOURCES})
88
99qt5_use_modules(MockUserMetrics Gui)
1010
11+include_directories(
12+ ${CMAKE_SOURCE_DIR}/plugins/Utils
13+)
14+
1115set_target_properties(MockUserMetrics PROPERTIES
1216 OUTPUT_NAME usermetricsoutput
1317 VERSION 1)
tests/mocks/libusermetrics/UserMetrics.cpp+1−1
@@ -17,7 +17,7 @@
1717 */
1818
1919#include "UserMetrics.h"
20−#include "plugins/Utils/qvariantlistmodel.h"
20+#include <qvariantlistmodel.h>
2121
2222#include <QtCore/QDir>
2323#include <QtCore/QString>
tests/plugins/CMakeLists.txt+1−1
@@ -1,6 +1,6 @@
11add_subdirectory(AccountsService)
22add_subdirectory(LightDM)
3−add_subdirectory(ListViewWithPageHeader)
3+add_subdirectory(DashViews)
44add_subdirectory(Ubuntu)
55add_subdirectory(Unity)
66add_subdirectory(Utils)
tests/plugins/ListViewWithPageHeader/CMakeLists.txt → tests/plugins/DashViews/CMakeLists.txtrenamed+16−5
@@ -16,30 +16,40 @@ include_directories(
1616 ${Qt5Quick_INCLUDE_DIRS}
1717 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
1818 ${Qt5V8_PRIVATE_INCLUDE_DIR}
19− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/ListViewWithPageHeader
19+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews
2020 ${CMAKE_CURRENT_BINARY_DIR}
2121 )
2222
2323remove_definitions(-DQT_NO_KEYWORDS)
2424
25−add_definitions(-DLISTVIEWWITHPAGEHEADER_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}")
25+add_definitions(-DDASHVIEWSTEST_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}")
2626add_definitions(-DBUILT_PLUGINS_DIR="${CMAKE_BINARY_DIR}/plugins")
2727
28−add_executable(listviewwithpageheadertestExec listviewwithpageheadertest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/ListViewWithPageHeader/listviewwithpageheader.cpp)
28+add_executable(listviewwithpageheadertestExec listviewwithpageheadertest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/listviewwithpageheader.cpp)
2929qt5_use_modules(listviewwithpageheadertestExec Test Core Qml)
3030target_link_libraries(listviewwithpageheadertestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
3131add_custom_target(testlistviewwithpageheader ${CMAKE_CURRENT_BINARY_DIR}/listviewwithpageheadertestExec -o ${CMAKE_BINARY_DIR}/testlistviewwithpageheader.xml,xunitxml -o -,txt)
3232
33−add_executable(listviewwithpageheadertestsectionExec listviewwithpageheadertestsection.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/ListViewWithPageHeader/listviewwithpageheader.cpp)
33+add_executable(listviewwithpageheadertestsectionExec listviewwithpageheadertestsection.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/listviewwithpageheader.cpp)
3434qt5_use_modules(listviewwithpageheadertestsectionExec Test Core Qml)
3535target_link_libraries(listviewwithpageheadertestsectionExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
3636add_custom_target(testlistviewwithpageheadersection ${CMAKE_CURRENT_BINARY_DIR}/listviewwithpageheadertestsectionExec -o ${CMAKE_BINARY_DIR}/testlistviewwithpageheadersection.xml,xunitxml -o -,txt)
3737
38−add_executable(listviewwithpageheadertestsectionexternalmodelExec listviewwithpageheadertestsectionexternalmodel.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/ListViewWithPageHeader/listviewwithpageheader.cpp)
38+add_executable(listviewwithpageheadertestsectionexternalmodelExec listviewwithpageheadertestsectionexternalmodel.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/listviewwithpageheader.cpp)
3939qt5_use_modules(listviewwithpageheadertestsectionexternalmodelExec Test Core Qml)
4040target_link_libraries(listviewwithpageheadertestsectionexternalmodelExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
4141add_custom_target(testlistviewwithpageheadersectionexternalmodel ${CMAKE_CURRENT_BINARY_DIR}/listviewwithpageheadertestsectionexternalmodelExec -o ${CMAKE_BINARY_DIR}/testlistviewwithpageheadersectionexternalmodel.xml,xunitxml -o -,txt)
4242
43+add_executable(verticaljournaltestExec verticaljournaltest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/verticaljournal.cpp)
44+qt5_use_modules(verticaljournaltestExec Test Core Qml)
45+target_link_libraries(verticaljournaltestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
46+add_custom_target(testVerticalJournal ${CMAKE_CURRENT_BINARY_DIR}/verticaljournaltestExec -o ${CMAKE_BINARY_DIR}/testVerticalJournal.xml,xunitxml -o -,txt)
47+
48+add_executable(verticaljournaltryExec verticaljournaltry.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/verticaljournal.cpp)
49+qt5_use_modules(verticaljournaltryExec Test Core Qml)
50+target_link_libraries(verticaljournaltryExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
51+add_custom_target(tryVerticalJournal ${CMAKE_CURRENT_BINARY_DIR}/verticaljournaltryExec -o ${CMAKE_BINARY_DIR}/testVerticalJournal.xml,xunitxml -o -,txt)
52+
4353set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
4454add_qml_test(. listviewwithpageheaderqml IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
4555
@@ -47,3 +57,4 @@ add_dependencies(qmluitests testlistviewwithpageheader)
4757add_dependencies(qmluitests testlistviewwithpageheadersection)
4858add_dependencies(qmluitests testlistviewwithpageheadersectionexternalmodel)
4959add_dependencies(qmluitests testlistviewwithpageheaderqml)
60+add_dependencies(qmluitests testVerticalJournal)
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cpp → tests/plugins/DashViews/listviewwithpageheadertest.cpprenamed+1−1
@@ -118,7 +118,7 @@ private Q_SLOTS:
118118 {
119119 view = new QQuickView();
120120 view->engine()->addImportPath(BUILT_PLUGINS_DIR);
121− view->setSource(QUrl::fromLocalFile(LISTVIEWWITHPAGEHEADER_FOLDER "/test.qml"));
121+ view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertest.qml"));
122122 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
123123#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
124124 model = view->rootObject()->findChild<QQuickListModel*>();
tests/plugins/ListViewWithPageHeader/test.qml → tests/plugins/DashViews/listviewwithpageheadertest.qmlrenamed+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18−import ListViewWithPageHeader 0.1
18+import DashViews 0.1
1919
2020Rectangle {
2121 width: 300
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsection.cpp → tests/plugins/DashViews/listviewwithpageheadertestsection.cpprenamed+1−1
@@ -133,7 +133,7 @@ private Q_SLOTS:
133133 {
134134 view = new QQuickView();
135135 view->engine()->addImportPath(BUILT_PLUGINS_DIR);
136− view->setSource(QUrl::fromLocalFile(LISTVIEWWITHPAGEHEADER_FOLDER "/test_section.qml"));
136+ view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertestsection.qml"));
137137 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
138138#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
139139 model = view->rootObject()->findChild<QQuickListModel*>();
tests/plugins/ListViewWithPageHeader/test_section.qml → tests/plugins/DashViews/listviewwithpageheadertestsection.qmlrenamed+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18−import ListViewWithPageHeader 0.1
18+import DashViews 0.1
1919
2020Rectangle {
2121 width: 300
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsectionexternalmodel.cpp → tests/plugins/DashViews/listviewwithpageheadertestsectionexternalmodel.cpprenamed+1−1
@@ -173,7 +173,7 @@ private Q_SLOTS:
173173 {
174174 view = new QQuickView();
175175 view->engine()->addImportPath(BUILT_PLUGINS_DIR);
176− view->setSource(QUrl::fromLocalFile(LISTVIEWWITHPAGEHEADER_FOLDER "/test_sectionexternalmodel.qml"));
176+ view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertestsectionexternalmodel.qml"));
177177 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
178178 QVERIFY(lvwph);
179179 view->show();
tests/plugins/ListViewWithPageHeader/test_sectionexternalmodel.qml → tests/plugins/DashViews/listviewwithpageheadertestsectionexternalmodel.qmlrenamed+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18−import ListViewWithPageHeader 0.1
18+import DashViews 0.1
1919
2020Rectangle {
2121 width: 300
tests/plugins/ListViewWithPageHeader/tst_listviewwithpageheaderqml.qml → tests/plugins/DashViews/tst_listviewwithpageheaderqml.qmlrenamed+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import ListViewWithPageHeader 0.1
19+import DashViews 0.1
2020
2121Rectangle {
2222 width: 300
tests/plugins/DashViews/verticaljournaltest.cppnew file+438
@@ -0,0 +1,438 @@
1+/*
2+ * Copyright (C) 2013 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+#include <QQuickView>
18+#include <QtTestGui>
19+#include <QDebug>
20+#include <QGuiApplication>
21+#include <QQuickView>
22+#include <QtQml/qqml.h>
23+#include <QStringListModel>
24+#include <QQmlContext>
25+#include <QQmlEngine>
26+#pragma GCC diagnostic push
27+#pragma GCC diagnostic ignored "-pedantic"
28+#include <private/qquickitem_p.h>
29+#pragma GCC diagnostic pop
30+
31+#include "verticaljournal.h"
32+
33+class QHeightModel : public QAbstractListModel {
34+public:
35+ QHash<int, QByteArray> roleNames() const
36+ {
37+ QHash<int, QByteArray> roles;
38+ roles.insert(Qt::DisplayRole, "modelHeight");
39+ return roles;
40+ }
41+
42+ int rowCount(const QModelIndex & /*parent*/) const
43+ {
44+ return m_list.count();
45+ }
46+
47+ QVariant data(const QModelIndex &index, int /*role*/) const
48+ {
49+ return m_list[index.row()];
50+ }
51+
52+ QStringList stringList() const
53+ {
54+ return m_list;
55+ }
56+
57+ void setStringList(const QStringList &list)
58+ {
59+ beginResetModel();
60+ m_list = list;
61+ endResetModel();
62+ }
63+
64+ void addString(const QString& string)
65+ {
66+ beginInsertRows(QModelIndex(), m_list.count(), m_list.count());
67+ m_list << string;
68+ endInsertRows();
69+ }
70+
71+ void removeLast()
72+ {
73+ beginRemoveRows(QModelIndex(), m_list.count() - 1, m_list.count() - 1);
74+ m_list.takeLast();
75+ endRemoveRows();
76+ }
77+
78+private:
79+ QStringList m_list;
80+};
81+
82+class VerticalJournalTest : public QObject
83+{
84+ Q_OBJECT
85+
86+private:
87+ void verifyItem(const VerticalJournal::ViewItem &item, int modelIndex, qreal x, qreal y, bool visible)
88+ {
89+ QTRY_COMPARE(item.m_modelIndex, modelIndex);
90+ QTRY_COMPARE(item.x(), x);
91+ QTRY_COMPARE(item.y(), y);
92+ QTRY_COMPARE(item.height(), model->stringList()[modelIndex].toDouble());
93+ QTRY_COMPARE(QQuickItemPrivate::get(item.m_item)->culled, !visible);
94+ }
95+
96+ void checkInitialPositions()
97+ {
98+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
99+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 5);
100+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 7);
101+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 6);
102+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
103+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 160, 0, true);
104+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, true);
105+ verifyItem(vj->m_columnVisibleItems[1][1], 3, 160, 60, true);
106+ verifyItem(vj->m_columnVisibleItems[1][2], 4, 160, 80, true);
107+ verifyItem(vj->m_columnVisibleItems[0][1], 5, 0, 110, true);
108+ verifyItem(vj->m_columnVisibleItems[1][3], 6, 160, 130, true);
109+ verifyItem(vj->m_columnVisibleItems[2][1], 7, 320, 135, true);
110+ verifyItem(vj->m_columnVisibleItems[0][2], 8, 0, 190, true);
111+ verifyItem(vj->m_columnVisibleItems[2][2], 9, 320, 255, true);
112+ verifyItem(vj->m_columnVisibleItems[2][3], 10, 320, 285, true);
113+ verifyItem(vj->m_columnVisibleItems[2][4], 11, 320, 315, true);
114+ verifyItem(vj->m_columnVisibleItems[1][4], 12, 160, 340, true);
115+ verifyItem(vj->m_columnVisibleItems[0][3], 13, 0, 360, true);
116+ verifyItem(vj->m_columnVisibleItems[2][5], 14, 320, 390, true);
117+ verifyItem(vj->m_columnVisibleItems[1][5], 15, 160, 430, false);
118+ verifyItem(vj->m_columnVisibleItems[0][4], 16, 0, 570, false);
119+ verifyItem(vj->m_columnVisibleItems[1][6], 17, 160, 570, false);
120+ QCOMPARE(vj->implicitHeight(), 970. + 2. * 970. / 18.);
121+ }
122+
123+private Q_SLOTS:
124+ void init()
125+ {
126+ view = new QQuickView();
127+ view->setResizeMode(QQuickView::SizeRootObjectToView);
128+ view->engine()->addImportPath(BUILT_PLUGINS_DIR);
129+
130+ model = new QHeightModel();
131+ QStringList heightList;
132+ heightList << "100" << "50" << "125" << "10" << "40" << "70" << "200" << "110" << "160" << "20" << "20" << "65" << "80" << "200" << "300" << "130" << "400" << "300" << "500" << "10";
133+ model->setStringList(heightList);
134+
135+ view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/verticaljournaltest.qml"));
136+
137+ view->show();
138+ view->resize(470, 400);
139+ QTest::qWaitForWindowExposed(view);
140+
141+ vj = dynamic_cast<VerticalJournal*>(view->rootObject()->findChild<QObject*>("vj"));
142+ vj->setModel(model);
143+
144+ checkInitialPositions();
145+ }
146+
147+ void cleanup()
148+ {
149+ delete view;
150+ delete model;
151+ }
152+
153+ void testWidthResize()
154+ {
155+ view->resize(629, 400);
156+ QTRY_COMPARE(vj->width(), 629.);
157+
158+ // This is exactly the same block as above as nothing changed, just white space on the right
159+ checkInitialPositions();
160+
161+ view->resize(630, 400);
162+
163+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 4);
164+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 4);
165+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 7);
166+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 4);
167+ QTRY_COMPARE(vj->m_columnVisibleItems[3].count(), 5);
168+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
169+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 160, 0, true);
170+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, true);
171+ verifyItem(vj->m_columnVisibleItems[3][0], 3, 480, 0, true);
172+ verifyItem(vj->m_columnVisibleItems[3][1], 4, 480, 20, true);
173+ verifyItem(vj->m_columnVisibleItems[1][1], 5, 160, 60, true);
174+ verifyItem(vj->m_columnVisibleItems[3][2], 6, 480, 70, true);
175+ verifyItem(vj->m_columnVisibleItems[0][1], 7, 0, 110, true);
176+ verifyItem(vj->m_columnVisibleItems[2][1], 8, 320, 135, true);
177+ verifyItem(vj->m_columnVisibleItems[1][2], 9, 160, 140, true);
178+ verifyItem(vj->m_columnVisibleItems[1][3], 10, 160, 170, true);
179+ verifyItem(vj->m_columnVisibleItems[1][4], 11, 160, 200, true);
180+ verifyItem(vj->m_columnVisibleItems[0][2], 12, 0, 230, true);
181+ verifyItem(vj->m_columnVisibleItems[1][5], 13, 160, 275, true);
182+ verifyItem(vj->m_columnVisibleItems[3][3], 14, 480, 280, true);
183+ verifyItem(vj->m_columnVisibleItems[2][2], 15, 320, 305, true);
184+ verifyItem(vj->m_columnVisibleItems[0][3], 16, 0, 320, true);
185+ verifyItem(vj->m_columnVisibleItems[2][3], 17, 320, 445, false);
186+ verifyItem(vj->m_columnVisibleItems[1][6], 18, 160, 485, false);
187+ verifyItem(vj->m_columnVisibleItems[3][4], 19, 480, 590, false);
188+ QTRY_COMPARE(vj->implicitHeight(), 985.);
189+
190+ view->resize(470, 400);
191+
192+ // This is exactly the same block as the first again
193+ checkInitialPositions();
194+ }
195+
196+ void testColumnSpacing()
197+ {
198+ vj->setColumnSpacing(11);
199+
200+ QTRY_COMPARE(vj->m_needsRelayout, false);
201+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 2);
202+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 7);
203+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 7);
204+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
205+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 161, 0, true);
206+ verifyItem(vj->m_columnVisibleItems[1][1], 2, 161, 60, true);
207+ verifyItem(vj->m_columnVisibleItems[0][1], 3, 0, 110, true);
208+ verifyItem(vj->m_columnVisibleItems[0][2], 4, 0, 130, true);
209+ verifyItem(vj->m_columnVisibleItems[0][3], 5, 0, 180, true);
210+ verifyItem(vj->m_columnVisibleItems[1][2], 6, 161, 195, true);
211+ verifyItem(vj->m_columnVisibleItems[0][4], 7, 0, 260, true);
212+ verifyItem(vj->m_columnVisibleItems[0][5], 8, 0, 380, true);
213+ verifyItem(vj->m_columnVisibleItems[1][3], 9, 161, 405, false);
214+ verifyItem(vj->m_columnVisibleItems[1][4], 10, 161, 435, false);
215+ verifyItem(vj->m_columnVisibleItems[1][5], 11, 161, 465, false);
216+ verifyItem(vj->m_columnVisibleItems[1][6], 12, 161, 540, false);
217+ verifyItem(vj->m_columnVisibleItems[0][6], 13, 0, 550, false);
218+ QCOMPARE(vj->implicitHeight(), 750. + 6. * 750. / 14.);
219+
220+ vj->setColumnSpacing(10);
221+ QTRY_COMPARE(vj->m_needsRelayout, false);
222+
223+ // This is exactly the same block as the first again
224+ checkInitialPositions();
225+ }
226+
227+ void testRowSpacing()
228+ {
229+ vj->setRowSpacing(11);
230+
231+ QTRY_COMPARE(vj->m_needsRelayout, false);
232+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
233+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 5);
234+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 7);
235+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 6);
236+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
237+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 160, 0, true);
238+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, true);
239+ verifyItem(vj->m_columnVisibleItems[1][1], 3, 160, 61, true);
240+ verifyItem(vj->m_columnVisibleItems[1][2], 4, 160, 82, true);
241+ verifyItem(vj->m_columnVisibleItems[0][1], 5, 0, 111, true);
242+ verifyItem(vj->m_columnVisibleItems[1][3], 6, 160, 133, true);
243+ verifyItem(vj->m_columnVisibleItems[2][1], 7, 320, 136, true);
244+ verifyItem(vj->m_columnVisibleItems[0][2], 8, 0, 192, true);
245+ verifyItem(vj->m_columnVisibleItems[2][2], 9, 320, 257, true);
246+ verifyItem(vj->m_columnVisibleItems[2][3], 10, 320, 288, true);
247+ verifyItem(vj->m_columnVisibleItems[2][4], 11, 320, 319, true);
248+ verifyItem(vj->m_columnVisibleItems[1][4], 12, 160, 344, true);
249+ verifyItem(vj->m_columnVisibleItems[0][3], 13, 0, 363, true);
250+ verifyItem(vj->m_columnVisibleItems[2][5], 14, 320, 395, true);
251+ verifyItem(vj->m_columnVisibleItems[1][5], 15, 160, 435, false);
252+ verifyItem(vj->m_columnVisibleItems[0][4], 16, 0, 574, false);
253+ verifyItem(vj->m_columnVisibleItems[1][6], 17, 160, 576, false);
254+ QCOMPARE(vj->implicitHeight(), 974. + 2. * 974. / 18.);
255+
256+ vj->setRowSpacing(10);
257+ QTRY_COMPARE(vj->m_needsRelayout, false);
258+
259+ // This is exactly the same block as the first again
260+ checkInitialPositions();
261+ }
262+
263+ void testDelegateCreationRanges()
264+ {
265+ vj->setDelegateCreationBegin(200);
266+ vj->setDelegateCreationEnd(view->height());
267+
268+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
269+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 4);
270+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 4);
271+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 6);
272+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, false);
273+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, false);
274+ verifyItem(vj->m_columnVisibleItems[1][0], 4, 160, 80, false);
275+ verifyItem(vj->m_columnVisibleItems[0][1], 5, 0, 110, false);
276+ verifyItem(vj->m_columnVisibleItems[1][1], 6, 160, 130, true);
277+ verifyItem(vj->m_columnVisibleItems[2][1], 7, 320, 135, true);
278+ verifyItem(vj->m_columnVisibleItems[0][2], 8, 0, 190, true);
279+ verifyItem(vj->m_columnVisibleItems[2][2], 9, 320, 255, true);
280+ verifyItem(vj->m_columnVisibleItems[2][3], 10, 320, 285, true);
281+ verifyItem(vj->m_columnVisibleItems[2][4], 11, 320, 315, true);
282+ verifyItem(vj->m_columnVisibleItems[1][2], 12, 160, 340, true);
283+ verifyItem(vj->m_columnVisibleItems[0][3], 13, 0, 360, true);
284+ verifyItem(vj->m_columnVisibleItems[2][5], 14, 320, 390, true);
285+ verifyItem(vj->m_columnVisibleItems[1][3], 15, 160, 430, false);
286+ QCOMPARE(vj->implicitHeight(), 690. + 4. * 690. / 16.);
287+
288+ vj->resetDelegateCreationBegin();
289+ vj->resetDelegateCreationEnd();
290+
291+ // This is exactly the same block as the first again
292+ checkInitialPositions();
293+ }
294+
295+
296+ void testColumnWidthChange()
297+ {
298+ vj->setColumnWidth(200);
299+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 2);
300+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 7);
301+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 7);
302+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
303+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 210, 0, true);
304+ verifyItem(vj->m_columnVisibleItems[1][1], 2, 210, 60, true);
305+ verifyItem(vj->m_columnVisibleItems[0][1], 3, 0, 110, true);
306+ verifyItem(vj->m_columnVisibleItems[0][2], 4, 0, 130, true);
307+ verifyItem(vj->m_columnVisibleItems[0][3], 5, 0, 180, true);
308+ verifyItem(vj->m_columnVisibleItems[1][2], 6, 210, 195, true);
309+ verifyItem(vj->m_columnVisibleItems[0][4], 7, 0, 260, true);
310+ verifyItem(vj->m_columnVisibleItems[0][5], 8, 0, 380, true);
311+ verifyItem(vj->m_columnVisibleItems[1][3], 9, 210, 405, false);
312+ verifyItem(vj->m_columnVisibleItems[1][4], 10, 210, 435, false);
313+ verifyItem(vj->m_columnVisibleItems[1][5], 11, 210, 465, false);
314+ verifyItem(vj->m_columnVisibleItems[1][6], 12, 210, 540, false);
315+ verifyItem(vj->m_columnVisibleItems[0][6], 13, 0, 550, false);
316+ QCOMPARE(vj->implicitHeight(), 750. + 6. * 750. / 14.);
317+
318+ vj->setColumnWidth(150);
319+
320+ // This is exactly the same block as the first again
321+ checkInitialPositions();
322+ }
323+
324+ void testChangeModel()
325+ {
326+ QHeightModel *model2 = new QHeightModel();
327+ QStringList list2;
328+ list2 << "100" << "50" << "25" << "25" << "50" << "50";
329+ model2->setStringList(list2);
330+ vj->setModel(model2);
331+ delete model;
332+ model = model2;
333+
334+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
335+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 1);
336+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 2);
337+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 3);
338+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
339+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 160, 0, true);
340+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, true);
341+ verifyItem(vj->m_columnVisibleItems[2][1], 3, 320, 35, true);
342+ verifyItem(vj->m_columnVisibleItems[1][1], 4, 160, 60, true);
343+ verifyItem(vj->m_columnVisibleItems[2][2], 5, 320, 70, true);
344+ }
345+
346+ void testModelReset()
347+ {
348+ QStringList heightList;
349+ heightList << "100" << "50" << "50" << "30";
350+ model->setStringList(heightList);
351+
352+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
353+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 1);
354+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 2);
355+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 1);
356+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
357+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 160, 0, true);
358+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, true);
359+ verifyItem(vj->m_columnVisibleItems[1][1], 3, 160, 60, true);
360+ }
361+
362+ void testModelAppendRemoveLast()
363+ {
364+ QHeightModel *model2 = new QHeightModel();
365+ QStringList list2;
366+ list2 << "100" << "50" << "25" << "25" << "50" << "50";
367+ model2->setStringList(list2);
368+ vj->setModel(model2);
369+ delete model;
370+ model = model2;
371+
372+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
373+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 1);
374+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 2);
375+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 3);
376+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
377+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 160, 0, true);
378+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, true);
379+ verifyItem(vj->m_columnVisibleItems[2][1], 3, 320, 35, true);
380+ verifyItem(vj->m_columnVisibleItems[1][1], 4, 160, 60, true);
381+ verifyItem(vj->m_columnVisibleItems[2][2], 5, 320, 70, true);
382+
383+ model2->addString("75");
384+
385+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
386+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 2);
387+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 2);
388+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 3);
389+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
390+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 160, 0, true);
391+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, true);
392+ verifyItem(vj->m_columnVisibleItems[2][1], 3, 320, 35, true);
393+ verifyItem(vj->m_columnVisibleItems[1][1], 4, 160, 60, true);
394+ verifyItem(vj->m_columnVisibleItems[2][2], 5, 320, 70, true);
395+ verifyItem(vj->m_columnVisibleItems[0][1], 6, 0, 110, true);
396+
397+ model2->addString("50");
398+ model2->addString("50");
399+
400+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
401+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 2);
402+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 3);
403+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 4);
404+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
405+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 160, 0, true);
406+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, true);
407+ verifyItem(vj->m_columnVisibleItems[2][1], 3, 320, 35, true);
408+ verifyItem(vj->m_columnVisibleItems[1][1], 4, 160, 60, true);
409+ verifyItem(vj->m_columnVisibleItems[2][2], 5, 320, 70, true);
410+ verifyItem(vj->m_columnVisibleItems[0][1], 6, 0, 110, true);
411+ verifyItem(vj->m_columnVisibleItems[1][2], 7, 160, 120, true);
412+ verifyItem(vj->m_columnVisibleItems[2][3], 8, 320, 130, true);
413+
414+ model2->removeLast();
415+
416+ QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
417+ QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 2);
418+ QTRY_COMPARE(vj->m_columnVisibleItems[1].count(), 3);
419+ QTRY_COMPARE(vj->m_columnVisibleItems[2].count(), 3);
420+ verifyItem(vj->m_columnVisibleItems[0][0], 0, 0, 0, true);
421+ verifyItem(vj->m_columnVisibleItems[1][0], 1, 160, 0, true);
422+ verifyItem(vj->m_columnVisibleItems[2][0], 2, 320, 0, true);
423+ verifyItem(vj->m_columnVisibleItems[2][1], 3, 320, 35, true);
424+ verifyItem(vj->m_columnVisibleItems[1][1], 4, 160, 60, true);
425+ verifyItem(vj->m_columnVisibleItems[2][2], 5, 320, 70, true);
426+ verifyItem(vj->m_columnVisibleItems[0][1], 6, 0, 110, true);
427+ verifyItem(vj->m_columnVisibleItems[1][2], 7, 160, 120, true);
428+ }
429+
430+private:
431+ QQuickView *view;
432+ VerticalJournal *vj;
433+ QHeightModel *model;
434+};
435+
436+QTEST_MAIN(VerticalJournalTest)
437+
438+#include "verticaljournaltest.moc"
tests/plugins/DashViews/verticaljournaltest.qmlnew file+44
@@ -0,0 +1,44 @@
1+/*
2+ * Copyright (C) 2013 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+import QtQuick 2.1
18+import DashViews 0.1
19+
20+Item {
21+
22+ VerticalJournal {
23+ id: vj
24+ objectName: "vj"
25+ anchors.fill: parent
26+ columnWidth: 150
27+ columnSpacing: 10
28+ rowSpacing: 10
29+
30+ delegate: Rectangle {
31+ property real randomValue: Math.random()
32+ width: 150
33+ color: randomValue < 0.3 ? "green" : randomValue < 0.6 ? "blue" : "red";
34+ height: modelHeight
35+ border.width: 3
36+
37+ Text {
38+ text: index + "\ny: " + parent.y + "\nheight: " + parent.height
39+ x: 10
40+ y: 10
41+ }
42+ }
43+ }
44+}
tests/plugins/DashViews/verticaljournaltry.cppnew file+90
@@ -0,0 +1,90 @@
1+/*
2+ * Copyright (C) 2013 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+#include <QQuickView>
18+#include <QDebug>
19+#include <QGuiApplication>
20+#include <QQuickView>
21+#include <QtQml/qqml.h>
22+#include <QStringListModel>
23+#include <QQmlContext>
24+#include <QQmlEngine>
25+#include <QGuiApplication>
26+
27+#include "verticaljournal.h"
28+
29+class QHeightModel : public QStringListModel {
30+ Q_OBJECT
31+public:
32+ QHash<int, QByteArray> roleNames() const
33+ {
34+ QHash<int, QByteArray> roles;
35+ roles.insert(Qt::DisplayRole, "modelHeight");
36+ return roles;
37+ }
38+
39+public slots:
40+ void add(int height)
41+ {
42+ if (height <= 0) {
43+ height = 50 + 50. * qrand() / RAND_MAX ;
44+ }
45+ QStringList sl = stringList();
46+ sl << QString::number(height);
47+ setStringList(sl);
48+ }
49+
50+ void remove()
51+ {
52+ QStringList sl = stringList();
53+ if (!sl.isEmpty()) {
54+ sl.removeLast();
55+ setStringList(sl);
56+ }
57+ }
58+};
59+
60+int main(int argc, char *argv[])
61+{
62+ QGuiApplication a(argc, argv);
63+
64+ QQuickView *view = new QQuickView();
65+ view->setResizeMode(QQuickView::SizeRootObjectToView);
66+ view->engine()->addImportPath(BUILT_PLUGINS_DIR);
67+
68+ QHeightModel model;
69+ QStringList heightList;
70+ heightList << "100" << "50" << "125";
71+ model.setStringList(heightList);
72+
73+ QStringListModel listModel;
74+ listModel.setStringList(QStringList() << QString());
75+
76+ view->rootContext()->setContextProperty("listModel", &listModel);
77+ view->rootContext()->setContextProperty("vjModel", &model);
78+
79+ view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/verticaljournaltry.qml"));
80+
81+ view->show();
82+ view->resize(530, 400);
83+
84+ QObject::connect(view->rootObject(), SIGNAL(add(int)), &model, SLOT(add(int)));
85+ QObject::connect(view->rootObject(), SIGNAL(remove()), &model, SLOT(remove()));
86+
87+ return a.exec();
88+}
89+
90+#include "verticaljournaltry.moc"
tests/plugins/DashViews/verticaljournaltry.qmlnew file+100
@@ -0,0 +1,100 @@
1+/*
2+ * Copyright (C) 2013 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+import QtQuick 2.1
18+import DashViews 0.1
19+
20+Item {
21+ id: root
22+ signal add(int height)
23+ signal remove()
24+
25+ ListViewWithPageHeader {
26+ id: lvwph
27+ model: listModel
28+ height: parent.height
29+ width: parent.width - controls.width
30+
31+ delegate: VerticalJournal {
32+ id: vj
33+ model: vjModel
34+ columnWidth: 100
35+ columnSpacing: 10
36+ rowSpacing: 10
37+ width: parent.width
38+ height: implicitHeight > 100 ? implicitHeight : 100
39+ delegateCreationBegin: lvwph.contentY
40+ delegateCreationEnd: lvwph.contentY + lvwph.height
41+
42+ delegate: Rectangle {
43+ width: 100
44+ color: "red";
45+ height: modelHeight
46+ border.width: 3
47+
48+ Text {
49+ text: index + "\ny: " + parent.y + "\nheight: " + parent.height
50+ x: 10
51+ y: 10
52+ }
53+ }
54+ }
55+ }
56+
57+ Rectangle {
58+ id: controls
59+ height: parent.height
60+ width: 100
61+ anchors.right: parent.right
62+ color: "gray"
63+ opacity: 0.4
64+
65+ Rectangle {
66+ id: addButton
67+ height: 50
68+ width: parent.width
69+ color: "blue"
70+ Text {
71+ text: "Add"
72+ anchors.centerIn: parent
73+ }
74+ MouseArea {
75+ anchors.fill: parent
76+ onClicked: root.add(addField.text)
77+ }
78+ }
79+ TextInput {
80+ id: addField
81+ anchors.top: addButton.bottom
82+ height: 30
83+ width: parent.width
84+ }
85+ Rectangle {
86+ anchors.top: addField.bottom
87+ height: 50
88+ width: parent.width
89+ color: "red"
90+ Text {
91+ text: "Remove"
92+ anchors.centerIn: parent
93+ }
94+ MouseArea {
95+ anchors.fill: parent
96+ onClicked: root.remove()
97+ }
98+ }
99+ }
100+}
tests/plugins/Ubuntu/Gestures/CMakeLists.txt+1
@@ -3,6 +3,7 @@ include(QmlTest)
33include_directories(
44 ${CMAKE_SOURCE_DIR}/plugins/Ubuntu/Gestures
55 ${CMAKE_CURRENT_BINARY_DIR}
6+ ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
67 )
78
89file(GLOB qmlFiles *.qml)
tests/plugins/Unity/Indicators/indicatorsmanagertest.cpp+2−1
@@ -18,7 +18,8 @@
1818 */
1919
2020#include "indicatorsmanager.h"
21−#include "paths.h"
21+
22+#include <paths.h>
2223
2324#include <QtTest>
2425#include <QDebug>
tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp+2−1
@@ -19,7 +19,8 @@
1919
2020#include "indicatorsmodel.h"
2121#include "indicators.h"
22−#include "paths.h"
22+
23+#include <paths.h>
2324
2425#include <QtTest>
2526#include <QDebug>
tests/qmltests/Components/CMakeLists.txt+1
@@ -3,6 +3,7 @@
33include_directories(
44 ${CMAKE_SOURCE_DIR}/plugins/Ubuntu/Gestures
55 ${CMAKE_CURRENT_BINARY_DIR}
6+ ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
67 )
78
89set(testCommand
tests/qmltests/Components/RevealingRectangle.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19−import "../../../Components"
19+import "../../../qml/Components"
2020
2121Item {
2222 id: revealingRectangle
tests/qmltests/Components/tst_AnimationControllerWithSignals.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Components"
19+import "../../../qml/Components"
2020
2121TestCase {
2222 id: testCase
tests/qmltests/Components/tst_Carousel.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Components/carousel.js" as Carousel
19+import "../../../qml/Components/carousel.js" as Carousel
2020
2121TestCase {
2222 id: root
tests/qmltests/Components/tst_DragHandle.qml+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18−import "../../../Components"
18+import "../../../qml/Components"
1919import "tst_DragHandle"
2020import Ubuntu.Components 0.1
2121import Ubuntu.Gestures 0.1
tests/qmltests/Components/tst_DragHandle/HorizontalShowable.qml+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18−import "../../../../Components"
18+import "../../../../qml/Components"
1919import Ubuntu.Components 0.1
2020import Ubuntu.Gestures 0.1
2121
tests/qmltests/Components/tst_DragHandle/VerticalShowable.qml+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18−import "../../../../Components"
18+import "../../../../qml/Components"
1919import Ubuntu.Components 0.1
2020import Ubuntu.Gestures 0.1
2121
tests/qmltests/Components/tst_DraggingArea.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Components"
19+import "../../../qml/Components"
2020
2121/*
2222 There will be a green rectangle in the center of the
tests/qmltests/Components/tst_EdgeDemoOverlay.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
20−import "../../../Components"
20+import "../../../qml/Components"
2121
2222Item {
2323 id: root
tests/qmltests/Components/tst_FilterGrid.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Components"
19+import "../../../qml/Components"
2020import Ubuntu.Components.ListItems 0.1 as ListItem
2121import Ubuntu.Components 0.1
2222import Unity.Test 0.1 as UT
tests/qmltests/Components/tst_LazyImage.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Components"
19+import "../../../qml/Components"
2020import Ubuntu.Components 0.1
2121import Unity.Test 0.1 as UT
2222import "tst_LazyImage"
tests/qmltests/Components/tst_LazyImage/ImageControls.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19−import "../../../../Components"
19+import "../../../../qml/Components"
2020
2121Row {
2222 property LazyImage image
tests/qmltests/Components/tst_OpenEffect.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Components"
19+import "../../../qml/Components"
2020
2121TestCase {
2222 name: "OpenEffectTest"
tests/qmltests/Components/tst_PageHeader.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Components"
20+import "../../../qml/Components"
2121import Ubuntu.Components 0.1
2222import Unity 0.1
2323import Unity.Test 0.1 as UT
tests/qmltests/Components/tst_RatingStars.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Components"
19+import "../../../qml/Components"
2020
2121TestCase {
2222 name: "RatingStars"
tests/qmltests/Components/tst_ResponsiveFlowView.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Components"
20+import "../../../qml/Components"
2121import Ubuntu.Components.ListItems 0.1 as ListItem
2222import Ubuntu.Components 0.1
2323import Unity.Test 0.1 as UT
tests/qmltests/Components/tst_ResponsiveGridView.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Components"
20+import "../../../qml/Components"
2121import Ubuntu.Components.ListItems 0.1 as ListItem
2222import Ubuntu.Components 0.1
2323import Unity.Test 0.1 as UT
tests/qmltests/Components/tst_Showable.qml+1−1
@@ -19,7 +19,7 @@ import QtTest 1.0
1919import Ubuntu.Components 0.1
2020import Unity.Test 0.1 as UT
2121import ".."
22−import "../../../Components"
22+import "../../../qml/Components"
2323
2424/*
2525 There will be 3 stacked rectangles, red, green & blue. Initially they
tests/qmltests/Components/tst_Stage.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Components"
20+import "../../../qml/Components"
2121import Unity.Application 0.1
2222import Ubuntu.Components 0.1
2323import Unity.Test 0.1 as UT
tests/qmltests/Components/tst_Tile.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Components"
20+import "../../../qml/Components"
2121import Ubuntu.Components 0.1
2222import Unity.Test 0.1 as UT
2323
tests/qmltests/Dash/Apps/tst_AppPreview.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import Ubuntu.Components 0.1
20−import "../../../../Dash/Apps"
20+import "../../../../qml/Dash/Apps"
2121import Unity.Test 0.1 as UT
2222
2323Item {
tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../../Dash/Apps"
19+import "../../../../qml/Dash/Apps"
2020import Unity.Test 0.1 as UT
2121
2222Item {
tests/qmltests/Dash/Movie/tst_MoviePreview.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../../Dash/Movie"
19+import "../../../../qml/Dash/Movie"
2020import Unity.Test 0.1 as UT
2121
2222Item {
tests/qmltests/Dash/Music/tst_MusicPreview.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../../Dash/Music"
19+import "../../../../qml/Dash/Music"
2020import Unity.Test 0.1 as UT
2121import QtMultimedia 5.0
2222
tests/qmltests/Dash/qml/FakeScopeView.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import Unity 0.1
1919
20−import "../../../../Dash"
20+import "../../../../qml/Dash"
2121
2222GenericScopeView {
2323 id: fakeScopeView
tests/qmltests/Dash/tst_Dash.qml+6−6
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Dash"
19+import "../../../qml/Dash"
2020import Ubuntu.Components 0.1
2121import Unity.Test 0.1 as UT
2222
@@ -36,12 +36,12 @@ Item {
3636 ScopeDelegateMapper {
3737 id: scopeDelegateMapper
3838 scopeDelegateMapping: {
39− "MockScope1": "../tests/qmltests/Dash/qml/fake_scopeView1.qml",
40− "MockScope2": "../tests/qmltests/Dash/qml/fake_scopeView2.qml",
41− "home.scope": "../tests/qmltests/Dash/qml/fake_scopeView3.qml",
42− "applications.scope": "../tests/qmltests/Dash/qml/fake_scopeView4.qml"
39+ "MockScope1": Qt.resolvedUrl("qml/fake_scopeView1.qml"),
40+ "MockScope2": Qt.resolvedUrl("qml/fake_scopeView2.qml"),
41+ "home.scope": Qt.resolvedUrl("qml/fake_scopeView3.qml"),
42+ "applications.scope": Qt.resolvedUrl("qml/fake_scopeView4.qml")
4343 }
44− genericScope: "../tests/qmltests/Dash/qml/fake_generic_scopeView.qml"
44+ genericScope: Qt.resolvedUrl("qml/fake_generic_scopeView.qml")
4545 }
4646
4747 UT.UnityTestCase {
tests/qmltests/Dash/tst_DashBar.qml+1−1
@@ -18,7 +18,7 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity 0.1
2020import ".."
21−import "../../../Dash"
21+import "../../../qml/Dash"
2222import Ubuntu.Components 0.1
2323import Unity.Test 0.1 as UT
2424
tests/qmltests/Dash/tst_DashContent.qml+6−6
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Dash"
19+import "../../../qml/Dash"
2020import Ubuntu.Components 0.1
2121import Unity 0.1
2222import Unity.Test 0.1 as UT
@@ -64,12 +64,12 @@ Item {
6464 ScopeDelegateMapper {
6565 id: scopeDelegateMapper
6666 scopeDelegateMapping: {
67− "MockScope1": "../tests/qmltests/Dash/qml/fake_scopeView1.qml",
68− "MockScope2": "../tests/qmltests/Dash/qml/fake_scopeView2.qml",
69− "home.scope": "../tests/qmltests/Dash/qml/fake_scopeView3.qml",
70− "applications.scope": "../tests/qmltests/Dash/qml/fake_scopeView4.qml"
67+ "MockScope1": Qt.resolvedUrl("qml/fake_scopeView1.qml"),
68+ "MockScope2": Qt.resolvedUrl("qml/fake_scopeView2.qml"),
69+ "home.scope": Qt.resolvedUrl("qml/fake_scopeView3.qml"),
70+ "applications.scope": Qt.resolvedUrl("qml/fake_scopeView4.qml")
7171 }
72− genericScope: "../tests/qmltests/Dash/qml/fake_generic_scopeView.qml"
72+ genericScope: Qt.resolvedUrl("qml/fake_generic_scopeView.qml")
7373 }
7474
7575 function clear_scope_status() {
tests/qmltests/Dash/tst_DashPreview.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Dash"
20+import "../../../qml/Dash"
2121import Ubuntu.Components 0.1
2222import Unity.Test 0.1 as UT
2323
tests/qmltests/Dash/tst_FilterGrids.qml+3−3
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Dash/Video"
19+import "../../../qml/Dash/Video"
2020import Ubuntu.Components.ListItems 0.1 as ListItem
2121import Ubuntu.Components 0.1
2222import Unity.Test 0.1 as UT
@@ -46,7 +46,7 @@ Rectangle {
4646 Button {
4747 anchors {left: parent.left; right: parent.right; margins: units.gu(1) }
4848 text: testCase.test_clicked_signal_data()[index].tag
49− onClicked: gridLoader.source = "../../../Dash/" + testCase.test_clicked_signal_data()[index].component
49+ onClicked: gridLoader.source = "../../../qml/Dash/" + testCase.test_clicked_signal_data()[index].component
5050 }
5151 }
5252 }
@@ -114,7 +114,7 @@ Rectangle {
114114
115115 function test_clicked_signal(data) {
116116 gridLoader.source = "";
117− gridLoader.source = "../../../Dash/" + data.component;
117+ gridLoader.source = "../../../qml/Dash/" + data.component;
118118
119119 // Wait until the FilterGrid is loaded by the loader
120120 tryCompare(gridLoader, "status", Loader.Ready);
tests/qmltests/Dash/tst_GenericPreview.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import "../../../Dash/Generic"
19+import "../../../qml/Dash/Generic"
2020import Unity.Test 0.1 as UT
2121
2222Item {
tests/qmltests/Dash/tst_GenericScopeView.qml+2−2
@@ -18,8 +18,8 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity 0.1
2020import ".."
21−import "../../../Dash"
22−import "../../../Components"
21+import "../../../qml/Dash"
22+import "../../../qml/Components"
2323import Ubuntu.Components 0.1
2424import Unity.Test 0.1 as UT
2525
tests/qmltests/Greeter/tst_Clock.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Greeter"
20+import "../../../qml/Greeter"
2121import Ubuntu.Components 0.1
2222import QMenuModel 0.1
2323import Unity.Test 0.1 as UT
tests/qmltests/Greeter/tst_Infographics.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Greeter"
20+import "../../../qml/Greeter"
2121import Ubuntu.Components 0.1
2222import Unity.Test 0.1 as UT
2323import LightDM 0.1 as LightDM
tests/qmltests/Greeter/tst_Lockscreen.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Greeter"
20+import "../../../qml/Greeter"
2121import Ubuntu.Components 0.1
2222import LightDM 0.1 as LightDM
2323import Unity.Test 0.1 as UT
tests/qmltests/Greeter/tst_Phone.qml+3−3
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Greeter"
20+import "../../../qml/Greeter"
2121import AccountsService 0.1
2222import LightDM 0.1 as LightDM
2323import Ubuntu.Components 0.1
@@ -33,7 +33,7 @@ Item {
3333 height: parent.height
3434 x: 0; y: 0
3535
36− defaultBackground: "../../../graphics/phone_background.jpg"
36+ defaultBackground: Qt.resolvedUrl("../../../qml/graphics/phone_background.jpg")
3737
3838 property int minX: 0
3939
@@ -135,7 +135,7 @@ Item {
135135
136136 function test_background_data() {
137137 return [
138− {tag: "set", accounts: "../tests/data/unity/backgrounds/blue.png", expected: "blue.png"},
138+ {tag: "set", accounts: Qt.resolvedUrl("../../data/unity/backgrounds/blue.png"), expected: "blue.png"},
139139 {tag: "unset", accounts: "", expected: "background.jpg"},
140140 {tag: "invalid", accounts: "invalid", expected: "background.jpg"},
141141 ]
tests/qmltests/Greeter/tst_Tablet.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Greeter"
20+import "../../../qml/Greeter"
2121import Ubuntu.Components 0.1
2222import LightDM 0.1 as LightDM
2323import Unity.Test 0.1 as UT
tests/qmltests/Hud/tst_Hud.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Hud"
20+import "../../../qml/Hud"
2121import HudClient 0.1
2222import Unity.Test 0.1 as UT
2323
tests/qmltests/Hud/tst_Result.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Hud"
20+import "../../../qml/Hud"
2121import Unity.Test 0.1 as UT
2222
2323Rectangle {
tests/qmltests/Launcher/tst_Launcher.qml+1−1
@@ -18,7 +18,7 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
21−import "../../../Launcher"
21+import "../../../qml/Launcher"
2222import Unity.Launcher 0.1
2323
2424/* Nothing is shown at first. If you drag from left edge you will bring up the
tests/qmltests/Notifications/tst_Notifications.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Notifications"
20+import "../../../qml/Notifications"
2121import Ubuntu.Components 0.1
2222import Unity.Test 0.1
2323import Unity.Notifications 1.0
tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml+1−1
@@ -18,7 +18,7 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import QMenuModel 0.1
21−import "../../../../Panel/Indicators"
21+import "../../../../qml/Panel/Indicators"
2222
2323Item {
2424 id: testView
tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml+1−1
@@ -18,7 +18,7 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import QMenuModel 0.1
21−import "../../../../Panel/Indicators"
21+import "../../../../qml/Panel/Indicators"
2222
2323Item {
2424 id: testView
tests/qmltests/Panel/tst_IndicatorItem.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Panel"
20+import "../../../qml/Panel"
2121import Ubuntu.Components 0.1
2222import Unity.Test 0.1 as UT
2323
tests/qmltests/Panel/tst_IndicatorRow.qml+1−1
@@ -18,7 +18,7 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
21−import "../../../Panel"
21+import "../../../qml/Panel"
2222import Unity.Indicators 0.1 as Indicators
2323
2424/*
tests/qmltests/Panel/tst_Indicators.qml+2−2
@@ -18,8 +18,8 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
21−import "../../../Panel"
22−import "../../../Components"
21+import "../../../qml/Panel"
22+import "../../../qml/Components"
2323
2424/*
2525 This tests the Indicators component by using a fake model to stage data in the indicators
tests/qmltests/Panel/tst_MenuContent.qml+1−1
@@ -18,7 +18,7 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
21−import "../../../Panel"
21+import "../../../qml/Panel"
2222import Unity.Indicators 0.1 as Indicators
2323
2424Item {
tests/qmltests/Panel/tst_Panel.qml+1−1
@@ -18,7 +18,7 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
21−import "../../../Panel"
21+import "../../../qml/Panel"
2222
2323/*
2424 This tests the Panel component using a fake model to stage data in the indicators
tests/qmltests/Panel/tst_SearchIndicator.qml+1−1
@@ -17,7 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
20−import "../../../Panel"
20+import "../../../qml/Panel"
2121import Ubuntu.Components 0.1
2222import Unity.Test 0.1 as UT
2323
tests/qmltests/SideStage/tst_SideStage.qml+1−1
@@ -18,7 +18,7 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
21−import "../../../SideStage"
21+import "../../../qml/SideStage"
2222import Ubuntu.Components 0.1
2323
2424UT.UnityTestCase {
tests/qmltests/tst_Shell.qml+3−3
@@ -24,7 +24,7 @@ import Unity.Application 0.1
2424import Unity.Test 0.1 as UT
2525import Powerd 0.1
2626
27−import "../.."
27+import "../../qml"
2828
2929Item {
3030 width: shell.width
@@ -469,8 +469,8 @@ Item {
469469
470470 function test_background_data() {
471471 return [
472− {tag: "red", url: "tests/data/unity/backgrounds/red.png", expectedUrl: "tests/data/unity/backgrounds/red.png"},
473− {tag: "blue", url: "tests/data/unity/backgrounds/blue.png", expectedUrl: "tests/data/unity/backgrounds/blue.png"},
472+ {tag: "red", url: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), expectedUrl: "tests/data/unity/backgrounds/red.png"},
473+ {tag: "blue", url: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), expectedUrl: "tests/data/unity/backgrounds/blue.png"},
474474 {tag: "invalid", url: "invalid", expectedUrl: shell.defaultBackground},
475475 {tag: "empty", url: "", expectedUrl: shell.defaultBackground}
476476 ]
tests/uqmlscene/CMakeLists.txt+6−1
@@ -1,12 +1,17 @@
11add_executable(uqmlscene
22 ${shellapplication_MOC_SRCS}
33 main.cpp
4− ../../MouseTouchAdaptor.cpp
4+ ${CMAKE_SOURCE_DIR}/src/MouseTouchAdaptor.cpp
55 )
66
77qt5_use_modules(uqmlscene Qml Quick Test)
88pkg_check_modules(XCB REQUIRED xcb)
99
10+include_directories(
11+ ${CMAKE_SOURCE_DIR}/src
12+ ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
13+)
14+
1015if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
1116 set_target_properties(uqmlscene PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
1217endif()
tests/uqmlscene/main.cpp+1−1
@@ -63,7 +63,7 @@
6363#include <QtCore/QTranslator>
6464#include <QtCore/QLibraryInfo>
6565
66−#include "../../MouseTouchAdaptor.h"
66+#include <MouseTouchAdaptor.h>
6767
6868#ifdef QML_RUNTIME_TESTING
6969class RenderStatistics
tests/utils/modules/Unity/Test/CMakeLists.txt+4
@@ -1,5 +1,9 @@
11add_definitions(-DQT_NO_KEYWORDS)
22
3+include_directories(
4+ ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
5+)
6+
37set(UnityTestQML_SOURCES
48 testutil.cpp
59 plugin.cpp