diff --git a/qt/details.cc b/qt/details.cc index a16ea425c..6df6f9011 100644 --- a/qt/details.cc +++ b/qt/details.cc @@ -145,8 +145,9 @@ Details :: Details( Session& session, Prefs& prefs, TorrentModel& model, QWidget layout->addWidget( t ); QDialogButtonBox * buttons = new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this ); - connect( buttons, SIGNAL(rejected()), this, SLOT(deleteLater())); + connect( buttons, SIGNAL(rejected()), this, SLOT(close())); layout->addWidget( buttons ); + QWidget::setAttribute( Qt::WA_DeleteOnClose, true ); connect( &myTimer, SIGNAL(timeout()), this, SLOT(onTimer())); @@ -835,9 +836,7 @@ Details :: refresh( ) myPeers = peers2; if( single ) - { myFileTreeView->update( torrents[0]->files( ) , myChangedTorrents ); - } else myFileTreeView->clear( ); diff --git a/qt/prefs-dialog.cc b/qt/prefs-dialog.cc index e4ba3659c..88a2b3974 100644 --- a/qt/prefs-dialog.cc +++ b/qt/prefs-dialog.cc @@ -620,8 +620,9 @@ PrefsDialog :: PrefsDialog( Session& session, Prefs& prefs, QWidget * parent ): myLayout->addWidget( t ); QDialogButtonBox * buttons = new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this ); - connect( buttons, SIGNAL(rejected()), this, SLOT(deleteLater()) ); // "close" triggers rejected + connect( buttons, SIGNAL(rejected()), this, SLOT(close()) ); // "close" triggers rejected myLayout->addWidget( buttons ); + QWidget::setAttribute( Qt::WA_DeleteOnClose, true ); connect( &mySession, SIGNAL(sessionUpdated()), this, SLOT(sessionUpdated()));