mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Improved unicode support a bit
This commit is contained in:
parent
a28160bcaa
commit
8ba1cb329d
10 changed files with 48 additions and 46 deletions
|
@ -274,7 +274,7 @@ class RssStream : public QObject{
|
|||
// download the icon from the adress
|
||||
QString getIconUrl() {
|
||||
QUrl siteUrl(url);
|
||||
return QString("http://"+siteUrl.host()+"/favicon.ico");
|
||||
return QString::fromUtf8("http://")+siteUrl.host()+QString::fromUtf8("/favicon.ico");
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -282,12 +282,12 @@ class RssStream : public QObject{
|
|||
short readDoc(const QDomDocument& doc) {
|
||||
// is it a rss file ?
|
||||
QDomElement root = doc.documentElement();
|
||||
if(root.tagName() == "html"){
|
||||
if(root.tagName() == QString::fromUtf8("html")){
|
||||
qDebug("the file is empty, maybe the url is invalid or the server is too busy");
|
||||
return -1;
|
||||
}
|
||||
else if(root.tagName() != "rss"){
|
||||
qDebug("the file is not a rss stream, <rss> omitted: %s", (const char*)root.tagName().toUtf8());
|
||||
else if(root.tagName() != QString::fromUtf8("rss")){
|
||||
qDebug("the file is not a rss stream, <rss> omitted: %s", root.tagName().toUtf8().data());
|
||||
return -1;
|
||||
}
|
||||
QDomNode rss = root.firstChild();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue