diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-05-07 08:15:22 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-05-07 08:42:12 +0200 |
commit | 9d558e1c18a29bbccec802829f9b8b65fb4101a1 (patch) | |
tree | ede911626339470fb7b15a6cebe4ef4735a88051 /src/qt/receiverequestdialog.h | |
parent | 13d3adb651cc78e24e12dd2a8f55631b25681abf (diff) |
ui: Check for !pixmap() before trying to export QR code
Adds null pointer checks as well as prevents the Save/Copy context
menu from appearing at all if no image is shown.
Fixes issue #4140
Diffstat (limited to 'src/qt/receiverequestdialog.h')
-rw-r--r-- | src/qt/receiverequestdialog.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qt/receiverequestdialog.h b/src/qt/receiverequestdialog.h index 295a73031d..5614ac635a 100644 --- a/src/qt/receiverequestdialog.h +++ b/src/qt/receiverequestdialog.h @@ -15,6 +15,9 @@ namespace Ui { class ReceiveRequestDialog; } class OptionsModel; +QT_BEGIN_NAMESPACE +class QMenu; +QT_END_NAMESPACE /* Label widget for QR code. This image can be dragged, dropped, copied and saved * to disk. @@ -33,6 +36,10 @@ public slots: protected: virtual void mousePressEvent(QMouseEvent *event); + virtual void contextMenuEvent(QContextMenuEvent *event); + +private: + QMenu *contextMenu; }; class ReceiveRequestDialog : public QDialog |