aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/plugins/facebook/facebookconnectwidget.cpp')
-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"),