From 8fd1d16db6756734a812a8dab3a5dcb513d18ffc Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 5 Feb 2021 11:41:12 +0400 Subject: [PATCH] Fix accept/reject lifetime in gtk file dialog --- .../platform/linux/linux_gtk_file_dialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/linux_gtk_file_dialog.cpp b/Telegram/SourceFiles/platform/linux/linux_gtk_file_dialog.cpp index f03fcdaeaf..2b9b1b0cca 100644 --- a/Telegram/SourceFiles/platform/linux/linux_gtk_file_dialog.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_gtk_file_dialog.cpp @@ -110,7 +110,6 @@ private: rpl::event_stream<> _accept; rpl::event_stream<> _reject; - rpl::lifetime _lifetime; }; @@ -208,16 +207,17 @@ void QGtkDialog::exec() { } else { // block input to the window, allow input to other GTK dialogs QEventLoop loop; + rpl::lifetime lifetime; accept( - ) | rpl::start_with_next([=, &loop] { + ) | rpl::start_with_next([&] { loop.quit(); - }, _lifetime); + }, lifetime); reject( - ) | rpl::start_with_next([=, &loop] { + ) | rpl::start_with_next([&] { loop.quit(); - }, _lifetime); + }, lifetime); loop.exec(); }