1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

- Updated selectFirstFeed() function due to code rewrite

This commit is contained in:
Christophe Dumez 2009-08-23 13:35:45 +00:00
parent 3550e31871
commit 06fb19e8be
4 changed files with 5 additions and 14 deletions

View File

@ -32,8 +32,11 @@ public:
void itemAdded(QTreeWidgetItem *item, RssFile* file) {
mapping[item] = file;
if(file->getType() == RssFile::STREAM)
if(file->getType() == RssFile::STREAM) {
feeds_items[file->getID()] = item;
if(topLevelItemCount() == 1)
setCurrentItem(item);
}
}
void itemRemoved(QTreeWidgetItem *item) {

View File

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

View File

@ -68,7 +68,6 @@ protected slots:
void openNewsUrl();
void downloadTorrent();
void fillFeedsList(QTreeWidgetItem *parent=0, RssFolder *rss_parent=0);
void selectFirstFeed();
void saveSlidersPosition();
void restoreSlidersPosition();
void showFeedDownloader();

View File

@ -14,7 +14,7 @@ CONFIG += qt \
network
# Update this VERSION for each release
DEFINES += VERSION=\\\"v1.5.0beta1\\\"
DEFINES += VERSION=\\\"v1.5.0beta2\\\"
DEFINES += VERSION_MAJOR=1
DEFINES += VERSION_MINOR=5
DEFINES += VERSION_BUGFIX=0