From a785a3f264c0efad18e3e459158c22af081db9b1 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 14 May 2010 15:25:39 +0200 Subject: Fix calls to setFsFree() Move connect() to constructor and also recalculate free space after removing files by connecting to rowsRemoved(QModelIndex,int,int). --- shemov.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index 0817180..d111a2d 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -98,6 +98,9 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mFSWidget, SIGNAL(newTemplate(const QString &)), this, SLOT(setTemplate(const QString &))); connect(mAVWidget, SIGNAL(statusbarMessage(const QString &)), this, SLOT(statusbarMessage(const QString &))); connect(mTab, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int))); + connect(mFSWidget->dirModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(setFsFree())); + connect(mFSWidget->dirModel(), SIGNAL(layoutChanged()), this, SLOT(setFsFree())); + connect(mFSWidget->dirModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(setFsFree())); QWidget *centralWidget = new QWidget; centralWidget->setLayout(mainLayout); @@ -351,8 +354,7 @@ void SheMov::createActions(){ mOpenWithMapperAV = new QSignalMapper(this); connect(mOpenWithMapperFS, SIGNAL(mapped(QString)), mFSWidget, SLOT(playSelected(QString))); connect(mOpenWithMapperAV, SIGNAL(mapped(QString)), mAVWidget, SLOT(playSelected(QString))); - connect(mFSWidget->dirModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(setFsFree())); - connect(mFSWidget->dirModel(), SIGNAL(layoutChanged()), this, SLOT(setFsFree())); + } void SheMov::createMenus(){ -- cgit v1.2.3-70-g09d2