mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:33:24 +00:00
[Facebook] Mem leaks
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
475dfe1194
commit
689dcf1058
1 changed files with 7 additions and 0 deletions
|
@ -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"),
|
||||
|
|
Loading…
Add table
Reference in a new issue