From: sungmin ha Date: Thu, 20 Aug 2015 05:55:23 +0000 (+0900) Subject: shortcut: modified default close shortcut X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~40^2~183 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97a28ab7d386b2fb8fab6f75396e090e546c9fce;p=sdk%2Femulator%2Fqemu.git shortcut: modified default close shortcut removed force close shortcut Change-Id: I1dcbe45fe2ebe5a14f725468e30cbbe5d46807f9 Signed-off-by: sungmin ha --- diff --git a/tizen/src/ui/mainwindow.cpp b/tizen/src/ui/mainwindow.cpp index 84fc6fd553..a70c8957f5 100644 --- a/tizen/src/ui/mainwindow.cpp +++ b/tizen/src/ui/mainwindow.cpp @@ -527,13 +527,15 @@ MainWindow::~MainWindow() void MainWindow::closeEvent(QCloseEvent *event) { int result = QMessageBox::question(this, EMULATOR_TITLE, - MSG_CLOSE_POPUP, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No); + MSG_FORCE_CLOSE_POPUP, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default); if (result == QMessageBox::Yes) { /* force close */ + qDebug() << "exit!"; qemu_system_graceful_shutdown_request(TIMEOUT_FOR_SHUTDOWN); event->accept(); } else { + qDebug() << "cancel"; event->ignore(); } } diff --git a/tizen/src/ui/menu/contextmenu.cpp b/tizen/src/ui/menu/contextmenu.cpp index dbbb486e37..2ba7dca17f 100644 --- a/tizen/src/ui/menu/contextmenu.cpp +++ b/tizen/src/ui/menu/contextmenu.cpp @@ -999,37 +999,7 @@ void ContextMenu::slotForceClose() { qDebug("force close"); - QMessageBox *msgBox = showMsgBox(QMessageBox::Question, - MSG_FORCE_CLOSE_POPUP, - QMessageBox::No | QMessageBox::Yes, QMessageBox::No); - - connect(msgBox, SIGNAL(buttonClicked(QAbstractButton *)), - this, SLOT(slotForceCloseSelected(QAbstractButton *))); -} - -void ContextMenu::slotForceCloseSelected(QAbstractButton *button) -{ - QMessageBox *msgBox = (QMessageBox *)button->parent()->parent(); - if (msgBox == NULL) { - qWarning() << "invalid slot call"; - return; - } - - switch(msgBox->standardButton(button)) { - case QMessageBox::Yes: - qDebug() << "exit!"; - qemu_system_graceful_shutdown_request(3); - - break; - case QMessageBox::No: - qDebug() << "cancel"; - - break; - default: - /* do nothing */ - qWarning() << "invalid return value"; - break; - } + parent->close(); } void ContextMenu::slotPwkeyRelease() diff --git a/tizen/src/ui/menu/contextmenu.h b/tizen/src/ui/menu/contextmenu.h index 1d9d3dfa74..e19f5114df 100644 --- a/tizen/src/ui/menu/contextmenu.h +++ b/tizen/src/ui/menu/contextmenu.h @@ -97,7 +97,6 @@ public slots: void slotAbout(); void slotForceClose(); - void slotForceCloseSelected(QAbstractButton *); void slotClose(); void slotPwkeyRelease(); diff --git a/tizen/src/ui/resource/skins/mobile-320x480-3btn/layout.xml b/tizen/src/ui/resource/skins/mobile-320x480-3btn/layout.xml index 9a50f946ff..f38d8c76e6 100644 --- a/tizen/src/ui/resource/skins/mobile-320x480-3btn/layout.xml +++ b/tizen/src/ui/resource/skins/mobile-320x480-3btn/layout.xml @@ -220,7 +220,6 @@ - Ctrl+F4 @@ -232,7 +231,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/mobile/mobile-480x800-3btn/layout.xml b/tizen/src/ui/resource/skins/mobile/mobile-480x800-3btn/layout.xml index 57fb37d2db..dc89dee990 100644 --- a/tizen/src/ui/resource/skins/mobile/mobile-480x800-3btn/layout.xml +++ b/tizen/src/ui/resource/skins/mobile/mobile-480x800-3btn/layout.xml @@ -220,7 +220,6 @@ - Ctrl+F4 @@ -232,7 +231,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/mobile/mobile-540x960-3btn/layout.xml b/tizen/src/ui/resource/skins/mobile/mobile-540x960-3btn/layout.xml index 7e06325f85..f100fb3870 100644 --- a/tizen/src/ui/resource/skins/mobile/mobile-540x960-3btn/layout.xml +++ b/tizen/src/ui/resource/skins/mobile/mobile-540x960-3btn/layout.xml @@ -220,7 +220,6 @@ - Ctrl+F4 @@ -232,7 +231,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/mobile/mobile-720x1280-3btn/layout.xml b/tizen/src/ui/resource/skins/mobile/mobile-720x1280-3btn/layout.xml index d9b226ccab..b0693a09bc 100644 --- a/tizen/src/ui/resource/skins/mobile/mobile-720x1280-3btn/layout.xml +++ b/tizen/src/ui/resource/skins/mobile/mobile-720x1280-3btn/layout.xml @@ -220,7 +220,6 @@ - Ctrl+F4 @@ -232,7 +231,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/mobile/mobile-general-3btn/layout.xml b/tizen/src/ui/resource/skins/mobile/mobile-general-3btn/layout.xml index c5c079e9af..eeb0b5a682 100644 --- a/tizen/src/ui/resource/skins/mobile/mobile-general-3btn/layout.xml +++ b/tizen/src/ui/resource/skins/mobile/mobile-general-3btn/layout.xml @@ -59,7 +59,6 @@ - Ctrl+F4 @@ -71,7 +70,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/tv/tv-1920x1080/layout.xml b/tizen/src/ui/resource/skins/tv/tv-1920x1080/layout.xml index d9278f412e..0cb67a8ce3 100644 --- a/tizen/src/ui/resource/skins/tv/tv-1920x1080/layout.xml +++ b/tizen/src/ui/resource/skins/tv/tv-1920x1080/layout.xml @@ -43,7 +43,6 @@ - Ctrl+F4 @@ -55,7 +54,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/wearable-360x360-1btn/layout.xml b/tizen/src/ui/resource/skins/wearable-360x360-1btn/layout.xml index ef4cfda463..19a893dd66 100644 --- a/tizen/src/ui/resource/skins/wearable-360x360-1btn/layout.xml +++ b/tizen/src/ui/resource/skins/wearable-360x360-1btn/layout.xml @@ -90,7 +90,6 @@ - Ctrl+F4 @@ -102,7 +101,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/wearable/wearable-320x320-1btn/layout.xml b/tizen/src/ui/resource/skins/wearable/wearable-320x320-1btn/layout.xml index 0ca3874630..ce6b4004ab 100644 --- a/tizen/src/ui/resource/skins/wearable/wearable-320x320-1btn/layout.xml +++ b/tizen/src/ui/resource/skins/wearable/wearable-320x320-1btn/layout.xml @@ -90,7 +90,6 @@ - Ctrl+F4 @@ -102,7 +101,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/wearable/wearable-360x480-1btn/layout.xml b/tizen/src/ui/resource/skins/wearable/wearable-360x480-1btn/layout.xml index 3633127c62..97c15d950d 100644 --- a/tizen/src/ui/resource/skins/wearable/wearable-360x480-1btn/layout.xml +++ b/tizen/src/ui/resource/skins/wearable/wearable-360x480-1btn/layout.xml @@ -90,7 +90,6 @@ - Ctrl+F4 @@ -102,7 +101,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/wearable/wearable-general-1btn/layout.xml b/tizen/src/ui/resource/skins/wearable/wearable-general-1btn/layout.xml index 06b2823396..af6fb1c48a 100644 --- a/tizen/src/ui/resource/skins/wearable/wearable-general-1btn/layout.xml +++ b/tizen/src/ui/resource/skins/wearable/wearable-general-1btn/layout.xml @@ -49,7 +49,6 @@ - Ctrl+F4 @@ -61,7 +60,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/wearableO-360x360-1btn/layout.xml b/tizen/src/ui/resource/skins/wearableO-360x360-1btn/layout.xml index 945f9b2935..28e761c807 100644 --- a/tizen/src/ui/resource/skins/wearableO-360x360-1btn/layout.xml +++ b/tizen/src/ui/resource/skins/wearableO-360x360-1btn/layout.xml @@ -98,7 +98,6 @@ - Ctrl+F4 @@ -110,7 +109,7 @@ - F4 + Ctrl+F4 diff --git a/tizen/src/ui/resource/skins/wearableO-360x360-2btn/layout.xml b/tizen/src/ui/resource/skins/wearableO-360x360-2btn/layout.xml index ba1248c60b..92f576d3d8 100644 --- a/tizen/src/ui/resource/skins/wearableO-360x360-2btn/layout.xml +++ b/tizen/src/ui/resource/skins/wearableO-360x360-2btn/layout.xml @@ -122,7 +122,6 @@ - Ctrl+F4 @@ -134,7 +133,7 @@ - F4 + Ctrl+F4