39 lines
1.0 KiB
QML
39 lines
1.0 KiB
QML
import QtQuick 2.2
|
|
import Sailfish.Silica 1.0
|
|
import "cover"
|
|
import "components"
|
|
|
|
ApplicationWindow {
|
|
id: appWindow
|
|
|
|
// Cover data — pushed from the current page, bound into the cover component.
|
|
property string coverText: ""
|
|
|
|
cover: Component {
|
|
CoverPage {
|
|
coverText: appWindow.coverText
|
|
}
|
|
}
|
|
|
|
// Empty placeholder page: the real MainPage is pushed with the dav client
|
|
// via replace() below. A real MainPage here would instantiate once WITHOUT
|
|
// dav and log spurious Connections warnings ("Cannot assign to non-existent
|
|
// property onFailed/onListReady/...").
|
|
initialPage: Component { Page { } }
|
|
|
|
DavClient {
|
|
id: davClient
|
|
}
|
|
|
|
pageStack.onCurrentPageChanged: {
|
|
var page = pageStack.currentPage
|
|
if (page && page.hasOwnProperty("coverText")) {
|
|
appWindow.coverText = page.coverText
|
|
}
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
pageStack.replace(Qt.resolvedUrl("pages/MainPage.qml"), { dav: davClient })
|
|
}
|
|
}
|