summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-03-02 16:51:04 +0100
committerKai Koehne <kai.koehne@qt.io>2018-04-13 08:14:17 +0000
commit4b30d82f05064723b9c3684e1c16ae0cf9d71baa (patch)
tree8130af3ceefbb3e4ddef08d4b6830b8f487db48e
parent2adc7eabb86dd3a7435ca205324091ca4095c78d (diff)
Reject unanswered permission requests
Change-Id: I2a5b35810d20dec685e134f6d8fe3383003d33d1 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r--src/core/request_controller.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/request_controller.h b/src/core/request_controller.h
index 5bd62128..a15c601d 100644
--- a/src/core/request_controller.h
+++ b/src/core/request_controller.h
@@ -54,21 +54,26 @@ public:
QUrl origin() const { return m_origin; }
- void accept() {
+ void accept()
+ {
if (!m_answered) {
m_answered = true;
accepted();
}
}
- void reject() {
+ void reject()
+ {
if (!m_answered) {
m_answered = true;
rejected();
}
}
- virtual ~RequestController() {}
+ virtual ~RequestController()
+ {
+ reject();
+ }
protected:
virtual void accepted() = 0;