|
|
@ -162,8 +162,6 @@ void RSSImp::on_newFeedButton_clicked() { |
|
|
|
// Set text
|
|
|
|
// Set text
|
|
|
|
item->setText(0, stream->getName() + QString::fromUtf8(" (0)")); |
|
|
|
item->setText(0, stream->getName() + QString::fromUtf8(" (0)")); |
|
|
|
item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png"))); |
|
|
|
item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png"))); |
|
|
|
if(listStreams->topLevelItemCount() == 1) |
|
|
|
|
|
|
|
selectFirstFeed(); |
|
|
|
|
|
|
|
stream->refresh(); |
|
|
|
stream->refresh(); |
|
|
|
rssmanager->saveStreamList(); |
|
|
|
rssmanager->saveStreamList(); |
|
|
|
} |
|
|
|
} |
|
|
@ -471,8 +469,6 @@ RSSImp::RSSImp(bittorrent *BTSession) : QWidget(), BTSession(BTSession){ |
|
|
|
connect(listNews, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(refreshTextBrowser(QListWidgetItem *))); |
|
|
|
connect(listNews, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(refreshTextBrowser(QListWidgetItem *))); |
|
|
|
connect(listNews, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(downloadTorrent())); |
|
|
|
connect(listNews, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(downloadTorrent())); |
|
|
|
|
|
|
|
|
|
|
|
// Select first news of first feed
|
|
|
|
|
|
|
|
selectFirstFeed(); |
|
|
|
|
|
|
|
// Refresh all feeds
|
|
|
|
// Refresh all feeds
|
|
|
|
rssmanager->refreshAll(); |
|
|
|
rssmanager->refreshAll(); |
|
|
|
// Restore sliders position
|
|
|
|
// Restore sliders position
|
|
|
@ -484,13 +480,6 @@ RSSImp::RSSImp(bittorrent *BTSession) : QWidget(), BTSession(BTSession){ |
|
|
|
qDebug("RSSImp constructed"); |
|
|
|
qDebug("RSSImp constructed"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void RSSImp::selectFirstFeed(){ |
|
|
|
|
|
|
|
if(listStreams->topLevelItemCount()){ |
|
|
|
|
|
|
|
QTreeWidgetItem *first = listStreams->topLevelItem(0); |
|
|
|
|
|
|
|
listStreams->setCurrentItem(first); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RSSImp::~RSSImp(){ |
|
|
|
RSSImp::~RSSImp(){ |
|
|
|
qDebug("Deleting RSSImp..."); |
|
|
|
qDebug("Deleting RSSImp..."); |
|
|
|
delete listStreams; |
|
|
|
delete listStreams; |
|
|
|