From: Hannah von Reth Date: Tue, 14 Jul 2020 10:49:18 +0000 (+0200) Subject: Fix warning X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~85 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b9638bc77888b120e5621d99b47e181601b2ef99;p=nextcloud-desktop.git Fix warning warning C4573: the usage of 'QObject::disconnect' requires the compiler to capture 'this' but the current default capture mode does not allow it --- diff --git a/src/gui/application.cpp b/src/gui/application.cpp index b44c37fdc..d9272a69d 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -801,8 +801,8 @@ void Application::openVirtualFile(const QString &filename) folder->implicitlyHydrateFile(relativePath); QString normalName = filename.left(filename.size() - virtualFileExt.size()); auto con = QSharedPointer::create(); - *con = QObject::connect(folder, &Folder::syncFinished, [con, normalName] { - QObject::disconnect(*con); + *con = connect(folder, &Folder::syncFinished, folder, [folder, con, normalName] { + folder->disconnect(*con); if (QFile::exists(normalName)) { QDesktopServices::openUrl(QUrl::fromLocalFile(normalName)); }