|
|
@ -154,32 +154,24 @@ class RssStream : public QObject{ |
|
|
|
// display the icon in the rss window
|
|
|
|
// display the icon in the rss window
|
|
|
|
void displayIcon(QString, QString file_path) { |
|
|
|
void displayIcon(QString, QString file_path) { |
|
|
|
iconPath = file_path; |
|
|
|
iconPath = file_path; |
|
|
|
qDebug("Icon tmp path is %s", (const char*) file_path.toUtf8()); |
|
|
|
|
|
|
|
openIcon(); |
|
|
|
openIcon(); |
|
|
|
emit refreshFinished(url, ICON); |
|
|
|
emit refreshFinished(url, ICON); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
|
RssStream(QString _url) { |
|
|
|
RssStream(QString _url) { |
|
|
|
qDebug("New rss stream created"); |
|
|
|
|
|
|
|
url = _url; |
|
|
|
url = _url; |
|
|
|
alias = url; |
|
|
|
alias = url; |
|
|
|
read = true; |
|
|
|
read = true; |
|
|
|
downloadFailure = false; |
|
|
|
downloadFailure = false; |
|
|
|
qDebug("Creating rss & ico downloadThreads"); |
|
|
|
|
|
|
|
downloaderRss = new downloadThread(this); |
|
|
|
downloaderRss = new downloadThread(this); |
|
|
|
downloaderIcon = new downloadThread(this); |
|
|
|
downloaderIcon = new downloadThread(this); |
|
|
|
qDebug("RSS & ico downloaders created"); |
|
|
|
|
|
|
|
connect(downloaderRss, SIGNAL(downloadFinished(QString, QString)), this, SLOT(processDownloadedFile(QString, QString))); |
|
|
|
connect(downloaderRss, SIGNAL(downloadFinished(QString, QString)), this, SLOT(processDownloadedFile(QString, QString))); |
|
|
|
connect(downloaderRss, SIGNAL(downloadFailure(QString, QString)), this, SLOT(handleDownloadFailure(QString, QString))); |
|
|
|
connect(downloaderRss, SIGNAL(downloadFailure(QString, QString)), this, SLOT(handleDownloadFailure(QString, QString))); |
|
|
|
qDebug("RSS is calling downloadUrl"); |
|
|
|
|
|
|
|
downloaderRss->downloadUrl(url); |
|
|
|
downloaderRss->downloadUrl(url); |
|
|
|
qDebug("downloadUrl called, ok"); |
|
|
|
|
|
|
|
// XXX: remove it when gif can be displayed
|
|
|
|
// XXX: remove it when gif can be displayed
|
|
|
|
iconPath = ":/Icons/rss.png"; |
|
|
|
iconPath = ":/Icons/rss.png"; |
|
|
|
qDebug("Calling getIcon"); |
|
|
|
|
|
|
|
getIcon(); |
|
|
|
getIcon(); |
|
|
|
qDebug("getIcon called"); |
|
|
|
|
|
|
|
lastRefresh.start(); |
|
|
|
lastRefresh.start(); |
|
|
|
qDebug("RSSStream constructed"); |
|
|
|
qDebug("RSSStream constructed"); |
|
|
|
} |
|
|
|
} |
|
|
@ -460,9 +452,7 @@ class RssManager : public QObject{ |
|
|
|
unsigned int streamListUrlSize = streamListUrl.size(); |
|
|
|
unsigned int streamListUrlSize = streamListUrl.size(); |
|
|
|
for(unsigned int i=0; i<streamListUrlSize; ++i){ |
|
|
|
for(unsigned int i=0; i<streamListUrlSize; ++i){ |
|
|
|
RssStream *stream = new RssStream(streamListUrl.at(i)); |
|
|
|
RssStream *stream = new RssStream(streamListUrl.at(i)); |
|
|
|
qDebug("Setting rss alias"); |
|
|
|
|
|
|
|
stream->setAlias(streamListAlias.at(i)); |
|
|
|
stream->setAlias(streamListAlias.at(i)); |
|
|
|
qDebug("RSS Alias set"); |
|
|
|
|
|
|
|
streamList.append(stream); |
|
|
|
streamList.append(stream); |
|
|
|
connect(stream, SIGNAL(refreshFinished(QString, const unsigned short&)), this, SLOT(streamNeedRefresh(QString, const unsigned short&))); |
|
|
|
connect(stream, SIGNAL(refreshFinished(QString, const unsigned short&)), this, SLOT(streamNeedRefresh(QString, const unsigned short&))); |
|
|
|
} |
|
|
|
} |
|
|
|