From 76a833ce06e2d2f6fc7d81a178113a721c0ac0ad Mon Sep 17 00:00:00 2001 From: APTX Date: Sun, 3 Jun 2012 18:02:40 +0200 Subject: [PATCH] Use RaiiTransaction instead. Transaction was not completed in all cases. --- localmylist/requesthandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/localmylist/requesthandler.cpp b/localmylist/requesthandler.cpp index 6adb711..2119095 100644 --- a/localmylist/requesthandler.cpp +++ b/localmylist/requesthandler.cpp @@ -480,7 +480,8 @@ void RequestHandler::myListEditReplyRecieved(bool success) if (!success) return; - db->transaction(); + RaiiTransaction t(db); + File file = db->getFile(reply->command().fid()); if (!file.fid) @@ -516,7 +517,7 @@ void RequestHandler::myListEditReplyRecieved(bool success) qDebug() << "Clearing update_id" << id; db->clearPendingMyListUpdate(request); - db->commit(); + t.commit(); } } // namespace LocalMyList -- 2.52.0