From 1aa0da749e996fa49cbfecedc10a52f38fdf3723 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Heli=20Hyv=C3=A4ttinen?= Date: Tue, 23 Aug 2011 22:06:14 +0300 Subject: [PATCH] Asks confirmation upon quitting the game --- qml/ClocksPage.qml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/qml/ClocksPage.qml b/qml/ClocksPage.qml index 0c05d5b..f3664fa 100644 --- a/qml/ClocksPage.qml +++ b/qml/ClocksPage.qml @@ -51,7 +51,14 @@ Page tools: ToolBarLayout { - ToolIcon { iconId: "toolbar-back"; onClicked: pageStack.pop() } + ToolIcon + { + iconId: "toolbar-back" + onClicked: + { + confirmationDialog.open() + } + } ToolIcon { @@ -74,5 +81,15 @@ Page } + QueryDialog + { + id: confirmationDialog + titleText: "Quit?" + message: "Are you sure you want to quit the game?" + acceptButtonText: "Quit" + rejectButtonText: "Continue play" + + onAccepted: pageStack.pop() + } } -- 1.7.9.5