mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-18 20:01:15 +01:00
Fixed #41.
This commit is contained in:
parent
5873967102
commit
f1532fc5a5
@ -9,6 +9,7 @@ Changed:
|
||||
|
||||
Fixed:
|
||||
▪ RSS Guard was not launchable in Windows XP. (bug #53)
|
||||
▪ RSS Guard crashed when switching msg status during feed updates. (bug #41)
|
||||
|
||||
3.3.3
|
||||
—————
|
||||
|
@ -105,7 +105,11 @@ void FeedDownloader::oneFeedUpdateFinished(const QList<Message> &messages) {
|
||||
<< QThread::currentThreadId() << "\'.";
|
||||
|
||||
if (!m_stopUpdate) {
|
||||
int updated_messages = messages.isEmpty() ? 0 : feed->updateMessages(messages);
|
||||
int updated_messages;
|
||||
|
||||
QMetaObject::invokeMethod(feed, "updateMessages", Qt::BlockingQueuedConnection,
|
||||
Q_RETURN_ARG(int, updated_messages),
|
||||
Q_ARG(QList<Message>, messages));
|
||||
|
||||
if (updated_messages > 0) {
|
||||
m_results.appendUpdatedFeed(QPair<QString,int>(feed->title(), updated_messages));
|
||||
|
@ -149,6 +149,9 @@ void Feed::run() {
|
||||
}
|
||||
|
||||
int Feed::updateMessages(const QList<Message> &messages) {
|
||||
qDebug().nospace() << "Updating messages in DB. Main thread: " <<
|
||||
(QThread::currentThread() == qApp->thread() ? "true." : "false.");
|
||||
|
||||
int custom_id = customId();
|
||||
int account_id = getParentServiceRoot()->accountId();
|
||||
bool anything_updated = false;
|
||||
|
@ -78,12 +78,13 @@ class Feed : public RootItem, public QRunnable {
|
||||
QString url() const;
|
||||
void setUrl(const QString &url);
|
||||
|
||||
int updateMessages(const QList<Message> &messages);
|
||||
void updateCounts(bool including_total_count);
|
||||
|
||||
// Runs update in thread (thread pooled).
|
||||
void run();
|
||||
|
||||
public slots:
|
||||
void updateCounts(bool including_total_count);
|
||||
int updateMessages(const QList<Message> &messages);
|
||||
|
||||
private:
|
||||
// Performs synchronous obtaining of new messages for this feed.
|
||||
virtual QList<Message> obtainNewMessages() = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user