From 8366a68774f4fe464d66251f2bff970f4c051b01 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 28 Jun 2016 10:09:44 +0200 Subject: [PATCH] Fix one problem with updating custom IDs. --- src/core/feeddownloader.cpp | 6 ++---- src/miscellaneous/databasequeries.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index fa14b270c..65f9df45d 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -95,8 +95,7 @@ void FeedDownloader::stopRunningUpdate() { void FeedDownloader::oneFeedUpdateFinished(int updated_messages) { const Feed *feed = qobject_cast(sender()); - disconnect(feed, SIGNAL(updated(int)), - this, SLOT(oneFeedUpdateFinished(int))); + disconnect(feed, SIGNAL(updated(int)), this, SLOT(oneFeedUpdateFinished(int))); m_feedsUpdated++; m_feedsUpdating--; @@ -105,8 +104,7 @@ void FeedDownloader::oneFeedUpdateFinished(int updated_messages) { m_results.appendUpdatedFeed(QPair(feed->title(), updated_messages)); } - qDebug("Made progress in feed updates, total feeds count %d/%d (id of feed is %d).", - m_feedsUpdated, m_feedsTotalCount, feed->id()); + qDebug("Made progress in feed updates, total feeds count %d/%d (id of feed is %d).", m_feedsUpdated, m_feedsTotalCount, feed->id()); emit progress(feed, m_feedsUpdated, m_feedsTotalCount); if (m_feedsToUpdate <= 0 && m_feedsUpdating <= 0) { diff --git a/src/miscellaneous/databasequeries.cpp b/src/miscellaneous/databasequeries.cpp index cc86080b8..96554055d 100755 --- a/src/miscellaneous/databasequeries.cpp +++ b/src/miscellaneous/databasequeries.cpp @@ -606,7 +606,7 @@ int DatabaseQueries::updateMessages(QSqlDatabase db, // just to keep the data consistent. if (db.exec("UPDATE Messages " "SET custom_id = (SELECT id FROM Messages t WHERE t.id = Messages.id) " - "WHERE Messages.custom_id IS nullptr OR Messages.custom_id = '';").lastError().isValid()) { + "WHERE Messages.custom_id IS NULL OR Messages.custom_id = '';").lastError().isValid()) { qWarning("Failed to set custom ID for all messages."); }