Gui: Use auto and range-based for (#7481)

* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
This commit is contained in:
berniev
2022-09-15 04:25:13 +10:00
committed by GitHub
parent d7792826b4
commit 75acacd1b7
175 changed files with 2051 additions and 2057 deletions

View File

@@ -110,10 +110,10 @@ EditorView::EditorView(QPlainTextEdit* editor, QWidget* parent)
connect(editor, SIGNAL(findPrevious()), d->searchBar, SLOT(findPrevious()));
// Create the layout containing the workspace and a tab bar
QFrame* hbox = new QFrame(this);
auto hbox = new QFrame(this);
hbox->setFrameShape(QFrame::StyledPanel);
hbox->setFrameShadow(QFrame::Sunken);
QVBoxLayout* layout = new QVBoxLayout();
auto layout = new QVBoxLayout();
layout->setMargin(1);
layout->addWidget(d->textEdit);
layout->addWidget(d->searchBar);