Browse Source

- Done optimizing foreach loops

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
17e0700a52
  1. 2
      src/httpconnection.cpp
  2. 3
      src/options_imp.cpp

2
src/httpconnection.cpp

@ -174,7 +174,7 @@ void HttpConnection::respondCommand(QString command) @@ -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());

3
src/options_imp.cpp

@ -49,8 +49,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ @@ -49,8 +49,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
setupUi(this);
// Get apply button in button box
QList<QAbstractButton *> buttons = buttonBox->buttons();
QAbstractButton *button;
foreach(button, buttons){
foreach(QAbstractButton *button, buttons){
if(buttonBox->buttonRole(button) == QDialogButtonBox::ApplyRole){
applyButton = button;
break;

Loading…
Cancel
Save