Improvement to last commit

This commit is contained in:
Christophe Dumez
2010-12-25 09:24:33 +00:00
parent e2edf62834
commit f08d792e67

View File

@@ -240,6 +240,11 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
// Populate the transfer list
transferList->getSourceModel()->populate();
// Update the number of torrents (tab)
updateNbTorrents();
connect(transferList->getSourceModel(), SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(updateNbTorrents()));
connect(transferList->getSourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), this, SLOT(updateNbTorrents()));
qDebug("GUI Built");
#ifdef Q_WS_WIN
if(!pref.neverCheckFileAssoc() && !Preferences::isFileAssocOk()) {
@@ -262,10 +267,6 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
updater->checkForUpdates();
#endif
// Update the number of torrents (tab)
updateNbTorrents();
connect(transferList->getSourceModel(), SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(updateNbTorrents()));
connect(transferList->getSourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), this, SLOT(updateNbTorrents()));
}
void MainWindow::deleteBTSession() {