mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
- Done optimizing foreach loops
This commit is contained in:
parent
cc77b2f578
commit
17e0700a52
@ -174,7 +174,7 @@ void HttpConnection::respondCommand(QString command)
|
|||||||
{
|
{
|
||||||
QString urls = parser.post("urls");
|
QString urls = parser.post("urls");
|
||||||
QStringList list = urls.split('\n');
|
QStringList list = urls.split('\n');
|
||||||
foreach(QString url, list){
|
foreach(QString url, list){
|
||||||
url = url.trimmed();
|
url = url.trimmed();
|
||||||
if(!url.isEmpty()){
|
if(!url.isEmpty()){
|
||||||
qDebug("Downloading url: %s", (const char*)url.toUtf8());
|
qDebug("Downloading url: %s", (const char*)url.toUtf8());
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user