mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
- Done optimizing foreach loops
This commit is contained in:
@@ -49,8 +49,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
|
|||||||
setupUi(this);
|
setupUi(this);
|
||||||
// Get apply button in button box
|
// Get apply button in button box
|
||||||
QList<QAbstractButton *> buttons = buttonBox->buttons();
|
QList<QAbstractButton *> buttons = buttonBox->buttons();
|
||||||
QAbstractButton *button;
|
foreach(QAbstractButton *button, buttons){
|
||||||
foreach(button, buttons){
|
|
||||||
if(buttonBox->buttonRole(button) == QDialogButtonBox::ApplyRole){
|
if(buttonBox->buttonRole(button) == QDialogButtonBox::ApplyRole){
|
||||||
applyButton = button;
|
applyButton = button;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user