mirror of
https://github.com/transmission/transmission
synced 2025-02-21 13:46:52 +00:00
(qt) #3312:Error in r10722 (fix for #3255)
This commit is contained in:
parent
51fc9cd34f
commit
fab8e5e691
1 changed files with 9 additions and 9 deletions
|
@ -1175,7 +1175,7 @@ void
|
|||
TrMainWindow :: removeTorrents( const bool deleteFiles )
|
||||
{
|
||||
QSet<int> ids;
|
||||
QMessageBox * msgBox = new QMessageBox( this );
|
||||
QMessageBox msgBox( this );
|
||||
QString primary_text, secondary_text;
|
||||
int incomplete = 0;
|
||||
int connected = 0;
|
||||
|
@ -1248,18 +1248,18 @@ TrMainWindow :: removeTorrents( const bool deleteFiles )
|
|||
}
|
||||
}
|
||||
|
||||
msgBox->setWindowTitle( QString(" ") );
|
||||
msgBox->setText( QString( "<big><b>%1</big></b>" ).arg( primary_text ) );
|
||||
msgBox->setInformativeText( secondary_text );
|
||||
msgBox->setStandardButtons( QMessageBox::Ok | QMessageBox::Cancel );
|
||||
msgBox->setDefaultButton( QMessageBox::Cancel );
|
||||
msgBox->setIcon( QMessageBox::Question );
|
||||
msgBox.setWindowTitle( QString(" ") );
|
||||
msgBox.setText( QString( "<big><b>%1</big></b>" ).arg( primary_text ) );
|
||||
msgBox.setInformativeText( secondary_text );
|
||||
msgBox.setStandardButtons( QMessageBox::Ok | QMessageBox::Cancel );
|
||||
msgBox.setDefaultButton( QMessageBox::Cancel );
|
||||
msgBox.setIcon( QMessageBox::Question );
|
||||
/* hack needed to keep the dialog from being too narrow */
|
||||
QGridLayout* layout = (QGridLayout*)msgBox->layout();
|
||||
QGridLayout* layout = (QGridLayout*)msgBox.layout();
|
||||
QSpacerItem* spacer = new QSpacerItem( 450, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
layout->addItem( spacer, layout->rowCount(), 0, 1, layout->columnCount() );
|
||||
|
||||
if( msgBox->exec() == QMessageBox::Ok )
|
||||
if( msgBox.exec() == QMessageBox::Ok )
|
||||
{
|
||||
ui.listView->selectionModel()->clear();
|
||||
mySession.removeTorrents( ids, deleteFiles );
|
||||
|
|
Loading…
Reference in a new issue