diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2016-04-21 15:24:55 +1000 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2016-04-21 15:24:55 +1000 |
commit | 10677701f9f1f9a58486e686020b0d26d8d6a5a2 (patch) | |
tree | bfeaf62c4ffc9df9f31d8e8779cf502accd19ca3 | |
parent | a0813e5f16b9ef7e1f40fb72720282fc8a9daa44 (diff) | |
download | tdepowersave-10677701f9f1f9a58486e686020b0d26d8d6a5a2.tar.gz tdepowersave-10677701f9f1f9a58486e686020b0d26d8d6a5a2.zip |
Fixed ESC handling in inactivity dialog. This resolves bug 2632.
(partially cherry-picked from fab0d1579f8be4859958217e7b632acfbf191de2)
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | src/countdowndialog.cpp | 13 | ||||
-rw-r--r-- | src/countdowndialog.h | 6 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/countdowndialog.cpp b/src/countdowndialog.cpp index 99b519e..6393875 100644 --- a/src/countdowndialog.cpp +++ b/src/countdowndialog.cpp @@ -146,6 +146,19 @@ void countDownDialog::pB_cancel_pressed() { kdDebugFuncOut(trace); } +void countDownDialog::reject() { + kdDebugFuncIn(trace); + + if (PROGRESS->isActive()) + PROGRESS->stop(); + + chancel = true; + + countdown_Dialog::reject(); + + kdDebugFuncOut(trace); +} + /*! * \b TQT_SLOT to handle the change of the progressbar. */ diff --git a/src/countdowndialog.h b/src/countdowndialog.h index ed8778b..ca1164c 100644 --- a/src/countdowndialog.h +++ b/src/countdowndialog.h @@ -72,9 +72,11 @@ private slots: //! to update the progressbar void updateProgress(); - //! to catch the event if the 'Chancel' button get pressed + //! to catch the event if the 'Cancel' button get pressed void pB_cancel_pressed(); - + //! to catch ESC presses + void reject(); + signals: //! emited if the dialog get closed void dialogClosed( bool result); |