mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-06 05:36:10 -05:00
FeedReader:
- Fixed crash when removing a feed displayed in the main tab. - Fixed reading author of ATOM feeds. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6057 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c44d10a6a1
commit
e099389528
@ -668,6 +668,11 @@ void FeedReaderDialog::messageTabInfoChanged(QWidget *widget)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (messageWidget != mMessageWidget && messageWidget->feedId().empty()) {
|
||||||
|
messageWidget->deleteLater();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ui->messageTabWidget->setTabText(index, messageWidget->feedName(true));
|
ui->messageTabWidget->setTabText(index, messageWidget->feedName(true));
|
||||||
ui->messageTabWidget->setTabIcon(index, messageWidget->feedIcon());
|
ui->messageTabWidget->setTabIcon(index, messageWidget->feedIcon());
|
||||||
}
|
}
|
||||||
|
@ -214,12 +214,14 @@ void FeedReaderMessageWidget::setFeedId(const std::string &feedId)
|
|||||||
} else {
|
} else {
|
||||||
mFeedId.clear();
|
mFeedId.clear();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
mFeedName.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
emit feedMessageChanged(this);
|
|
||||||
|
|
||||||
updateMsgs();
|
updateMsgs();
|
||||||
updateCurrentMessage();
|
updateCurrentMessage();
|
||||||
|
|
||||||
|
emit feedMessageChanged(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString FeedReaderMessageWidget::feedName(bool withUnreadCount)
|
QString FeedReaderMessageWidget::feedName(bool withUnreadCount)
|
||||||
@ -405,7 +407,7 @@ void FeedReaderMessageWidget::feedChanged(const QString &feedId, int type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type == NOTIFY_TYPE_DEL) {
|
if (type == NOTIFY_TYPE_DEL) {
|
||||||
deleteLater();
|
setFeedId("");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,6 +276,7 @@ RsFeedReaderErrorState p3FeedReaderThread::download(const RsFeedReaderFeed &feed
|
|||||||
std::string contentType = CURL.contentType();
|
std::string contentType = CURL.contentType();
|
||||||
|
|
||||||
if (isContentType(contentType, "text/xml") ||
|
if (isContentType(contentType, "text/xml") ||
|
||||||
|
isContentType(contentType, "text/html") ||
|
||||||
isContentType(contentType, "application/rss+xml") ||
|
isContentType(contentType, "application/rss+xml") ||
|
||||||
isContentType(contentType, "application/xml") ||
|
isContentType(contentType, "application/xml") ||
|
||||||
isContentType(contentType, "application/xhtml+xml") ||
|
isContentType(contentType, "application/xhtml+xml") ||
|
||||||
@ -900,7 +901,15 @@ RsFeedReaderErrorState p3FeedReaderThread::process(const RsFeedReaderFeed &feed,
|
|||||||
item->link.erase(sidStart, sidEnd - sidStart);
|
item->link.erase(sidStart, sidEnd - sidStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
xml.getChildText(node, "author", item->author);
|
if (feedFormat == FORMAT_ATOM) {
|
||||||
|
/* <author><name>... */
|
||||||
|
xmlNodePtr author = xml.findNode(node->children, "author", false);
|
||||||
|
if (author) {
|
||||||
|
xml.getChildText(node, "name", item->author);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
xml.getChildText(node, "author", item->author);
|
||||||
|
}
|
||||||
|
|
||||||
switch (feedFormat) {
|
switch (feedFormat) {
|
||||||
case FORMAT_RSS:
|
case FORMAT_RSS:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user