diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-12-03 01:02:10 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-12-03 01:03:30 +0200 |
commit | f045f987171c3960c12813538b9f19a54a50b4f8 (patch) | |
tree | b309c2a2891dd9cf13461b6cd989d5ac7c815abb /src | |
parent | 0b30bdd519ae06ec70e136a1b890421eb6f764cc (diff) | |
download | bitcoin-f045f987171c3960c12813538b9f19a54a50b4f8.tar.xz |
qt, android: Add GUIUtil::IsEscapeOrBack helper
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/guiutil.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 211f3f506d..364962ee9a 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -428,6 +428,15 @@ namespace GUIUtil */ void ShowModalDialogAndDeleteOnClose(QDialog* dialog); + inline bool IsEscapeOrBack(int key) + { + if (key == Qt::Key_Escape) return true; +#ifdef Q_OS_ANDROID + if (key == Qt::Key_Back) return true; +#endif // Q_OS_ANDROID + return false; + } + } // namespace GUIUtil #endif // BITCOIN_QT_GUIUTIL_H |