This commit is contained in:
Martin Rotter 2016-02-15 06:55:52 +01:00
parent 558768870a
commit b5f0d3ffdd
5 changed files with 22 additions and 3 deletions

View File

@ -14,6 +14,7 @@ Added:
Fixed: Fixed:
▪ Fixed some problems when adding feeds from external web browser like Firefox. (bug #135)
▪ Fixed problem where custom HTTP timeout setting was ignored for TT-RSS account. (GitHub bug #9) ▪ Fixed problem where custom HTTP timeout setting was ignored for TT-RSS account. (GitHub bug #9)
▪ Fixed problems with master update mutex locking. (bug #153) ▪ Fixed problems with master update mutex locking. (bug #153)
▪ Fixed some problems: "Add category to selected account" was enabled when it shouldn't be. ▪ Fixed some problems: "Add category to selected account" was enabled when it shouldn't be.

View File

@ -46,6 +46,7 @@
#define ENCLOSURES_OUTER_SEPARATOR '#' #define ENCLOSURES_OUTER_SEPARATOR '#'
#define ECNLOSURES_INNER_SEPARATOR '&' #define ECNLOSURES_INNER_SEPARATOR '&'
#define URI_SCHEME_FEED_SHORT "feed:"
#define URI_SCHEME_FEED "feed://" #define URI_SCHEME_FEED "feed://"
#define URI_SCHEME_HTTP "http://" #define URI_SCHEME_HTTP "http://"
#define RELEASES_LIST "https://bitbucket.org/skunkos/rssguard/raw/master/resources/text/UPDATES?at=master" #define RELEASES_LIST "https://bitbucket.org/skunkos/rssguard/raw/master/resources/text/UPDATES?at=master"

View File

@ -171,7 +171,7 @@ void Application::processExecutionMessage(const QString &message) {
else if (msg == APP_QUIT_INSTANCE) { else if (msg == APP_QUIT_INSTANCE) {
quit(); quit();
} }
else if (msg.startsWith(QL1S(URI_SCHEME_FEED))) { else if (msg.startsWith(QL1S(URI_SCHEME_FEED_SHORT))) {
// Application was running, and someone wants to add new feed. // Application was running, and someone wants to add new feed.
StandardServiceRoot *root = qApp->mainForm()->tabWidget()->feedMessageViewer()->feedsView()->sourceModel()->standardServiceRoot(); StandardServiceRoot *root = qApp->mainForm()->tabWidget()->feedMessageViewer()->feedsView()->sourceModel()->standardServiceRoot();

View File

@ -315,9 +315,25 @@ void StandardServiceRoot::checkArgumentsForFeedAdding() {
} }
} }
QString StandardServiceRoot::processFeedUrl(const QString &feed_url) {
if (feed_url.startsWith(QL1S(URI_SCHEME_FEED_SHORT))) {
QString without_feed_prefix = feed_url.mid(5);
if (without_feed_prefix.startsWith(QL1S("https:")) || without_feed_prefix.startsWith(QL1S("http:"))) {
return without_feed_prefix;
}
else {
return feed_url;
}
}
else {
return feed_url;
}
}
void StandardServiceRoot::checkArgumentForFeedAdding(const QString &argument) { void StandardServiceRoot::checkArgumentForFeedAdding(const QString &argument) {
if (argument.startsWith(QL1S("feed:"))) { if (argument.startsWith(QL1S(URI_SCHEME_FEED_SHORT))) {
addNewFeed(argument); addNewFeed(processFeedUrl(argument));
} }
} }

View File

@ -88,6 +88,7 @@ class StandardServiceRoot : public ServiceRoot {
void exportFeeds(); void exportFeeds();
private: private:
QString processFeedUrl(const QString &feed_url);
void checkArgumentsForFeedAdding(); void checkArgumentsForFeedAdding();
RecycleBin *m_recycleBin; RecycleBin *m_recycleBin;