From 5a33076ac0ee3a7682ef4160b37c47c8aa8de6a5 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sat, 13 Aug 2016 20:16:27 +0200 Subject: [PATCH] Bump version. --- rssguard.pro | 2 +- src/main.cpp | 17 +++++++++++++++++ src/miscellaneous/application.cpp | 7 ++++++- src/miscellaneous/application.h | 5 +++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/rssguard.pro b/rssguard.pro index a66e653fe..80710d702 100755 --- a/rssguard.pro +++ b/rssguard.pro @@ -64,7 +64,7 @@ APP_LOW_NAME = "rssguard" APP_LOW_H_NAME = ".rssguard" APP_AUTHOR = "Martin Rotter" APP_COPYRIGHT = "(C) 2011-2016 $$APP_AUTHOR" -APP_VERSION = "3.3.3" +APP_VERSION = "3.3.4" APP_LONG_NAME = "$$APP_NAME $$APP_VERSION" APP_EMAIL = "rotter.martinos@gmail.com" APP_URL = "https://github.com/martinrotter/rssguard" diff --git a/src/main.cpp b/src/main.cpp index 21ce8f705..7ae38e828 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,6 +39,23 @@ int main(int argc, char *argv[]) { + bool run_as_cron = false; + + for (int i; i < argc; i++) { + const QString str = QString::fromLocal8Bit(argv[i]); + + if (str == "-h") { + qDebug("Usage: rssguard [OPTIONS]\n\n" + "Option\tMeaning\n" + "aaaa\tbbbb"); + + return EXIT_SUCCESS; + } + else if (str == "-cron") { + run_as_cron = true; + } + } + //: Abbreviation of language, e.g. en. //: Use ISO 639-1 code here combined with ISO 3166-1 (alpha-2) code. //: Examples: "cs", "en", "it", "cs_CZ", "en_GB", "en_US". diff --git a/src/miscellaneous/application.cpp b/src/miscellaneous/application.cpp index 2488641d0..88a9e4503 100755 --- a/src/miscellaneous/application.cpp +++ b/src/miscellaneous/application.cpp @@ -20,6 +20,7 @@ #include "miscellaneous/iconfactory.h" #include "miscellaneous/iofactory.h" #include "miscellaneous/mutex.h" +#include "miscellaneous/feedreader.h" #include "gui/feedsview.h" #include "gui/feedmessageviewer.h" #include "gui/messagebox.h" @@ -42,7 +43,7 @@ Application::Application(const QString &id, int &argc, char **argv) : QtSingleApplication(id, argc, argv), - m_updateFeedsLock(nullptr), m_feedServices(QList()), m_userActions(QList()), m_mainForm(nullptr), + m_feedReader(new FeedReader(this)), m_updateFeedsLock(nullptr), m_feedServices(QList()), m_userActions(QList()), m_mainForm(nullptr), m_trayIcon(nullptr), m_settings(nullptr), m_system(nullptr), m_skins(nullptr), m_localization(nullptr), m_icons(nullptr), m_database(nullptr), m_downloadManager(nullptr) { connect(this, SIGNAL(aboutToQuit()), this, SLOT(onAboutToQuit())); @@ -57,6 +58,10 @@ Application::~Application() { qDeleteAll(m_feedServices); } +FeedReader *Application::feedReader() { + return m_feedReader; +} + QList Application::feedServices() { if (m_feedServices.isEmpty()) { // NOTE: All installed services create their entry points here. diff --git a/src/miscellaneous/application.h b/src/miscellaneous/application.h index 7d0ed687c..594ccea5a 100755 --- a/src/miscellaneous/application.h +++ b/src/miscellaneous/application.h @@ -46,6 +46,7 @@ class IconFactory; class QAction; class Mutex; class QWebEngineDownloadItem; +class FeedReader; class Application : public QtSingleApplication { Q_OBJECT @@ -55,6 +56,8 @@ class Application : public QtSingleApplication { explicit Application(const QString &id, int &argc, char **argv); virtual ~Application(); + FeedReader *feedReader(); + // List of all installed "feed service plugins", including obligatory // "standard" service entry point. QList feedServices(); @@ -175,6 +178,8 @@ class Application : public QtSingleApplication { void eliminateFirstRun(); void eliminateFirstRun(const QString &version); + FeedReader *m_feedReader; + // This read-write lock is used by application on its close. // Application locks this lock for WRITING. // This means that if application locks that lock, then