From 8e1d8f637c18e003da31db3144c5dcff261f0f0b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Oct 2022 19:33:08 +0300 Subject: =?UTF-8?q?fixes=20#3220=20=20(WhatsApp:=20=D0=B7=D0=B0=D0=BA?= =?UTF-8?q?=D1=80=D1=8B=D1=82=D0=BE=D0=B5=20=D0=BE=D0=BA=D0=BD=D0=BE=20?= =?UTF-8?q?=D1=81=20QR-=D0=BA=D0=BE=D0=B4=D0=BE=D0=BC=20=D0=BD=D0=B5=D0=B4?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=83=D0=BF=D0=BD=D0=BE=20=D0=B4=D0=BE=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BF=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D1=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/WhatsApp/src/proto.h | 1 + protocols/WhatsApp/src/qrcode.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'protocols') diff --git a/protocols/WhatsApp/src/proto.h b/protocols/WhatsApp/src/proto.h index 1d17a1ed27..a11c992768 100644 --- a/protocols/WhatsApp/src/proto.h +++ b/protocols/WhatsApp/src/proto.h @@ -212,6 +212,7 @@ public: class WhatsAppProto : public PROTO { friend class WANoise; + friend class CWhatsAppQRDlg; class CWhatsAppProtoImpl { diff --git a/protocols/WhatsApp/src/qrcode.cpp b/protocols/WhatsApp/src/qrcode.cpp index f38ef2f286..1cdc797916 100644 --- a/protocols/WhatsApp/src/qrcode.cpp +++ b/protocols/WhatsApp/src/qrcode.cpp @@ -14,6 +14,17 @@ public: CProtoDlgBase(ppro, IDD_SHOWQR) {} + void OnDestroy() override + { + if (!m_bSucceeded) + m_proto->ShutdownSession(); + } + + void SetSuccess() + { + m_bSucceeded = true; + } + void SetData(const CMStringA &str) { auto *pQR = QRcode_encodeString(str, 0, QR_ECLEVEL_L, QR_MODE_8, 1); -- cgit v1.2.3