From 689dcf105877f86e315a55c9d7a3aa04e071b2c2 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 29 Sep 2017 12:00:31 +0200 Subject: [Facebook] Mem leaks Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- desktop-widgets/plugins/facebook/facebookconnectwidget.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'desktop-widgets/plugins/facebook/facebookconnectwidget.cpp') diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp index 7d77e49bb..83fa25d28 100644 --- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp +++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp @@ -116,6 +116,7 @@ void FacebookManager::albumListReceived() QJsonArray albumObj = albumsDoc.object().value("data").toArray(); auto fb = SettingsObjectWrapper::instance()->facebook; + reply->deleteLater(); foreach(const QJsonValue &v, albumObj){ QJsonObject obj = v.toObject(); if (obj.value("name").toString() == albumName) { @@ -146,6 +147,9 @@ void FacebookManager::facebookAlbumCreated() QNetworkReply *reply = qobject_cast(sender()); QJsonDocument albumsDoc = QJsonDocument::fromJson(reply->readAll()); QJsonObject album = albumsDoc.object(); + + reply->deleteLater(); + if (album.contains("id")) { auto fb = SettingsObjectWrapper::instance()->facebook; fb->setAlbumId(album.value("id").toString()); @@ -230,6 +234,9 @@ void FacebookManager::uploadFinished() QByteArray response = reply->readAll(); QJsonDocument jsonDoc = QJsonDocument::fromJson(response); QJsonObject obj = jsonDoc.object(); + + reply->deleteLater(); + if (obj.keys().contains("id")){ QMessageBox::information(qApp->activeWindow(), tr("Photo upload sucessfull"), -- cgit v1.2.3-70-g09d2