Skip to content

Commit 10e7d98

Browse files
committed
Fix all range loops
1 parent 4256777 commit 10e7d98

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

MainDialog.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ void MainDialog::dropEvent(QDropEvent *e)
407407
{
408408
QList<QUrl> urls = m->urls();
409409
cout << "Drag drop event with " << urls.length() << " URL(s):" << endl;
410-
for (QUrl url : urls)
410+
for (QUrl const &url : urls)
411411
{
412412
QString filename = url.toLocalFile();
413413
cout << filename.toStdString() << endl;
@@ -424,7 +424,7 @@ int MainDialog::exec()
424424
QDialog::show(); //show the window, so that frameGeometry will be correct.
425425
QRect r = QGuiApplication::primaryScreen()->geometry();
426426
this->move(r.width() - this->frameGeometry().width(), 0);
427-
for (QString image : filesToOpenAtStartup)
427+
for (QString const &image : filesToOpenAtStartup)
428428
openAndShow(-1, image);
429429
if (this->fillScreenAtStartup) {
430430
this->fillScreenWithOpenWindows();
@@ -458,7 +458,7 @@ void MainDialog::closeEvent(QCloseEvent *event)
458458

459459
if (ret == QMessageBox::Yes)
460460
{
461-
for ( QString fileToDelete : deletedFilesList)
461+
for ( QString const &fileToDelete : deletedFilesList)
462462
{
463463
QFile file(fileToDelete);
464464
if (file.remove())

main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
4242

4343
parser.process(app);
4444

45-
for (QString image : parser.positionalArguments())
45+
for (QString const &image : parser.positionalArguments())
4646
cout << "Will attempt to open " << image.toStdString() << " at startup." << endl;
4747

4848
MainDialog dlg;

0 commit comments

Comments
 (0)