(trunk qt) #5059 'Memory leak in the TrMainWindow :: openTorrent' -- fixed.
This commit is contained in:
parent
4dd6e35bd7
commit
792215c5e9
|
@ -1146,6 +1146,7 @@ TrMainWindow :: openTorrent( )
|
|||
myPrefs.getString( Prefs::OPEN_DIALOG_FOLDER ),
|
||||
tr( "Torrent Files (*.torrent);;All Files (*.*)" ) );
|
||||
myFileDialog->setFileMode( QFileDialog::ExistingFiles );
|
||||
myFileDialog->setAttribute( Qt::WA_DeleteOnClose );
|
||||
|
||||
QCheckBox * button = new QCheckBox( tr( "Show &options dialog" ) );
|
||||
button->setChecked( myPrefs.getBool( Prefs::OPTIONS_PROMPT ) );
|
||||
|
|
|
@ -175,6 +175,7 @@ MakeDialog :: onFileClicked( )
|
|||
{
|
||||
QFileDialog * d = new QFileDialog( this, tr( "Select File" ) );
|
||||
d->setFileMode( QFileDialog::ExistingFile );
|
||||
d->setAttribute( Qt::WA_DeleteOnClose );
|
||||
connect( d, SIGNAL(filesSelected(const QStringList&)),
|
||||
this, SLOT(onFileSelected(const QStringList&)) );
|
||||
d->show( );
|
||||
|
@ -197,7 +198,9 @@ void
|
|||
MakeDialog :: onFolderClicked( )
|
||||
{
|
||||
QFileDialog * d = new QFileDialog( this, tr( "Select Folder" ) );
|
||||
d->setFileMode( QFileDialog::DirectoryOnly );
|
||||
d->setFileMode( QFileDialog::Directory );
|
||||
d->setOption( QFileDialog::ShowDirsOnly );
|
||||
d->setAttribute( Qt::WA_DeleteOnClose );
|
||||
connect( d, SIGNAL(filesSelected(const QStringList&)),
|
||||
this, SLOT(onFolderSelected(const QStringList&)) );
|
||||
d->show( );
|
||||
|
@ -220,7 +223,9 @@ void
|
|||
MakeDialog :: onDestinationClicked( )
|
||||
{
|
||||
QFileDialog * d = new QFileDialog( this, tr( "Select Folder" ) );
|
||||
d->setFileMode( QFileDialog::DirectoryOnly );
|
||||
d->setFileMode( QFileDialog::Directory );
|
||||
d->setOption( QFileDialog::ShowDirsOnly );
|
||||
d->setAttribute( Qt::WA_DeleteOnClose );
|
||||
connect( d, SIGNAL(filesSelected(const QStringList&)),
|
||||
this, SLOT(onDestinationSelected(const QStringList&)) );
|
||||
d->show( );
|
||||
|
|
|
@ -420,6 +420,7 @@ Options :: onFilenameClicked( )
|
|||
QFileInfo(myAdd.filename).absolutePath(),
|
||||
tr( "Torrent Files (*.torrent);;All Files (*.*)" ) );
|
||||
d->setFileMode( QFileDialog::ExistingFile );
|
||||
d->setAttribute( Qt::WA_DeleteOnClose );
|
||||
connect( d, SIGNAL(filesSelected(const QStringList&)), this, SLOT(onFilesSelected(const QStringList&)) );
|
||||
d->show( );
|
||||
}
|
||||
|
@ -443,6 +444,7 @@ Options :: onDestinationClicked( )
|
|||
tr( "Select Destination" ),
|
||||
myDestination.absolutePath( ) );
|
||||
d->setFileMode( QFileDialog::Directory );
|
||||
d->setAttribute( Qt::WA_DeleteOnClose );
|
||||
connect( d, SIGNAL(filesSelected(const QStringList&)), this, SLOT(onDestinationsSelected(const QStringList&)) );
|
||||
d->show( );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue