aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/plugins
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2017-09-29 12:00:31 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-09-29 12:57:34 -0700
commit689dcf105877f86e315a55c9d7a3aa04e071b2c2 (patch)
tree05eb3967f77c01b0d2d735acef9d91157275f550 /desktop-widgets/plugins
parent475dfe1194d63ce4c081987a13076198bfcdd820 (diff)
downloadsubsurface-689dcf105877f86e315a55c9d7a3aa04e071b2c2.tar.gz
[Facebook] Mem leaks
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/plugins')
-rw-r--r--desktop-widgets/plugins/facebook/facebookconnectwidget.cpp7
1 files changed, 7 insertions, 0 deletions
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<QNetworkReply*>(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"),