From ab579e34498279ec338b6bbf81156d3058c20a34 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 25 Dec 2010 09:23:04 +0000 Subject: [PATCH] Improvement to last commit --- src/mainwindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8d8f752f9..aea4bd2e8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -252,6 +252,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()) { @@ -276,10 +281,6 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo } #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() {