From 3c6b500e9f5770402dbff7cbf48266da132bc539 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 23 Aug 2016 09:10:38 +0200 Subject: [PATCH 01/62] Fixed lang warning. --- localization/qtbase-cs.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/localization/qtbase-cs.ts b/localization/qtbase-cs.ts index d08496a29..4824e1041 100644 --- a/localization/qtbase-cs.ts +++ b/localization/qtbase-cs.ts @@ -2176,10 +2176,6 @@ Přesto chcete soubor smazat? <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across all major desktop operating systems. It is also available for embedded Linux and other embedded and mobile operating systems.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.io/licensing/">qt.io/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2015 The Qt Company Ltd and other contributors.</p><p>Qt and the Qt logo are trademarks of Digia Plc and/or its subsidiary(-ies).</p><p>Qt is developed as an open source project on <a href="http://qt-project.org/">qt-project.org</a>.</p><p>Qt is a Digia product. See <a href="http://qt.io/">qt.io</a> for more information.</p> <p>Qt je sadou softwarových nástrojů C++ určených pro víceplatformní vývoj aplikací.</p><p>Qt poskytuje snadnou přenositelnost a jednotný zdrojový kód pro MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux a všechny hlavní prodejní varianty systému Unix. Qt je rovněž dostupné pro vestavěná zařízení jako Qt pro Embedded Linux a Qt pro Windows CE.</p><p>Qt je dostupné s třemi rozdílnými licencemi, aby vyhovělo širokým řadám našich uživatelů.</p>Qt s naší obchodní licenční smlouvou je vhodné pro vývoj soukromého/obchodního software, u kterého si nepřejete sdílet jakýkoli zdrojový kód se třetími stranami anebo z jiného důvodu nemůžete vyhovět podmínkám GNU LGPL ve verzi 2.1 nebo GNU GPL ve verzi 3.0.</p><p>Qt s licencí GNU LGPL ve verzi 2.1 je vhodné pro vývoj Qt aplikací (soukromých nebo s otevřeným zdrojovým kódem) za předpokladu, že můžete souhlasit s požadavky a podmínkami GNU LGPL verze 2.1.</p><p>Qt s licencí GNU General Public License ve verzi 3.0 je vhodné pro vývoj aplikací Qt, u nichž si přejete použít takovou aplikaci ve spojení se software, který podléhá požadavkům GNU GPL ve verzi 3.0, nebo kde jste jinak ochotni souhlasit s podmínkami GNU GPL ve verzi 3.0.</p><p>Více informací najdete na <a href="http://qt.io/licensing/">qt.nokia.com/products/licensing</a>.</p><p>Autorské právo (C) 2015 The Qt Company Ltd a/nebo její dceřinná(é) společnost(i) a další přispěvatelé.</p><p>Qt a logo Qt jsou obchodní značky Digia Plc a/nebo její dceřinná(é) společnost(i).</p><p>Qt je vyvíjeno jako projekt s otevřeným zdrojovým kódem na <a href="http://qt-project.org/">qt-project.org</a>.</p><p>Qt je výrobkem společnosti Digia. Další informace najdete na <a href="http://qt.io/">qt.io</a>. href="http://qt.io/">qt.nokia.com</a>.</p> - - <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across all major desktop operating systems. It is also available for embedded Linux and other embedded and mobile operating systems.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.io/licensing/">qt.io/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2015 The Qt Company Ltd and other contributors.</p><p>Qt and the Qt logo are trademarks of Digia Plc and/or its subsidiary(-ies).</p><p>Qt is developed as an open source project on <a href="http://qt-project.org/">qt-project.org</a>.</p><p>Qt is a Digia product. See <a href="http://qt.io/">qt.io</a> for more information.</p> - <p>Qt je sadou softwarových nástrojů C++ určených pro víceplatformní vývoj aplikací.</p><p>Qt poskytuje snadnou přenositelnost a jednotný zdrojový kód pro MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux a všechny hlavní prodejní varianty systému Unix. Qt je rovněž dostupné pro vestavěná zařízení jako Qt pro Embedded Linux a Qt pro Windows CE.</p><p>Qt je dostupné s třemi rozdílnými licencemi, aby vyhovělo širokým řadám našich uživatelů.</p>Qt s naší obchodní licenční smlouvou je vhodné pro vývoj soukromého/obchodního software, u kterého si nepřejete sdílet jakýkoli zdrojový kód se třetími stranami anebo z jiného důvodu nemůžete vyhovět podmínkám GNU LGPL ve verzi 2.1 nebo GNU GPL ve verzi 3.0.</p><p>Qt s licencí GNU LGPL ve verzi 2.1 je vhodné pro vývoj Qt aplikací (soukromých nebo s otevřeným zdrojovým kódem) za předpokladu, že můžete souhlasit s požadavky a podmínkami GNU LGPL verze 2.1.</p><p>Qt s licencí GNU General Public License ve verzi 3.0 je vhodné pro vývoj aplikací Qt, u nichž si přejete použít takovou aplikaci ve spojení se software, který podléhá požadavkům GNU GPL ve verzi 3.0, nebo kde jste jinak ochotni souhlasit s podmínkami GNU GPL ve verzi 3.0.</p><p>Více informací najdete na <a href="http://qt.io/licensing/">qt.nokia.com/products/licensing</a>.</p><p>Autorské právo (C) 2015 The Qt Company Ltd a/nebo její dceřinná(é) společnost(i).</p><p>Qt je výrobkem společnosti Nokia. Další informace najdete na <a href="http://qt.io/">qt.nokia.com</a>.</p> - About Qt O Qt From 5873967102c665a032579263db5e1e4eae5e2472 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 23 Aug 2016 09:11:59 +0200 Subject: [PATCH 02/62] Install in travis. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e466742a1..909598782 100755 --- a/.travis.yml +++ b/.travis.yml @@ -23,4 +23,5 @@ script: - source /opt/qt57/bin/qt57-env.sh - mkdir rssguard-build && cd rssguard-build - qmake .. - - make \ No newline at end of file + - make + - make install \ No newline at end of file From f1532fc5a56935f3160b5c9a373beca9140f3b71 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 23 Aug 2016 10:14:19 +0200 Subject: [PATCH 03/62] Fixed #41. --- resources/text/CHANGELOG | 1 + src/core/feeddownloader.cpp | 6 +++++- src/services/abstract/feed.cpp | 3 +++ src/services/abstract/feed.h | 7 ++++--- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index 9e7dd3219..dd8341a18 100755 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -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 ————— diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index 91fac96a4..c6b9d3a95 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -105,7 +105,11 @@ void FeedDownloader::oneFeedUpdateFinished(const QList &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, messages)); if (updated_messages > 0) { m_results.appendUpdatedFeed(QPair(feed->title(), updated_messages)); diff --git a/src/services/abstract/feed.cpp b/src/services/abstract/feed.cpp index 111f0cf1d..d637391a0 100755 --- a/src/services/abstract/feed.cpp +++ b/src/services/abstract/feed.cpp @@ -149,6 +149,9 @@ void Feed::run() { } int Feed::updateMessages(const QList &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; diff --git a/src/services/abstract/feed.h b/src/services/abstract/feed.h index 4919ae687..af3ebf105 100755 --- a/src/services/abstract/feed.h +++ b/src/services/abstract/feed.h @@ -78,12 +78,13 @@ class Feed : public RootItem, public QRunnable { QString url() const; void setUrl(const QString &url); - int updateMessages(const QList &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 &messages); + private: // Performs synchronous obtaining of new messages for this feed. virtual QList obtainNewMessages() = 0; From 61f3ab955cc4351fe13bf698359a0798b991a1be Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 23 Aug 2016 11:00:37 +0200 Subject: [PATCH 04/62] Own threadpool for feed downloader. --- src/core/feeddownloader.cpp | 9 +++++++-- src/core/feeddownloader.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index c6b9d3a95..38127dc09 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -26,9 +26,11 @@ FeedDownloader::FeedDownloader(QObject *parent) - : QObject(parent), m_results(FeedDownloadResults()), m_feedsUpdated(0), m_feedsToUpdate(0), + : QObject(parent), m_threadPool(new QThreadPool(this)), m_results(FeedDownloadResults()), m_feedsUpdated(0), m_feedsToUpdate(0), m_feedsUpdating(0), m_feedsTotalCount(0), m_stopUpdate(false) { qRegisterMetaType("FeedDownloadResults"); + + m_threadPool->setMaxThreadCount(6); } FeedDownloader::~FeedDownloader() { @@ -80,7 +82,7 @@ void FeedDownloader::updateFeeds(const QList &feeds) { connect(feeds.at(i), &Feed::messagesObtained, this, &FeedDownloader::oneFeedUpdateFinished, (Qt::ConnectionType) (Qt::UniqueConnection | Qt::AutoConnection)); - QThreadPool::globalInstance()->start(feeds.at(i)); + m_threadPool->start(feeds.at(i)); m_feedsUpdating++; m_feedsToUpdate--; @@ -88,6 +90,9 @@ void FeedDownloader::updateFeeds(const QList &feeds) { } void FeedDownloader::stopRunningUpdate() { + m_threadPool->clear(); + + // We want indicate that no more feeds will be updated in this queue. m_stopUpdate = true; } diff --git a/src/core/feeddownloader.h b/src/core/feeddownloader.h index 00e0f84e0..d4741a215 100755 --- a/src/core/feeddownloader.h +++ b/src/core/feeddownloader.h @@ -26,6 +26,7 @@ class Feed; +class QThreadPool; // Represents results of batch feed updates. class FeedDownloadResults { @@ -88,6 +89,7 @@ class FeedDownloader : public QObject { private: void finalizeUpdate(); + QThreadPool *m_threadPool; FeedDownloadResults m_results; int m_feedsUpdated; From d2096c79e490ea5c89529cdc220eb3fe8f1511bf Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 23 Aug 2016 13:20:45 +0200 Subject: [PATCH 05/62] Better stopping. --- src/core/feeddownloader.cpp | 46 ++++++++-------------------------- src/definitions/definitions.h | 1 + src/services/abstract/feed.cpp | 1 - 3 files changed, 12 insertions(+), 36 deletions(-) diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index 38127dc09..c2f23d304 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -30,7 +30,7 @@ FeedDownloader::FeedDownloader(QObject *parent) m_feedsUpdating(0), m_feedsTotalCount(0), m_stopUpdate(false) { qRegisterMetaType("FeedDownloadResults"); - m_threadPool->setMaxThreadCount(6); + m_threadPool->setMaxThreadCount(FEED_DOWNLOADER_MAX_THREADS); } FeedDownloader::~FeedDownloader() { @@ -50,10 +50,6 @@ void FeedDownloader::updateFeeds(const QList &feeds) { qDebug().nospace() << "Starting feed updates from worker in thread: \'" << QThread::currentThreadId() << "\'."; - // It may be good to disable "stop" action when batch feed update - // starts. - m_stopUpdate = false; - m_results.clear(); m_feedsUpdated = 0; @@ -65,21 +61,6 @@ void FeedDownloader::updateFeeds(const QList &feeds) { emit updateStarted(); for (int i = 0; i < m_feedsTotalCount; i++) { - if (m_stopUpdate) { - qDebug("Stopping batch feed update now."); - - // We want indicate that no more feeds will be updated in this queue. - m_feedsToUpdate = 0; - - if (m_feedsUpdating <= 0) { - // User forced to stop, no more feeds will start updating. - // If also no feeds are updating right now, finish. - finalizeUpdate(); - } - - break; - } - connect(feeds.at(i), &Feed::messagesObtained, this, &FeedDownloader::oneFeedUpdateFinished, (Qt::ConnectionType) (Qt::UniqueConnection | Qt::AutoConnection)); m_threadPool->start(feeds.at(i)); @@ -91,9 +72,6 @@ void FeedDownloader::updateFeeds(const QList &feeds) { void FeedDownloader::stopRunningUpdate() { m_threadPool->clear(); - - // We want indicate that no more feeds will be updated in this queue. - m_stopUpdate = true; } void FeedDownloader::oneFeedUpdateFinished(const QList &messages) { @@ -109,22 +87,20 @@ void FeedDownloader::oneFeedUpdateFinished(const QList &messages) { << feed->id() << " in thread: \'" << QThread::currentThreadId() << "\'."; - if (!m_stopUpdate) { - int updated_messages; + int updated_messages; - QMetaObject::invokeMethod(feed, "updateMessages", Qt::BlockingQueuedConnection, - Q_RETURN_ARG(int, updated_messages), - Q_ARG(QList, messages)); + QMetaObject::invokeMethod(feed, "updateMessages", Qt::BlockingQueuedConnection, + Q_RETURN_ARG(int, updated_messages), + Q_ARG(QList, messages)); - if (updated_messages > 0) { - m_results.appendUpdatedFeed(QPair(feed->title(), updated_messages)); - } + if (updated_messages > 0) { + 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()); emit updateProgress(feed, m_feedsUpdated, m_feedsTotalCount); - if (m_feedsToUpdate <= 0 && m_feedsUpdating <= 0) { + if (m_threadPool->activeThreadCount() <= 0 || (m_feedsToUpdate <= 0 && m_feedsUpdating <= 0)) { finalizeUpdate(); } } @@ -132,10 +108,10 @@ void FeedDownloader::oneFeedUpdateFinished(const QList &messages) { void FeedDownloader::finalizeUpdate() { qDebug().nospace() << "Finished feed updates in thread: \'" << QThread::currentThreadId() << "\'."; - m_results.sort(); + m_feedsToUpdate = 0; + m_feedsUpdating = 0; - // Make sure that there is not "stop" action pending. - m_stopUpdate = false; + m_results.sort(); // Update of feeds has finished. // NOTE: This means that now "update lock" can be unlocked diff --git a/src/definitions/definitions.h b/src/definitions/definitions.h index c6293ddd4..d3f6eb460 100755 --- a/src/definitions/definitions.h +++ b/src/definitions/definitions.h @@ -49,6 +49,7 @@ #define DOWNLOAD_TIMEOUT 5000 #define MESSAGES_VIEW_DEFAULT_COL 170 #define FEEDS_VIEW_COLUMN_COUNT 2 +#define FEED_DOWNLOADER_MAX_THREADS 6 #define DEFAULT_DAYS_TO_DELETE_MSG 14 #define ELLIPSIS_LENGTH 3 #define MIN_CATEGORY_NAME_LENGTH 1 diff --git a/src/services/abstract/feed.cpp b/src/services/abstract/feed.cpp index d637391a0..3320712cf 100755 --- a/src/services/abstract/feed.cpp +++ b/src/services/abstract/feed.cpp @@ -144,7 +144,6 @@ void Feed::run() { << QThread::currentThreadId() << "\'."; QList msgs = obtainNewMessages(); - emit messagesObtained(msgs); } From d4865ff143e9fcb21e17835ae5c62187ae2e7863 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 08:26:33 +0200 Subject: [PATCH 06/62] =?UTF-8?q?Enhanced=20feed=20updates,=20still=20bugs?= =?UTF-8?q?=20maybe.=20=CB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/feeddownloader.cpp | 75 ++++++++++++++++++++------------ src/core/feeddownloader.h | 6 +-- src/miscellaneous/feedreader.cpp | 6 +-- src/miscellaneous/feedreader.h | 3 -- 4 files changed, 51 insertions(+), 39 deletions(-) diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index c2f23d304..60834c213 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -26,61 +26,81 @@ FeedDownloader::FeedDownloader(QObject *parent) - : QObject(parent), m_threadPool(new QThreadPool(this)), m_results(FeedDownloadResults()), m_feedsUpdated(0), m_feedsToUpdate(0), - m_feedsUpdating(0), m_feedsTotalCount(0), m_stopUpdate(false) { + : QObject(parent), m_feeds(QList()), m_mutex(new QMutex()), m_threadPool(new QThreadPool(this)), + m_results(FeedDownloadResults()), m_feedsUpdated(0), + m_feedsUpdating(0), m_feedsTotalCount(0) { qRegisterMetaType("FeedDownloadResults"); - m_threadPool->setMaxThreadCount(FEED_DOWNLOADER_MAX_THREADS); } FeedDownloader::~FeedDownloader() { + m_mutex->tryLock(); + m_mutex->unlock(); + delete m_mutex; + qDebug("Destroying FeedDownloader instance."); } bool FeedDownloader::isUpdateRunning() const { - return m_feedsToUpdate > 0 || m_feedsUpdating > 0; + QMutexLocker locker(m_mutex); + + return !m_feeds.isEmpty() || m_feedsUpdating > 0; +} + +void FeedDownloader::updateAvailableFeeds() { + while (!m_feeds.isEmpty()) { + connect(m_feeds.first(), &Feed::messagesObtained, this, &FeedDownloader::oneFeedUpdateFinished, + (Qt::ConnectionType) (Qt::UniqueConnection | Qt::AutoConnection)); + if (m_threadPool->tryStart(m_feeds.first())) { + m_feeds.removeFirst(); + m_feedsUpdating++; + } + else { + // We want to start update of some feeds but all working threads are occupied. + break; + } + } } void FeedDownloader::updateFeeds(const QList &feeds) { + QMutexLocker locker(m_mutex); + if (feeds.isEmpty()) { qDebug("No feeds to update in worker thread, aborting update."); finalizeUpdate(); - return; } + else { + qDebug().nospace() << "Starting feed updates from worker in thread: \'" << QThread::currentThreadId() << "\'."; - qDebug().nospace() << "Starting feed updates from worker in thread: \'" << QThread::currentThreadId() << "\'."; + m_feeds = feeds; + m_results.clear(); + m_feedsUpdated = m_feedsUpdating = 0; - m_results.clear(); - - m_feedsUpdated = 0; - m_feedsUpdating = 0; - m_feedsToUpdate = feeds.size(); - m_feedsTotalCount = m_feedsToUpdate; - - // Job starts now. - emit updateStarted(); - - for (int i = 0; i < m_feedsTotalCount; i++) { - connect(feeds.at(i), &Feed::messagesObtained, this, &FeedDownloader::oneFeedUpdateFinished, - (Qt::ConnectionType) (Qt::UniqueConnection | Qt::AutoConnection)); - m_threadPool->start(feeds.at(i)); - - m_feedsUpdating++; - m_feedsToUpdate--; + // Job starts now. + emit updateStarted(); + updateAvailableFeeds(); } } void FeedDownloader::stopRunningUpdate() { + //QMutexLocker locker(m_mutex); + m_threadPool->clear(); + m_feeds.clear(); } void FeedDownloader::oneFeedUpdateFinished(const QList &messages) { + QMutexLocker locker(m_mutex); + + m_feedsUpdated++; + m_feedsUpdating--; + Feed *feed = qobject_cast(sender()); disconnect(feed, &Feed::messagesObtained, this, &FeedDownloader::oneFeedUpdateFinished); - m_feedsUpdated++; - m_feedsUpdating--; + // Now, we check if there are any feeds we would like to update too. + updateAvailableFeeds(); // Now make sure, that messages are actually stored to SQL in a locked state. qDebug().nospace() << "Saving messages of feed " @@ -100,7 +120,7 @@ void FeedDownloader::oneFeedUpdateFinished(const QList &messages) { qDebug("Made progress in feed updates, total feeds count %d/%d (id of feed is %d).", m_feedsUpdated, m_feedsTotalCount, feed->id()); emit updateProgress(feed, m_feedsUpdated, m_feedsTotalCount); - if (m_threadPool->activeThreadCount() <= 0 || (m_feedsToUpdate <= 0 && m_feedsUpdating <= 0)) { + if (m_feeds.isEmpty() && m_feedsUpdating <= 0) { finalizeUpdate(); } } @@ -108,9 +128,6 @@ void FeedDownloader::oneFeedUpdateFinished(const QList &messages) { void FeedDownloader::finalizeUpdate() { qDebug().nospace() << "Finished feed updates in thread: \'" << QThread::currentThreadId() << "\'."; - m_feedsToUpdate = 0; - m_feedsUpdating = 0; - m_results.sort(); // Update of feeds has finished. diff --git a/src/core/feeddownloader.h b/src/core/feeddownloader.h index d4741a215..02683b28b 100755 --- a/src/core/feeddownloader.h +++ b/src/core/feeddownloader.h @@ -87,17 +87,17 @@ class FeedDownloader : public QObject { void updateProgress(const Feed *feed, int current, int total); private: + void updateAvailableFeeds(); void finalizeUpdate(); + QList m_feeds; + QMutex *m_mutex; QThreadPool *m_threadPool; FeedDownloadResults m_results; int m_feedsUpdated; - int m_feedsToUpdate; int m_feedsUpdating; int m_feedsTotalCount; - - bool m_stopUpdate; }; #endif // FEEDDOWNLOADER_H diff --git a/src/miscellaneous/feedreader.cpp b/src/miscellaneous/feedreader.cpp index 021a2ed37..91e063af9 100755 --- a/src/miscellaneous/feedreader.cpp +++ b/src/miscellaneous/feedreader.cpp @@ -84,9 +84,7 @@ void FeedReader::updateFeeds(const QList &feeds) { qRegisterMetaType >("QList"); m_feedDownloader->moveToThread(m_feedDownloaderThread); - connect(this, &FeedReader::feedsUpdateRequested, m_feedDownloader, &FeedDownloader::updateFeeds); connect(m_feedDownloaderThread, &QThread::finished, m_feedDownloaderThread, &QThread::deleteLater); - connect(m_feedDownloader, &FeedDownloader::updateFinished, this, &FeedReader::feedUpdatesFinished); connect(m_feedDownloader, &FeedDownloader::updateProgress, this, &FeedReader::feedUpdatesProgress); connect(m_feedDownloader, &FeedDownloader::updateStarted, this, &FeedReader::feedUpdatesStarted); @@ -96,7 +94,7 @@ void FeedReader::updateFeeds(const QList &feeds) { m_feedDownloaderThread->start(); } - emit feedsUpdateRequested(feeds); + QMetaObject::invokeMethod(m_feedDownloader, "updateFeeds", Q_ARG(QList, feeds)); } void FeedReader::updateAutoUpdateStatus() { @@ -126,7 +124,7 @@ void FeedReader::updateAllFeeds() { void FeedReader::stopRunningFeedUpdate() { if (m_feedDownloader != nullptr) { - m_feedDownloader->stopRunningUpdate(); + QMetaObject::invokeMethod(m_feedDownloader, "stopRunningUpdate"); } } diff --git a/src/miscellaneous/feedreader.h b/src/miscellaneous/feedreader.h index a1a994bc4..a31c17e7c 100755 --- a/src/miscellaneous/feedreader.h +++ b/src/miscellaneous/feedreader.h @@ -72,9 +72,6 @@ class FeedReader : public QObject { void executeNextAutoUpdate(); signals: - // Emitted when model requests update of some feeds. - void feedsUpdateRequested(QList feeds); - void feedUpdatesStarted(); void feedUpdatesFinished(FeedDownloadResults updated_feeds); void feedUpdatesProgress(const Feed *feed, int current, int total); From fb8dfbb9dc8632defeb7af6baeb9b86eb47474a7 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 09:52:41 +0200 Subject: [PATCH 07/62] Fix build. --- src/core/feeddownloader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index 60834c213..b936a6ca7 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -23,6 +23,7 @@ #include #include #include +#include FeedDownloader::FeedDownloader(QObject *parent) From fe0aaf4db161df65043fee39db2c2b624a5f4fcd Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 09:55:50 +0200 Subject: [PATCH 08/62] Fix build. --- src/core/feeddownloader.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/feeddownloader.h b/src/core/feeddownloader.h index 02683b28b..3a8cd6839 100755 --- a/src/core/feeddownloader.h +++ b/src/core/feeddownloader.h @@ -27,6 +27,7 @@ class Feed; class QThreadPool; +class QMutex; // Represents results of batch feed updates. class FeedDownloadResults { From 823b9227128733abd14e4214c9758fd71eddb5ea Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 10:06:45 +0200 Subject: [PATCH 09/62] macosx travis. --- .travis-before-install.sh | 11 +++++++++++ .travis.yml | 9 ++++----- 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100755 .travis-before-install.sh diff --git a/.travis-before-install.sh b/.travis-before-install.sh new file mode 100755 index 000000000..e0a7f4f24 --- /dev/null +++ b/.travis-before-install.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + # Mac OS X. + brew update + brew install https://raw.githubusercontent.com/LRFLEW/homebrew-core/981fa2e8f824b068077e7df47f81bdb8d93a8ea1/Formula/qt5.rb +else + # Linux. + sudo apt-get update + sudo apt-get -y install qt57tools qt57base qt57webengine +fi \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 909598782..7f5119d94 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,11 @@ dist: trusty - language: cpp +osx_image: xcode8 os: - linux - + - osx + compiler: - gcc @@ -13,9 +14,7 @@ git: depth: 3 before_install: - - sudo add-apt-repository ppa:beineri/opt-qt57-trusty -y - - sudo apt-get update - - sudo apt-get -y install qt57tools qt57base qt57webengine + - ./.travis-before-install.sh install: true From d0413068fda8a5129fc9fbd62269d1cb9ce4061b Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 10:37:48 +0200 Subject: [PATCH 10/62] macosx travis. --- .travis-before-install.sh | 20 ++++++++++---------- .travis.yml | 3 +-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.travis-before-install.sh b/.travis-before-install.sh index e0a7f4f24..82a2f5698 100755 --- a/.travis-before-install.sh +++ b/.travis-before-install.sh @@ -1,11 +1,11 @@ -#!/bin/bash - -if [[ $TRAVIS_OS_NAME == 'osx' ]]; then - # Mac OS X. - brew update - brew install https://raw.githubusercontent.com/LRFLEW/homebrew-core/981fa2e8f824b068077e7df47f81bdb8d93a8ea1/Formula/qt5.rb -else - # Linux. - sudo apt-get update - sudo apt-get -y install qt57tools qt57base qt57webengine +#!/bin/sh + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + # Mac OS X. + brew update + brew install https://raw.githubusercontent.com/LRFLEW/homebrew-core/981fa2e8f824b068077e7df47f81bdb8d93a8ea1/Formula/qt5.rb +else + # Linux. + sudo apt-get update + sudo apt-get -y install qt57tools qt57base qt57webengine fi \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 7f5119d94..cd817a07f 100755 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,7 @@ git: submodules: false depth: 3 -before_install: - - ./.travis-before-install.sh +before_install: ./.travis-before-install.sh install: true From a16b81d1f606102fe73921c5b9ca65acb0ab4f75 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 10:47:51 +0200 Subject: [PATCH 11/62] POSIX shell. --- .travis-before-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis-before-install.sh b/.travis-before-install.sh index 82a2f5698..b6e11ff29 100755 --- a/.travis-before-install.sh +++ b/.travis-before-install.sh @@ -1,11 +1,11 @@ #!/bin/sh -if [[ $TRAVIS_OS_NAME == 'osx' ]]; then +if test "$TRAVIS_OS_NAME" = 'osx'; then # Mac OS X. brew update - brew install https://raw.githubusercontent.com/LRFLEW/homebrew-core/981fa2e8f824b068077e7df47f81bdb8d93a8ea1/Formula/qt5.rb + brew install qt5 else # Linux. - sudo apt-get update - sudo apt-get -y install qt57tools qt57base qt57webengine + apt-get update + apt-get -y install qt57tools qt57base qt57webengine fi \ No newline at end of file From d1051c0351d6df9ece29f484e01aca033bcfb091 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 11:04:33 +0200 Subject: [PATCH 12/62] POSIX shell. --- .travis-before-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis-before-install.sh b/.travis-before-install.sh index b6e11ff29..9dc9014f7 100755 --- a/.travis-before-install.sh +++ b/.travis-before-install.sh @@ -1,11 +1,11 @@ #!/bin/sh -if test "$TRAVIS_OS_NAME" = 'osx'; then +if test "$TRAVIS_OS_NAME" = "osx"; then # Mac OS X. brew update brew install qt5 else # Linux. - apt-get update - apt-get -y install qt57tools qt57base qt57webengine + sudo apt-get update + sudo apt-get -y install qt57tools qt57base qt57webengine fi \ No newline at end of file From efc4b71b786050e81e8ccc1902986b158f73d4b9 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 11:12:25 +0200 Subject: [PATCH 13/62] POSIX shell. --- .travis-before-install.sh | 1 + .travis.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis-before-install.sh b/.travis-before-install.sh index 9dc9014f7..4d3dad82c 100755 --- a/.travis-before-install.sh +++ b/.travis-before-install.sh @@ -8,4 +8,5 @@ else # Linux. sudo apt-get update sudo apt-get -y install qt57tools qt57base qt57webengine + source /opt/qt57/bin/qt57-env.sh fi \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index cd817a07f..09634bb28 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ dist: trusty language: cpp osx_image: xcode8 +sudo: required os: - linux @@ -18,7 +19,6 @@ before_install: ./.travis-before-install.sh install: true script: - - source /opt/qt57/bin/qt57-env.sh - mkdir rssguard-build && cd rssguard-build - qmake .. - make From bf72c590bc563998e2e9049c5f0becf23fc3dd41 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 11:14:46 +0200 Subject: [PATCH 14/62] POSIX shell. --- .travis-before-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis-before-install.sh b/.travis-before-install.sh index 4d3dad82c..e59d9b704 100755 --- a/.travis-before-install.sh +++ b/.travis-before-install.sh @@ -8,5 +8,5 @@ else # Linux. sudo apt-get update sudo apt-get -y install qt57tools qt57base qt57webengine - source /opt/qt57/bin/qt57-env.sh + . /opt/qt57/bin/qt57-env.sh fi \ No newline at end of file From ff06e9f63870357e1c5b668e8ad44ed2d7f42987 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 11:19:09 +0200 Subject: [PATCH 15/62] POSIX shell. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 09634bb28..10c446d7e 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ -dist: trusty language: cpp osx_image: xcode8 sudo: required +dist: trusty os: - linux From 823d2ce75b4e2e3634637dc550e04bc885424443 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 11:21:42 +0200 Subject: [PATCH 16/62] POSIX shell. --- .travis-before-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis-before-install.sh b/.travis-before-install.sh index e59d9b704..7ce8453df 100755 --- a/.travis-before-install.sh +++ b/.travis-before-install.sh @@ -6,6 +6,7 @@ if test "$TRAVIS_OS_NAME" = "osx"; then brew install qt5 else # Linux. + sudo add-apt-repository ppa:beineri/opt-qt57-trusty -y sudo apt-get update sudo apt-get -y install qt57tools qt57base qt57webengine . /opt/qt57/bin/qt57-env.sh From 09cbb25ad7d5c3c02b54f3d5c1d13e1ac4322669 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 11:33:06 +0200 Subject: [PATCH 17/62] POSIX shell. --- .travis-before-install.sh | 3 ++- src/core/feeddownloader.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis-before-install.sh b/.travis-before-install.sh index 7ce8453df..0d25eebfb 100755 --- a/.travis-before-install.sh +++ b/.travis-before-install.sh @@ -4,10 +4,11 @@ if test "$TRAVIS_OS_NAME" = "osx"; then # Mac OS X. brew update brew install qt5 + brew link --force qt5 else # Linux. sudo add-apt-repository ppa:beineri/opt-qt57-trusty -y sudo apt-get update sudo apt-get -y install qt57tools qt57base qt57webengine - . /opt/qt57/bin/qt57-env.sh + bash /opt/qt57/bin/qt57-env.sh fi \ No newline at end of file diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index b936a6ca7..6cb04e9f0 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -24,6 +24,7 @@ #include #include #include +#include FeedDownloader::FeedDownloader(QObject *parent) From c973c1cbd631c4a1ec01cfc79cc98709534b6f41 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 12:01:01 +0200 Subject: [PATCH 18/62] POSIX shell. --- .travis-before-install.sh | 1 - .travis.yml | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis-before-install.sh b/.travis-before-install.sh index 0d25eebfb..7eb1f8ab9 100755 --- a/.travis-before-install.sh +++ b/.travis-before-install.sh @@ -10,5 +10,4 @@ else sudo add-apt-repository ppa:beineri/opt-qt57-trusty -y sudo apt-get update sudo apt-get -y install qt57tools qt57base qt57webengine - bash /opt/qt57/bin/qt57-env.sh fi \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 10c446d7e..0ccaa7568 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: cpp -osx_image: xcode8 +osx_image: xcode7.3 sudo: required dist: trusty @@ -19,6 +19,7 @@ before_install: ./.travis-before-install.sh install: true script: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source /opt/qt57/bin/qt57-env.sh ; fi - mkdir rssguard-build && cd rssguard-build - qmake .. - make From 03b7bc0727373c7c56b3d6b1facc97961965936b Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 12:30:11 +0200 Subject: [PATCH 19/62] Move scripts, refactor. --- .travis.yml | 9 +++------ .../scripts/.travis-before-install.sh | 0 resources/scripts/.travis-install-linux.sh | 7 +++++++ resources/scripts/.travis-install-osx.sh | 7 +++++++ 4 files changed, 17 insertions(+), 6 deletions(-) rename .travis-before-install.sh => resources/scripts/.travis-before-install.sh (100%) create mode 100755 resources/scripts/.travis-install-linux.sh create mode 100755 resources/scripts/.travis-install-osx.sh diff --git a/.travis.yml b/.travis.yml index 0ccaa7568..eb3c8929c 100755 --- a/.travis.yml +++ b/.travis.yml @@ -14,13 +14,10 @@ git: submodules: false depth: 3 -before_install: ./.travis-before-install.sh +before_install: ./resources/scripts/.travis-before-install.sh install: true script: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source /opt/qt57/bin/qt57-env.sh ; fi - - mkdir rssguard-build && cd rssguard-build - - qmake .. - - make - - make install \ No newline at end of file + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./resources/scripts/.travis-install-linux.sh ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./resources/scripts/.travis-install-osx.sh ; fi \ No newline at end of file diff --git a/.travis-before-install.sh b/resources/scripts/.travis-before-install.sh similarity index 100% rename from .travis-before-install.sh rename to resources/scripts/.travis-before-install.sh diff --git a/resources/scripts/.travis-install-linux.sh b/resources/scripts/.travis-install-linux.sh new file mode 100755 index 000000000..8236fec8f --- /dev/null +++ b/resources/scripts/.travis-install-linux.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +source /opt/qt57/bin/qt57-env.sh +mkdir rssguard-build && cd rssguard-build +qmake .. +make +make install \ No newline at end of file diff --git a/resources/scripts/.travis-install-osx.sh b/resources/scripts/.travis-install-osx.sh new file mode 100755 index 000000000..2955430c3 --- /dev/null +++ b/resources/scripts/.travis-install-osx.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +mkdir rssguard-build && cd rssguard-build +qmake .. +make +make install +macdeployqt rssguard.app -dmg \ No newline at end of file From 348e51ab9f2cd0914ddf75c3627068c691324119 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 12:51:12 +0200 Subject: [PATCH 20/62] Move scripts, refactor. --- resources/scripts/.travis-before-install.sh | 2 ++ resources/scripts/.travis-install-osx.sh | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/scripts/.travis-before-install.sh b/resources/scripts/.travis-before-install.sh index 7eb1f8ab9..c7bed69d0 100755 --- a/resources/scripts/.travis-before-install.sh +++ b/resources/scripts/.travis-before-install.sh @@ -5,6 +5,8 @@ if test "$TRAVIS_OS_NAME" = "osx"; then brew update brew install qt5 brew link --force qt5 + brew install curl + brew link --force curl else # Linux. sudo add-apt-repository ppa:beineri/opt-qt57-trusty -y diff --git a/resources/scripts/.travis-install-osx.sh b/resources/scripts/.travis-install-osx.sh index 2955430c3..652634d15 100755 --- a/resources/scripts/.travis-install-osx.sh +++ b/resources/scripts/.travis-install-osx.sh @@ -4,4 +4,6 @@ mkdir rssguard-build && cd rssguard-build qmake .. make make install -macdeployqt rssguard.app -dmg \ No newline at end of file +macdeployqt rssguard.app -dmg +ls -lha +curl --upload-file ./*.dmg https://transfer.sh/dmgdmg \ No newline at end of file From d03adde91ec69e69d9afc1f6d80095b20264d324 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 24 Aug 2016 13:21:06 +0200 Subject: [PATCH 21/62] Better name of DMG file. --- resources/macosx/Info.plist.in | 2 +- resources/scripts/.travis-install-osx.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/macosx/Info.plist.in b/resources/macosx/Info.plist.in index 702d901f4..e6f5bc64f 100755 --- a/resources/macosx/Info.plist.in +++ b/resources/macosx/Info.plist.in @@ -15,7 +15,7 @@ CFBundleIconFile @ICON@ CFBundleIdentifier - org.rssguard.RSSGuard + org.martinrotter.rssguard CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/resources/scripts/.travis-install-osx.sh b/resources/scripts/.travis-install-osx.sh index 652634d15..e2e748014 100755 --- a/resources/scripts/.travis-install-osx.sh +++ b/resources/scripts/.travis-install-osx.sh @@ -6,4 +6,4 @@ make make install macdeployqt rssguard.app -dmg ls -lha -curl --upload-file ./*.dmg https://transfer.sh/dmgdmg \ No newline at end of file +curl --upload-file ./*.dmg https://transfer.sh/rssguard.dmg \ No newline at end of file From 764b31dbd336f6d8f21574b1e90a8779d970839c Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 06:53:31 +0200 Subject: [PATCH 22/62] Appveyor. --- appveyor.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100755 index 000000000..43e586d9a --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,12 @@ +version: 3.3.{build} +skip_tags: true +image: Visual Studio 2013 +clone_depth: 1 +clone_folder: c:\rssguard +build_script: +- cmd: >- + cd .. + mkdir rssguard-build + cd rssguard-build + qmake ../rssguard + nmake \ No newline at end of file From cb08b06a227cdebdc497cd429f4bd0f0ba65c8fd Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:03:32 +0200 Subject: [PATCH 23/62] Appveyor. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 43e586d9a..5f2f19d3d 100755 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,5 +8,5 @@ build_script: cd .. mkdir rssguard-build cd rssguard-build - qmake ../rssguard + C:\Qt\5.7\msvc2013\qmake ..\rssguard nmake \ No newline at end of file From 308cd69eec52b20ec5ab25ba838816c0a5e97089 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:06:09 +0200 Subject: [PATCH 24/62] Appveyor. --- appveyor.yml => .appveyor.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename appveyor.yml => .appveyor.yml (100%) diff --git a/appveyor.yml b/.appveyor.yml similarity index 100% rename from appveyor.yml rename to .appveyor.yml From ed19fbdd11055130a9fff81d80393f82f5911b26 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:09:41 +0200 Subject: [PATCH 25/62] Appveyor. --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5f2f19d3d..4712a4651 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,8 +5,8 @@ clone_depth: 1 clone_folder: c:\rssguard build_script: - cmd: >- - cd .. + cd C:\ mkdir rssguard-build cd rssguard-build - C:\Qt\5.7\msvc2013\qmake ..\rssguard + C:\Qt\5.7\msvc2013\qmake C:\rssguard nmake \ No newline at end of file From 79de67f045464139562d787260c0971bb2637733 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:13:31 +0200 Subject: [PATCH 26/62] Appveyor. --- .appveyor.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4712a4651..26aa4742c 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -3,9 +3,13 @@ skip_tags: true image: Visual Studio 2013 clone_depth: 1 clone_folder: c:\rssguard + +environment: + QMAKESPEC: win32-msvc2013 + build_script: - cmd: >- - cd C:\ + C:\ mkdir rssguard-build cd rssguard-build C:\Qt\5.7\msvc2013\qmake C:\rssguard From 6d0dfeee933a662e87957ea7c3c468c82a809a6a Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:15:46 +0200 Subject: [PATCH 27/62] Appveyor. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 26aa4742c..36473dfc9 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,7 +9,7 @@ environment: build_script: - cmd: >- - C:\ + dir mkdir rssguard-build cd rssguard-build C:\Qt\5.7\msvc2013\qmake C:\rssguard From c9e6f7d49a597faa8a20d1640733faaba1838dfc Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:20:48 +0200 Subject: [PATCH 28/62] Appveyor. --- .appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 36473dfc9..af818ab2f 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,9 +8,9 @@ environment: QMAKESPEC: win32-msvc2013 build_script: -- cmd: >- - dir - mkdir rssguard-build - cd rssguard-build - C:\Qt\5.7\msvc2013\qmake C:\rssguard - nmake \ No newline at end of file + - dir + - cd .. + - mkdir rssguard-build + - cd rssguard-build + - C:\Qt\5.7\msvc2013\qmake C:\rssguard + - nmake \ No newline at end of file From 8dae9c7515ac3ee9cc3fb78b28ec4d89aec6dbcd Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:23:18 +0200 Subject: [PATCH 29/62] Appveyor. --- .appveyor.yml | 2 +- README.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index af818ab2f..ff34f48f3 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,5 +12,5 @@ build_script: - cd .. - mkdir rssguard-build - cd rssguard-build - - C:\Qt\5.7\msvc2013\qmake C:\rssguard + - C:\Qt\5.7\msvc2013\bin\qmake.exe C:\rssguard - nmake \ No newline at end of file diff --git a/README.md b/README.md index 88d577a7f..5d0e1d4d2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ RSS Guard ========= -[![Build status](https://img.shields.io/travis/martinrotter/rssguard.svg?maxAge=360)](https://travis-ci.org/martinrotter/rssguard) +[![AppVeyor](https://img.shields.io/appveyor/ci/martinrotter/rssguard.svg?maxAge=360)](https://ci.appveyor.com/project/martinrotter/rssguard) +[![Travis CI](https://img.shields.io/travis/martinrotter/rssguard.svg?maxAge=360)](https://travis-ci.org/martinrotter/rssguard) [![Total downloads](https://img.shields.io/github/downloads/martinrotter/rssguard/total.svg?maxAge=360)](#) [![Version](https://img.shields.io/github/release/martinrotter/rssguard.svg?maxAge=360)](#) [![GitHub issues](https://img.shields.io/github/issues/martinrotter/rssguard.svg?maxAge=360)](#) From c86b19b6ece15852557b86e37c74d10952697ea9 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:26:14 +0200 Subject: [PATCH 30/62] Appveyor. --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index ff34f48f3..c9bb99ad7 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,6 +9,7 @@ environment: build_script: - dir + - "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 - cd .. - mkdir rssguard-build - cd rssguard-build From 2f04e277849bbcdf9dd1b59e50be82c1492dcaef Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:27:07 +0200 Subject: [PATCH 31/62] Appveyor. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index c9bb99ad7..71eb2635d 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,7 +9,7 @@ environment: build_script: - dir - - "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 + - "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\vcvarsall.bat" x86 - cd .. - mkdir rssguard-build - cd rssguard-build From c0324a26308ff4d006ec75bfc3ddb8782022ceae Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:30:15 +0200 Subject: [PATCH 32/62] Appveyor. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 71eb2635d..7452a95eb 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,7 +9,7 @@ environment: build_script: - dir - - "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\vcvarsall.bat" x86 + - 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat' x86 - cd .. - mkdir rssguard-build - cd rssguard-build From 1edb938154222b9a50316ba35873161cf944a654 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:30:50 +0200 Subject: [PATCH 33/62] Appveyor. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 7452a95eb..df0503c26 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,7 +9,7 @@ environment: build_script: - dir - - 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat' x86 + - C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat x86 - cd .. - mkdir rssguard-build - cd rssguard-build From 63efa9cb19e16faf37a0148b24d3b1d6a5ff797e Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:35:57 +0200 Subject: [PATCH 34/62] Appveyor. --- .appveyor.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index df0503c26..f8209bbd5 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,11 +5,15 @@ clone_depth: 1 clone_folder: c:\rssguard environment: + QTDIR: 'C:\Qt\5.7\msvc2013' QMAKESPEC: win32-msvc2013 + COMPILERBAT: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86' build_script: + - set "QT_PLUGIN_PATH=%QTDIR%\plugins" + - set "PATH=%QTDIR%\bin;%PATH%" + - '%COMPILERBAT%' - dir - - C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat x86 - cd .. - mkdir rssguard-build - cd rssguard-build From 6a35a86c48e2ee77e5765defe5e51b835b7a44dd Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:43:12 +0200 Subject: [PATCH 35/62] Appveyor. --- .appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index f8209bbd5..cdbfaf535 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -18,4 +18,5 @@ build_script: - mkdir rssguard-build - cd rssguard-build - C:\Qt\5.7\msvc2013\bin\qmake.exe C:\rssguard - - nmake \ No newline at end of file + - nmake + - nmake windows_all \ No newline at end of file From df9c0b8d59efc791f575b435bd44ed3d5c563eb6 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 07:51:47 +0200 Subject: [PATCH 36/62] Appveyor. --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index cdbfaf535..57fe8a421 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,6 +10,7 @@ environment: COMPILERBAT: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86' build_script: + - git submodule update --init --recursive - set "QT_PLUGIN_PATH=%QTDIR%\plugins" - set "PATH=%QTDIR%\bin;%PATH%" - '%COMPILERBAT%' From 8dc641134788e98eeaed7e0c5c0f41caa686546e Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 08:16:08 +0200 Subject: [PATCH 37/62] Appveyor. --- .appveyor.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 57fe8a421..4e83f3ad2 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,7 +8,9 @@ environment: QTDIR: 'C:\Qt\5.7\msvc2013' QMAKESPEC: win32-msvc2013 COMPILERBAT: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86' - + access_token: + secure: AdDF6ALWBJTln9VNrk6ghfnmiSa120+5PEyGCFvG9IWNBmvWbPmaIpJu0DBdZ1nj + build_script: - git submodule update --init --recursive - set "QT_PLUGIN_PATH=%QTDIR%\plugins" @@ -20,4 +22,16 @@ build_script: - cd rssguard-build - C:\Qt\5.7\msvc2013\bin\qmake.exe C:\rssguard - nmake - - nmake windows_all \ No newline at end of file + - nmake windows_all + +on_success: + - git config --global credential.helper store + - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" + - git config --global user.email "rotter.martinos@gmail.com" + - git config --global user.name "martinrotter" + - git clone https://github.com/martinrotter/rssguard-builds.git + - copy /Y .\*.7z .\rssguard-builds + - cd rssguard-builds + - git add .\*.7z + - git commit -a -m 'New files.' + - git push origin master \ No newline at end of file From d31c9d2ca9a9c00fa8c4f5ba412588e3dc0cbec6 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 08:16:44 +0200 Subject: [PATCH 38/62] Appveyor. --- .appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4e83f3ad2..a43cfd019 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -27,8 +27,6 @@ build_script: on_success: - git config --global credential.helper store - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - - git config --global user.email "rotter.martinos@gmail.com" - - git config --global user.name "martinrotter" - git clone https://github.com/martinrotter/rssguard-builds.git - copy /Y .\*.7z .\rssguard-builds - cd rssguard-builds From bd54b45ef0b8b6e63df48c8983d61f6f37d741da Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 08:17:12 +0200 Subject: [PATCH 39/62] Appveyor. --- .appveyor.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a43cfd019..82465becf 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,8 +8,6 @@ environment: QTDIR: 'C:\Qt\5.7\msvc2013' QMAKESPEC: win32-msvc2013 COMPILERBAT: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86' - access_token: - secure: AdDF6ALWBJTln9VNrk6ghfnmiSa120+5PEyGCFvG9IWNBmvWbPmaIpJu0DBdZ1nj build_script: - git submodule update --init --recursive @@ -23,13 +21,4 @@ build_script: - C:\Qt\5.7\msvc2013\bin\qmake.exe C:\rssguard - nmake - nmake windows_all - -on_success: - - git config --global credential.helper store - - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - - git clone https://github.com/martinrotter/rssguard-builds.git - - copy /Y .\*.7z .\rssguard-builds - - cd rssguard-builds - - git add .\*.7z - - git commit -a -m 'New files.' - - git push origin master \ No newline at end of file + \ No newline at end of file From 6a0314d7ecb8a4dc5fefb47e288defc1f9e6b973 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 08:30:37 +0200 Subject: [PATCH 40/62] Appveyor. --- .appveyor.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 82465becf..36642cc76 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,6 +8,8 @@ environment: QTDIR: 'C:\Qt\5.7\msvc2013' QMAKESPEC: win32-msvc2013 COMPILERBAT: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86' + access_token: + secure: zYCOwcOlgTzvbD0CjJRDNQ== build_script: - git submodule update --init --recursive @@ -21,4 +23,15 @@ build_script: - C:\Qt\5.7\msvc2013\bin\qmake.exe C:\rssguard - nmake - nmake windows_all - \ No newline at end of file + +on_success: + - dir + - cd ..\rssguard + - git checkout origin/build-artifacts + - git config --global credential.helper store + - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" + - git config --global user.email "rotter.martinos@gmail.com" + - git config --global user.name "martinrotter" + - copy /Y ..\rssguard-build\*.7z .\ + - git commit -a -m 'New files.' + - git push origin build-artifacts \ No newline at end of file From dc27990e8c7fad55d1001a24820d21985d36e915 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 08:35:55 +0200 Subject: [PATCH 41/62] Appveyor. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 36642cc76..00643f86d 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,7 +9,7 @@ environment: QMAKESPEC: win32-msvc2013 COMPILERBAT: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86' access_token: - secure: zYCOwcOlgTzvbD0CjJRDNQ== + secure: XCWdr9wPgK4gm6289WXCg2vtMA02eBSnj6eKHC+ps6Z5lgw0jsK09UQ5y9E9ZFwS build_script: - git submodule update --init --recursive From edcd42336e95658463f9a197a6d40529faf759f0 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 08:39:08 +0200 Subject: [PATCH 42/62] Appveyor. --- .appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 00643f86d..9fc0f672d 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -27,7 +27,8 @@ build_script: on_success: - dir - cd ..\rssguard - - git checkout origin/build-artifacts + - git fetch + - git checkout build-artifacts - git config --global credential.helper store - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - git config --global user.email "rotter.martinos@gmail.com" From 193408daf1925c3fa085e5bd7bb00ff30df3b3c5 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 08:48:05 +0200 Subject: [PATCH 43/62] Appveyor. --- .appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 9fc0f672d..b45fd0123 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -26,7 +26,8 @@ build_script: on_success: - dir - - cd ..\rssguard + - git clone -q --depth=1 --branch=build-artifacts https://github.com/martinrotter/rssguard.git c:\rssguard-artifacts + - cd ..\rssguard-artifacts - git fetch - git checkout build-artifacts - git config --global credential.helper store From 6a10d81b97e11cd1da92afd5dd8cad062f6fcd55 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 08:59:14 +0200 Subject: [PATCH 44/62] Appveyor. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index b45fd0123..eaef85ded 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -35,5 +35,5 @@ on_success: - git config --global user.email "rotter.martinos@gmail.com" - git config --global user.name "martinrotter" - copy /Y ..\rssguard-build\*.7z .\ - - git commit -a -m 'New files.' + - git commit -m 'New files.' - git push origin build-artifacts \ No newline at end of file From 5f2d1fc6f387b2c87c2d381e8303a6fedaf80840 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 09:07:15 +0200 Subject: [PATCH 45/62] Appveyor. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index eaef85ded..0c1e63431 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -35,5 +35,5 @@ on_success: - git config --global user.email "rotter.martinos@gmail.com" - git config --global user.name "martinrotter" - copy /Y ..\rssguard-build\*.7z .\ - - git commit -m 'New files.' + - git commit -m "New files." - git push origin build-artifacts \ No newline at end of file From bacaef142763560aed5fff198d6bee4f8ae95bae Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 09:14:20 +0200 Subject: [PATCH 46/62] Appveyor. --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index 0c1e63431..f34d9b91d 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -35,5 +35,6 @@ on_success: - git config --global user.email "rotter.martinos@gmail.com" - git config --global user.name "martinrotter" - copy /Y ..\rssguard-build\*.7z .\ + - git add *.7z - git commit -m "New files." - git push origin build-artifacts \ No newline at end of file From 26cb8a5a0a47e3320a6b6b5cf7b11c58f5ee91c5 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 09:27:03 +0200 Subject: [PATCH 47/62] Ignore branch. --- .appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index f34d9b91d..b87a2d79c 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,6 +4,10 @@ image: Visual Studio 2013 clone_depth: 1 clone_folder: c:\rssguard +branches: + except: + - build-artifacts + environment: QTDIR: 'C:\Qt\5.7\msvc2013' QMAKESPEC: win32-msvc2013 From e7d995ad4664f63dec8e24ed48074556b1de990f Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 09:42:57 +0200 Subject: [PATCH 48/62] Better versions. --- .appveyor.yml | 6 +++--- resources/nsis/NSIS.definitions.nsh.in | 2 +- rssguard.pro | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index b87a2d79c..5998368d0 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,4 +1,4 @@ -version: 3.3.{build} +version: {build} skip_tags: true image: Visual Studio 2013 clone_depth: 1 @@ -38,7 +38,7 @@ on_success: - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - git config --global user.email "rotter.martinos@gmail.com" - git config --global user.name "martinrotter" - - copy /Y ..\rssguard-build\*.7z .\ - - git add *.7z + - copy /Y ..\rssguard-build\*.7z .\windows + - git add windows\*.7z - git commit -m "New files." - git push origin build-artifacts \ No newline at end of file diff --git a/resources/nsis/NSIS.definitions.nsh.in b/resources/nsis/NSIS.definitions.nsh.in index a698649e6..5d535ab63 100755 --- a/resources/nsis/NSIS.definitions.nsh.in +++ b/resources/nsis/NSIS.definitions.nsh.in @@ -25,5 +25,5 @@ !define MUI_ICON "@PWD@\resources\graphics\@APP_LOW_NAME@.ico" !define MUI_UNICON "@PWD@\resources\graphics\@APP_LOW_NAME@.ico" !define PATCH "0" -!define OUTPUT_FILE "@OUT_PWD@\@APP_LOW_NAME@-@APP_VERSION@-win32.exe" +!define OUTPUT_FILE "@OUT_PWD@\@APP_LOW_NAME@-@APP_VERSION@-@APP_REVISION@-win32.exe" !define BINARY_TREE "@OUT_PWD@\app" \ No newline at end of file diff --git a/rssguard.pro b/rssguard.pro index 19099376f..4031b0d75 100755 --- a/rssguard.pro +++ b/rssguard.pro @@ -135,7 +135,7 @@ exists(.git) { } isEmpty(APP_REVISION) { - APP_REVISION = "-" + APP_REVISION = "" } DEFINES += APP_REVISION='"\\\"$$APP_REVISION\\\""' @@ -537,11 +537,11 @@ QMAKE_EXTRA_COMPILERS += lrelease win32 { seven_zip.target = 7zip seven_zip.depends = install - seven_zip.commands = $$shell_path($$shell_quote($$PWD/resources/scripts/7za/7za.exe)) a -t7z $$TARGET-$$APP_VERSION-win32.7z $$shell_path($$PREFIX/*) + seven_zip.commands = $$shell_path($$shell_quote($$PWD/resources/scripts/7za/7za.exe)) a -t7z $$TARGET-$$APP_VERSION-$$APP_REVISION-win32.7z $$shell_path($$PREFIX/*) zip.target = zip zip.depends = install - zip.commands = $$shell_path($$shell_quote($$PWD/resources/scripts/7za/7za.exe)) a -tzip $$TARGET-$$APP_VERSION-win32.zip $$shell_path($$PREFIX/*) + zip.commands = $$shell_path($$shell_quote($$PWD/resources/scripts/7za/7za.exe)) a -tzip $$TARGET-$$APP_VERSION-$$APP_REVISION-win32.zip $$shell_path($$PREFIX/*) QMAKE_EXTRA_TARGETS += seven_zip zip } @@ -551,7 +551,7 @@ win32 { nsis.target = nsis nsis.depends = install nsis.commands = \ - $$shell_path($$shell_quote($$PWD/resources/scripts/sed/sed.exe)) -e \"s|@APP_VERSION@|$$APP_VERSION|g; s|@APP_NAME@|$$APP_NAME|g; s|@APP_LOW_NAME@|$$APP_LOW_NAME|g; s|@EXE_NAME@|$${APP_LOW_NAME}.exe|g; s|@PWD@|$$replace(PWD, /, \\\\)|g; s|@OUT_PWD@|$$replace(OUT_PWD, /, \\\\)|g\" $$shell_path($$shell_quote($$PWD/resources/nsis/NSIS.definitions.nsh.in)) > $$shell_path($$shell_quote($$OUT_PWD/NSIS.definitions.nsh)) && \ + $$shell_path($$shell_quote($$PWD/resources/scripts/sed/sed.exe)) -e \"s|@APP_VERSION@|$$APP_VERSION|g; s|@APP_REVISION@|$$APP_REVISION|g; s|@APP_NAME@|$$APP_NAME|g; s|@APP_LOW_NAME@|$$APP_LOW_NAME|g; s|@EXE_NAME@|$${APP_LOW_NAME}.exe|g; s|@PWD@|$$replace(PWD, /, \\\\)|g; s|@OUT_PWD@|$$replace(OUT_PWD, /, \\\\)|g\" $$shell_path($$shell_quote($$PWD/resources/nsis/NSIS.definitions.nsh.in)) > $$shell_path($$shell_quote($$OUT_PWD/NSIS.definitions.nsh)) && \ xcopy /Y $$shell_path($$shell_quote($$PWD/resources/nsis/NSIS.template.in)) $$shell_path($$shell_quote($$OUT_PWD/)) && \ $$shell_path($$shell_quote($$PWD/resources/scripts/nsis/makensis.exe)) $$shell_path($$shell_quote($$OUT_PWD/NSIS.template.in)) From d42d71c0519e23e7716030de4d2d4296483eb6e7 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 09:45:21 +0200 Subject: [PATCH 49/62] Better versions. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5998368d0..dc19103fa 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,4 +1,4 @@ -version: {build} +version: 666.{build} skip_tags: true image: Visual Studio 2013 clone_depth: 1 From efc2c7f14388cfcd6f7561b6de45773b3cde71fb Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 09:56:08 +0200 Subject: [PATCH 50/62] Ignore some branch. --- .appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index dc19103fa..755d94a82 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,6 +5,9 @@ clone_depth: 1 clone_folder: c:\rssguard branches: + only: + - master + - dev except: - build-artifacts From 374a24072fdc4a1f6918af2c6f73b96582db5148 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 10:08:20 +0200 Subject: [PATCH 51/62] Do not post exes. --- .appveyor.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 755d94a82..eda37e54b 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -31,17 +31,17 @@ build_script: - nmake - nmake windows_all -on_success: - - dir - - git clone -q --depth=1 --branch=build-artifacts https://github.com/martinrotter/rssguard.git c:\rssguard-artifacts - - cd ..\rssguard-artifacts - - git fetch - - git checkout build-artifacts - - git config --global credential.helper store - - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - - git config --global user.email "rotter.martinos@gmail.com" - - git config --global user.name "martinrotter" - - copy /Y ..\rssguard-build\*.7z .\windows - - git add windows\*.7z - - git commit -m "New files." - - git push origin build-artifacts \ No newline at end of file +#on_success: +# - dir +# - git clone -q --depth=1 --branch=build-artifacts https://github.com/martinrotter/rssguard.git c:\rssguard-artifacts +# - cd ..\rssguard-artifacts +# - git fetch +# - git checkout build-artifacts +# - git config --global credential.helper store +# - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" +# - git config --global user.email "rotter.martinos@gmail.com" +# - git config --global user.name "martinrotter" +# - copy /Y ..\rssguard-build\*.7z .\windows +# - git add windows\*.7z +# - git commit -m "New files." +# - git push origin build-artifacts \ No newline at end of file From ee5ed228f14f5fd17cf8f992f4e06622640fdd60 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 10:09:59 +0200 Subject: [PATCH 52/62] Do not post exes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d0e1d4d2..6cba2dd64 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Features -------- RSS Guard is simple (yet powerful) feed reader. It is able to fetch the most known feed formats, including RSS/RDF and ATOM. RSS Guard is developed on top of the [Qt library](http://qt-project.org/) and it supports these operating systems: -* Windows XP and newer, +* Windows Vista and newer, * GNU/Linux, * Mac OS X, * xBSD (possibly), From 13bb985dd21390fc462f95bc27ec50a17bac7ccd Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 10:28:56 +0200 Subject: [PATCH 53/62] Fixed #52. --- resources/text/CHANGELOG | 1 + src/core/feeddownloader.cpp | 9 ++++----- src/core/feeddownloader.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index dd8341a18..7d9bdcaa3 100755 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -8,6 +8,7 @@ Changed: ▪ Big application core refactoring. Many functions rewritten, some bad code removed. Fixed: +▪ RSS Guard could not stop ongoing feed updates. (bug #52) ▪ RSS Guard was not launchable in Windows XP. (bug #53) ▪ RSS Guard crashed when switching msg status during feed updates. (bug #41) diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index 6cb04e9f0..340461816 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -30,7 +30,7 @@ FeedDownloader::FeedDownloader(QObject *parent) : QObject(parent), m_feeds(QList()), m_mutex(new QMutex()), m_threadPool(new QThreadPool(this)), m_results(FeedDownloadResults()), m_feedsUpdated(0), - m_feedsUpdating(0), m_feedsTotalCount(0) { + m_feedsUpdating(0), m_feedsOriginalCount(0) { qRegisterMetaType("FeedDownloadResults"); m_threadPool->setMaxThreadCount(FEED_DOWNLOADER_MAX_THREADS); } @@ -75,6 +75,7 @@ void FeedDownloader::updateFeeds(const QList &feeds) { qDebug().nospace() << "Starting feed updates from worker in thread: \'" << QThread::currentThreadId() << "\'."; m_feeds = feeds; + m_feedsOriginalCount = m_feeds.size(); m_results.clear(); m_feedsUpdated = m_feedsUpdating = 0; @@ -85,8 +86,6 @@ void FeedDownloader::updateFeeds(const QList &feeds) { } void FeedDownloader::stopRunningUpdate() { - //QMutexLocker locker(m_mutex); - m_threadPool->clear(); m_feeds.clear(); } @@ -119,8 +118,8 @@ void FeedDownloader::oneFeedUpdateFinished(const QList &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()); - emit updateProgress(feed, m_feedsUpdated, m_feedsTotalCount); + qDebug("Made progress in feed updates, total feeds count %d/%d (id of feed is %d).", m_feedsUpdated, m_feedsOriginalCount, feed->id()); + emit updateProgress(feed, m_feedsUpdated, m_feedsOriginalCount); if (m_feeds.isEmpty() && m_feedsUpdating <= 0) { finalizeUpdate(); diff --git a/src/core/feeddownloader.h b/src/core/feeddownloader.h index 3a8cd6839..882a7854a 100755 --- a/src/core/feeddownloader.h +++ b/src/core/feeddownloader.h @@ -98,7 +98,7 @@ class FeedDownloader : public QObject { int m_feedsUpdated; int m_feedsUpdating; - int m_feedsTotalCount; + int m_feedsOriginalCount; }; #endif // FEEDDOWNLOADER_H From 729b8d4a9b7df770315b190ba213d7389159e6c2 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 10:54:37 +0200 Subject: [PATCH 54/62] Fix some deadlocks when exiting app while updating feeds etc. --- src/core/feeddownloader.cpp | 2 -- src/miscellaneous/feedreader.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/feeddownloader.cpp b/src/core/feeddownloader.cpp index 340461816..b0ad83307 100755 --- a/src/core/feeddownloader.cpp +++ b/src/core/feeddownloader.cpp @@ -44,8 +44,6 @@ FeedDownloader::~FeedDownloader() { } bool FeedDownloader::isUpdateRunning() const { - QMutexLocker locker(m_mutex); - return !m_feeds.isEmpty() || m_feedsUpdating > 0; } diff --git a/src/miscellaneous/feedreader.cpp b/src/miscellaneous/feedreader.cpp index 91e063af9..fefaf1c33 100755 --- a/src/miscellaneous/feedreader.cpp +++ b/src/miscellaneous/feedreader.cpp @@ -207,6 +207,12 @@ void FeedReader::stop() { if (m_feedDownloaderThread != nullptr && m_feedDownloaderThread->isRunning()) { m_feedDownloader->stopRunningUpdate(); + if (m_feedDownloader->isUpdateRunning()) { + QEventLoop loop(this); + connect(m_feedDownloader, &FeedDownloader::updateFinished, &loop, &QEventLoop::quit); + loop.exec(); + } + qDebug("Quitting feed downloader thread."); m_feedDownloaderThread->quit(); From 148f55023520da2220a0ef0058ab4af59e9d337a Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 11:10:35 +0200 Subject: [PATCH 55/62] Publish links. --- .appveyor.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index eda37e54b..fcdd4064e 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -31,17 +31,17 @@ build_script: - nmake - nmake windows_all -#on_success: -# - dir -# - git clone -q --depth=1 --branch=build-artifacts https://github.com/martinrotter/rssguard.git c:\rssguard-artifacts -# - cd ..\rssguard-artifacts -# - git fetch -# - git checkout build-artifacts -# - git config --global credential.helper store -# - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" -# - git config --global user.email "rotter.martinos@gmail.com" -# - git config --global user.name "martinrotter" -# - copy /Y ..\rssguard-build\*.7z .\windows -# - git add windows\*.7z -# - git commit -m "New files." -# - git push origin build-artifacts \ No newline at end of file +on_success: + - dir + - git clone -q --depth=1 --branch=build-artifacts https://github.com/martinrotter/rssguard.git c:\rssguard-artifacts + - cd ..\rssguard-artifacts + - git fetch + - git checkout build-artifacts + - git config --global credential.helper store + - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" + - git config --global user.email "rotter.martinos@gmail.com" + - git config --global user.name "martinrotter" + - curl -T ..\rssguard-build\*.7z chunk.io --silent >> windows-builds.txt + - git add *.* + - git commit -m "New files." + - git push origin build-artifacts \ No newline at end of file From f48804d4726d20726bf3eeda71ff00a77dd71306 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 11:33:26 +0200 Subject: [PATCH 56/62] Publish links. --- .appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index fcdd4064e..9d1682cc4 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -35,13 +35,13 @@ on_success: - dir - git clone -q --depth=1 --branch=build-artifacts https://github.com/martinrotter/rssguard.git c:\rssguard-artifacts - cd ..\rssguard-artifacts - - git fetch - - git checkout build-artifacts - git config --global credential.helper store - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - git config --global user.email "rotter.martinos@gmail.com" - git config --global user.name "martinrotter" - - curl -T ..\rssguard-build\*.7z chunk.io --silent >> windows-builds.txt + - cd ..\rssbuard-build + - for /f "tokens=*" %F in ('dir /s /b *.7z') do curl -T %F chunk.io --silent >> ..\rssguard-artifacts\windows-builds.txt + - cd ..\rssguard-artifacts - git add *.* - git commit -m "New files." - git push origin build-artifacts \ No newline at end of file From 2c419ff8ebc4ad0e4be00984d9510cbeab0273e5 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 11:42:10 +0200 Subject: [PATCH 57/62] Publish links. --- .appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 9d1682cc4..d3e0f5aa3 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -34,7 +34,6 @@ build_script: on_success: - dir - git clone -q --depth=1 --branch=build-artifacts https://github.com/martinrotter/rssguard.git c:\rssguard-artifacts - - cd ..\rssguard-artifacts - git config --global credential.helper store - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - git config --global user.email "rotter.martinos@gmail.com" From f812dd34f6eac0df4503a9ce11c9887ccff34019 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 11:49:43 +0200 Subject: [PATCH 58/62] Publish links. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index d3e0f5aa3..5cfee7f67 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -38,7 +38,7 @@ on_success: - ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - git config --global user.email "rotter.martinos@gmail.com" - git config --global user.name "martinrotter" - - cd ..\rssbuard-build + - cd ..\rssguard-build - for /f "tokens=*" %F in ('dir /s /b *.7z') do curl -T %F chunk.io --silent >> ..\rssguard-artifacts\windows-builds.txt - cd ..\rssguard-artifacts - git add *.* From c743bb59fa5e63f7f3071f556613f3334a9df624 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 11:59:59 +0200 Subject: [PATCH 59/62] Publish links. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5cfee7f67..401143fa5 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -39,7 +39,7 @@ on_success: - git config --global user.email "rotter.martinos@gmail.com" - git config --global user.name "martinrotter" - cd ..\rssguard-build - - for /f "tokens=*" %F in ('dir /s /b *.7z') do curl -T %F chunk.io --silent >> ..\rssguard-artifacts\windows-builds.txt + - for /f "tokens=*" %%F in ('dir /s /b *.7z') do curl -T %%F chunk.io --silent >> ..\rssguard-artifacts\windows-builds.txt - cd ..\rssguard-artifacts - git add *.* - git commit -m "New files." From 813b16a34adc66696dd90d4404e702a3f7794d1f Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 12:27:17 +0200 Subject: [PATCH 60/62] Publish links. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 401143fa5..50f72689a 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -39,7 +39,7 @@ on_success: - git config --global user.email "rotter.martinos@gmail.com" - git config --global user.name "martinrotter" - cd ..\rssguard-build - - for /f "tokens=*" %%F in ('dir /s /b *.7z') do curl -T %%F chunk.io --silent >> ..\rssguard-artifacts\windows-builds.txt + - for /f "tokens=*" %%F in ('dir /s /b *.7z') do curl --upload-file %%F https://transfer.sh/rssguard-win32-7z --silent >> ..\rssguard-artifacts\windows-builds.txt - cd ..\rssguard-artifacts - git add *.* - git commit -m "New files." From 592f358c5be3047f7f37c2d1486c45afd55bc33d Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 12:28:23 +0200 Subject: [PATCH 61/62] Publish links. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 50f72689a..bb9a6da42 100755 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -39,7 +39,7 @@ on_success: - git config --global user.email "rotter.martinos@gmail.com" - git config --global user.name "martinrotter" - cd ..\rssguard-build - - for /f "tokens=*" %%F in ('dir /s /b *.7z') do curl --upload-file %%F https://transfer.sh/rssguard-win32-7z --silent >> ..\rssguard-artifacts\windows-builds.txt + - for /f "tokens=*" %%F in ('dir /s /b *.7z') do curl --upload-file %%F https://transfer.sh/rssguard-win32.7z --silent >> ..\rssguard-artifacts\windows-builds.txt - cd ..\rssguard-artifacts - git add *.* - git commit -m "New files." From b72a5d654ba55beca07f53c55b0990c016cf5b5f Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 25 Aug 2016 12:41:13 +0200 Subject: [PATCH 62/62] Publish links. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6cba2dd64..e3ea26ea9 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ Downloads * [official downloads](https://github.com/martinrotter/rssguard/releases), * alternative downloads: * [Archlinux AUR package](https://aur.archlinux.org/packages/rssguard/), + * [Automatically generated test builds](https://github.com/martinrotter/rssguard/tree/build-artifacts), * [OBS/development releases](https://build.opensuse.org/package/show/home:skunkos:rssguard/rssguard-git) (click "Download package" in top/right corner of the website). [![Alternative RSS Guard downloads.](http://www.instalki.pl/img/buttons/en/download_dark.png)](http://www.instalki.pl/programy/download/Windows/czytniki_RSS/RSS_Guard.html)