Here is the actual QML code contained in the example click package:
import QtQuick 2.4
import QtQuick.Window 2.2
QtObject {
readonly property var allWindows: []
property var windowFactory: Component {
Window {
onClosing: destroy()
Component.onCompleted: allWindows.push(this)
Component.onDestruction: {
for (var w in allWindows) {
if (this === allWindows[w]) {
allWindows.splice(w, 1)
return
}
}
}
Rectangle {
anchors {
fill: parent
margins: 20
}
color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
}
MouseArea {
anchors.fill: parent
onClicked: windowFactory.createObject(null).show()
}
}
}
property var applicationMonitor: Connections {
target: Qt.application
onAboutToQuit: console.log("quitting application, %1 windows
open".arg(allWindows.length))
}
Component.onCompleted: windowFactory.createObject(null).show()
}
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity8 in Ubuntu.
https://bugs.launchpad.net/bugs/1622717
Title:
"Quit" from quicklist doesn’t close all open windows, doesn’t actually
quit the application
Status in unity8 package in Ubuntu:
New
Bug description:
I’m attaching a sample click application that contains a simple qml
scene that opens several windows. This can be installed on a device
with:
pkcon install-local --allow-untrusted fubar.osomon_0.4_all.click
Initially, only one window is open, and tapping on any window opens
one more window.
If I reveal the launcher and long press on the app’s icon to select
the "Quit" option, not all windows are closed:
- if there is only one window open, it’s closed and the application
successfully exits
- if there are two windows open, only the second window is closed, the first
one remains open (and consequently the application is still running)
- if there are three windows open, only the first and third one are closed,
the second one remains…
Expected behaviour: when "Quit" is tapped, all open windows are
closed, and the application exits.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1622717/+subscriptions
--
Mailing list: https://launchpad.net/~touch-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help : https://help.launchpad.net/ListHelp