diff --git a/CMakeLists.txt b/CMakeLists.txt index 85f24324c..b815c9655 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,8 +65,8 @@ project(rssguard) set(APP_NAME "RSS Guard") set(APP_LOW_NAME "rssguard") -set(APP_VERSION "3.0.1") -set(FILE_VERSION "3,0,1,0") +set(APP_VERSION "3.0.2") +set(FILE_VERSION "3,0,2,0") set(APP_AUTHOR "Martin Rotter") set(APP_URL "http://bitbucket.org/skunkos/rssguard") set(APP_URL_ISSUES "http://bitbucket.org/skunkos/rssguard/issues") diff --git a/src/definitions/definitions.h.in b/src/definitions/definitions.h.in index 6cf56098b..3852bc89c 100755 --- a/src/definitions/definitions.h.in +++ b/src/definitions/definitions.h.in @@ -41,6 +41,8 @@ #define SERVICE_CODE_STD_RSS "std-rss" #define SERVICE_CODE_TT_RSS "tt-rss" +#define ARGUMENTS_LIST_SEPARATOR "\n" + #define ENCLOSURES_OUTER_SEPARATOR '#' #define ECNLOSURES_INNER_SEPARATOR '&' #define URI_SCHEME_FEED "feed://" diff --git a/src/main.cpp b/src/main.cpp index 6405ddbeb..1ce18d5ac 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) { // TODO: dat '\n' do konstant // Check if another instance is running. - if (application.sendMessage((QStringList() << APP_IS_RUNNING << application.arguments().mid(1)).join(QSL("\n")))) { + if (application.sendMessage((QStringList() << APP_IS_RUNNING << application.arguments().mid(1)).join(ARGUMENTS_LIST_SEPARATOR))) { qWarning("Another instance of the application is already running. Notifying it."); return EXIT_FAILURE; } diff --git a/src/miscellaneous/application.cpp b/src/miscellaneous/application.cpp index b1ede783a..41e8dadd4 100755 --- a/src/miscellaneous/application.cpp +++ b/src/miscellaneous/application.cpp @@ -159,9 +159,7 @@ void Application::restoreDatabaseSettings(bool restore_database, bool restore_se void Application::processExecutionMessage(const QString &message) { qDebug("Received '%s' execution message from another application instance.", qPrintable(message)); - // TODO: dat '\n' do konstant a taky "feed:" - - foreach (QString msg, message.split('\n')) { + foreach (QString msg, message.split(ARGUMENTS_LIST_SEPARATOR)) { if (msg == APP_IS_RUNNING) { showGuiMessage(APP_NAME, tr("Application is already running."), QSystemTrayIcon::Information); mainForm()->display(); @@ -169,7 +167,7 @@ void Application::processExecutionMessage(const QString &message) { else if (msg == APP_QUIT_INSTANCE) { quit(); } - else if (msg.startsWith(QL1S("feed:"))) { + else if (msg.startsWith(QL1S(URI_SCHEME_FEED))) { // Application was running, and someone wants to add new feed. StandardServiceRoot *root = qApp->mainForm()->tabWidget()->feedMessageViewer()->feedsView()->sourceModel()->standardServiceRoot(); diff --git a/src/services/tt-rss/ttrssserviceroot.h b/src/services/tt-rss/ttrssserviceroot.h index af2277e3f..065d147c6 100755 --- a/src/services/tt-rss/ttrssserviceroot.h +++ b/src/services/tt-rss/ttrssserviceroot.h @@ -69,6 +69,7 @@ class TtRssServiceRoot : public ServiceRoot { bool onBeforeMessagesRestoredFromBin(RootItem *selected_item, const QList &messages); bool onAfterMessagesRestoredFromBin(RootItem *selected_item, const QList &messages); + // Access to network. TtRssNetworkFactory *network() const; // Returns list of custom IDS of all DB messages in given item.