From 17e0700a524d46a49fe70077d5b7997326f82f33 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 24 Jan 2009 20:07:05 +0000 Subject: [PATCH] - Done optimizing foreach loops --- src/httpconnection.cpp | 2 +- src/options_imp.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/httpconnection.cpp b/src/httpconnection.cpp index 7b889ffb4..486ea845b 100644 --- a/src/httpconnection.cpp +++ b/src/httpconnection.cpp @@ -174,7 +174,7 @@ void HttpConnection::respondCommand(QString command) { QString urls = parser.post("urls"); QStringList list = urls.split('\n'); - foreach(QString url, list){ + foreach(QString url, list){ url = url.trimmed(); if(!url.isEmpty()){ qDebug("Downloading url: %s", (const char*)url.toUtf8()); diff --git a/src/options_imp.cpp b/src/options_imp.cpp index 8be94f1ab..890ea2271 100644 --- a/src/options_imp.cpp +++ b/src/options_imp.cpp @@ -49,8 +49,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ setupUi(this); // Get apply button in button box QList buttons = buttonBox->buttons(); - QAbstractButton *button; - foreach(button, buttons){ + foreach(QAbstractButton *button, buttons){ if(buttonBox->buttonRole(button) == QDialogButtonBox::ApplyRole){ applyButton = button; break;