Changeset 13555


Ignore:
Timestamp:
Oct 8, 2012, 4:23:39 AM (9 years ago)
Author:
jordan
Message:

(trunk qt) #5059 'Memory leak in the TrMainWindow? :: openTorrent' -- fixed.

Location:
trunk/qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/mainwin.cc

    r13446 r13555  
    11471147                                    tr( "Torrent Files (*.torrent);;All Files (*.*)" ) );
    11481148    myFileDialog->setFileMode( QFileDialog::ExistingFiles );
     1149    myFileDialog->setAttribute( Qt::WA_DeleteOnClose );
    11491150
    11501151    QCheckBox * button = new QCheckBox( tr( "Show &options dialog" ) );
  • trunk/qt/make-dialog.cc

    r13106 r13555  
    176176    QFileDialog * d = new QFileDialog( this, tr( "Select File" ) );
    177177    d->setFileMode( QFileDialog::ExistingFile );
     178    d->setAttribute( Qt::WA_DeleteOnClose );
    178179    connect( d, SIGNAL(filesSelected(const QStringList&)),
    179180             this, SLOT(onFileSelected(const QStringList&)) );
     
    198199{
    199200    QFileDialog * d = new QFileDialog( this, tr( "Select Folder" ) );
    200     d->setFileMode( QFileDialog::DirectoryOnly );
     201    d->setFileMode( QFileDialog::Directory );
     202    d->setOption( QFileDialog::ShowDirsOnly );
     203    d->setAttribute( Qt::WA_DeleteOnClose );
    201204    connect( d, SIGNAL(filesSelected(const QStringList&)),
    202205             this, SLOT(onFolderSelected(const QStringList&)) );
     
    221224{
    222225    QFileDialog * d = new QFileDialog( this, tr( "Select Folder" ) );
    223     d->setFileMode( QFileDialog::DirectoryOnly );
     226    d->setFileMode( QFileDialog::Directory );
     227    d->setOption( QFileDialog::ShowDirsOnly );
     228    d->setAttribute( Qt::WA_DeleteOnClose );
    224229    connect( d, SIGNAL(filesSelected(const QStringList&)),
    225230             this, SLOT(onDestinationSelected(const QStringList&)) );
  • trunk/qt/options.cc

    r13447 r13555  
    421421                                           tr( "Torrent Files (*.torrent);;All Files (*.*)" ) );
    422422        d->setFileMode( QFileDialog::ExistingFile );
     423        d->setAttribute( Qt::WA_DeleteOnClose );
    423424        connect( d, SIGNAL(filesSelected(const QStringList&)), this, SLOT(onFilesSelected(const QStringList&)) );
    424425        d->show( );
     
    444445                                       myDestination.absolutePath( ) );
    445446    d->setFileMode( QFileDialog::Directory );
     447    d->setAttribute( Qt::WA_DeleteOnClose );
    446448    connect( d, SIGNAL(filesSelected(const QStringList&)), this, SLOT(onDestinationsSelected(const QStringList&)) );
    447449    d->show( );
Note: See TracChangeset for help on using the changeset viewer.