Wladimir J. van der Laan
2c14c1fa2f
Merge #13791 : gui: Reject dialogs if key escape is pressed
...
7bf22bf0c21d13557ec46a67413819ebcabc3df0 gui: Reject options dialog when key escape is pressed (João Barbosa)
4a43306a4f643cf0d356d5d5e16913541f1bc893 gui: Reject edit address dialog when key escape is pressed (João Barbosa)
f7a553177d4b969956bc04a0140fce34958971f5 gui: Add GUIUtil::ItemDelegate with keyEscapePressed signal (João Barbosa)
Pull request description:
Currently `EditAddressDialog` and `OptionsDialog` don't close when the escape key is pressed. The `QDataWidgetMapper` instances prevents closing the dialogs because the escape key is used to reset the widgets values. More details and workarounds in https://stackoverflow.com/a/51487847 and http://qtramblings.blogspot.com/2010/10/qdatawidgetmapper-annoyances.html .
The adopted solution is different from the above references. It turns out that `QDataWidgetMapper::setItemDelegate` sets the event filter for all mapped widgets. So in this PR the mapper's delegate are changed to a custom `GUIUtil::ItemDelegate` that offers the signal `keyEscapePressed`, which is connected to the `QDialog::reject` slot.
Note that the installed event filter lets all events pass, so the current behaviour isn't changed, meaning that widgets values are reset in addition to closing the dialog.
Tree-SHA512: 9c961d488480b4ccc3880a11a8f1824b65f77570ee8918c7302c62775a1a73e52ae988a31a55ffff87b4170ddbecf833c2f09b66095c00eb6854a4d43f030f1f
2018-08-02 12:59:39 +02:00
..
2018-07-31 11:31:07 -07:00
2018-07-25 07:30:28 +08:00
2018-07-24 20:46:23 +01:00
2018-07-09 21:17:18 +02:00
2018-06-25 00:08:49 -04:00
2018-07-30 18:01:20 -07:00
2018-02-16 08:59:28 -05:00
2018-07-05 18:40:58 +02:00
2018-06-10 13:38:38 -07:00
2018-07-30 23:13:04 +01:00
2018-08-01 20:06:17 +02:00
2018-08-01 20:06:17 +02:00
2017-09-29 16:02:39 +02:00
2018-05-03 21:47:40 +02:00
2018-08-01 20:06:17 +02:00
2018-02-10 09:55:54 -05:00
2018-08-01 12:03:20 -04:00
2018-07-05 08:02:22 +02:00
2018-04-13 15:37:20 -04:00
2018-04-23 14:25:28 +02:00
2018-01-03 02:26:56 +09:00
2018-07-24 20:46:23 +01:00
2018-07-24 20:46:23 +01:00
2018-03-01 11:49:35 +09:00
2018-06-05 02:16:24 -07:00
2018-03-21 11:57:57 +08:00
2018-02-19 18:55:21 -08:00
2018-04-12 17:52:33 -07:00
2018-03-22 16:23:04 +01:00
2018-07-20 14:24:47 -04:00
2018-07-07 14:25:09 +02:00
2018-07-30 18:01:20 -07:00
2018-01-03 02:26:56 +09:00
2018-03-22 16:23:04 +01:00
2018-07-24 20:46:23 +01:00
2018-07-24 20:46:23 +01:00
2018-01-03 02:26:56 +09:00
2018-05-14 18:36:39 -07:00
2018-07-30 15:49:23 -04:00
2018-07-29 13:30:41 -04:00
2018-07-17 13:56:21 -04:00
2018-05-09 12:21:05 -04:00
2018-02-11 10:48:15 +01:00
2018-03-06 19:52:19 +00:00
2018-03-06 19:52:19 +00:00
2018-07-24 20:46:23 +01:00
2018-07-24 20:46:23 +01:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-07-24 20:46:23 +01:00
2018-04-16 13:24:14 -07:00
2018-03-21 14:17:18 -07:00
2018-04-05 08:20:37 -07:00
2018-07-16 16:08:24 -07:00
2018-01-03 02:26:56 +09:00
2018-07-25 07:09:33 -04:00
2018-07-16 16:08:24 -07:00
2018-03-27 00:37:20 +02:00
2018-04-07 12:29:48 -04:00
2018-04-25 11:25:05 -07:00
2017-11-16 08:23:01 +13:00
2018-01-03 02:26:56 +09:00
2018-03-13 17:04:31 -07:00
2018-07-24 20:46:23 +01:00
2018-01-03 02:26:56 +09:00
2018-07-30 16:30:54 +02:00
2018-07-27 13:19:03 +02:00
2018-08-02 01:16:41 +03:00
2018-06-25 00:08:49 -04:00
2018-03-07 07:04:07 -08:00
2018-03-22 16:23:04 +01:00
2018-05-19 11:16:00 -04:00
2018-05-19 11:16:00 -04:00
2018-05-05 00:43:04 -04:00
2018-07-12 00:48:49 +02:00
2018-07-24 20:46:23 +01:00
2018-05-07 13:39:19 +02:00
2018-05-02 11:25:20 +02:00
2018-07-27 11:52:45 -07:00
2018-07-11 11:44:10 +02:00
2017-07-13 12:49:05 -04:00
2018-07-24 20:46:23 +01:00
2018-06-06 17:36:53 -04:00
2018-07-27 11:52:45 -07:00
2018-04-02 18:31:52 +00:00
2018-01-03 02:26:56 +09:00
2018-06-14 09:54:41 -04:00
2018-07-10 18:12:57 +02:00
2018-05-05 16:51:22 +02:00
2018-07-25 15:23:53 -04:00
2018-07-13 20:10:55 -07:00
2018-07-31 17:02:42 -04:00
2018-07-27 13:19:03 +02:00
2018-07-27 08:41:20 +02:00
2018-07-02 16:41:13 +02:00
2018-07-22 21:34:45 +02:00
2018-03-11 10:49:04 +01:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-07-10 00:06:19 +10:00
2018-07-10 00:06:19 +10:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-02-27 13:27:51 -08:00
2018-02-17 21:28:50 +11:00
2018-04-10 20:54:33 +02:00
2018-07-21 05:35:16 +03:00
2018-07-13 14:27:31 -07:00
2018-05-24 09:51:47 +02:00
2018-03-22 12:21:46 -04:00
2018-05-30 12:23:44 +09:00
2018-07-24 20:46:23 +01:00
2018-01-03 02:26:56 +09:00
2018-08-01 12:19:45 -04:00
2018-07-24 20:46:23 +01:00
2018-06-25 00:08:49 -04:00
2018-06-25 00:08:49 -04:00
2018-07-27 11:52:18 -07:00
2018-07-24 20:46:23 +01:00
2018-05-22 06:31:26 -04:00
2018-07-25 10:31:27 -04:00
2018-04-25 11:25:09 -07:00
2018-04-25 11:25:09 -07:00
2018-07-25 10:31:27 -04:00
2018-05-14 08:46:54 -04:00
2018-07-24 20:46:23 +01:00
2018-03-21 08:34:44 +02:00
2018-07-27 13:19:03 +02:00
2018-02-08 14:35:29 -05:00
2018-07-27 13:19:03 +02:00
2018-07-27 13:19:03 +02:00
2018-07-29 08:04:06 -04:00
2018-07-29 08:04:06 -04:00
2018-01-03 02:26:56 +09:00
2018-05-22 16:56:20 +01:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-03-21 11:17:43 -04:00
2018-07-30 00:35:44 -07:00
2018-07-24 16:34:03 +02:00
2018-07-17 13:56:21 -04:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-07-22 21:34:45 +02:00
2018-07-22 21:34:45 +02:00
2018-04-20 08:41:15 +10:00
2018-04-13 01:36:53 -07:00
2018-07-27 13:19:03 +02:00
2018-07-27 13:19:03 +02:00
2018-07-09 20:06:39 -04:00
2018-07-31 20:52:05 -04:00
2018-01-03 02:26:56 +09:00
2018-03-09 15:03:40 +01:00
2018-04-01 18:30:21 -04:00
2018-05-09 12:21:05 -04:00
2018-04-29 22:29:53 +02:00
2018-04-27 09:27:52 +02:00