Commit d4aa0fc3 authored by Andrius Štikonas's avatar Andrius Štikonas

Q_FOREACH -> C++11 for.

parent d03cbf12
......@@ -183,9 +183,9 @@ void SettingsDialog::newButtonClicked()
void SettingsDialog::removeButtonClicked()
{
QModelIndexList indexes = ui->tealistTreeView->selectionModel()->selectedIndexes();
const QModelIndexList indexes = ui->tealistTreeView->selectionModel()->selectedIndexes();
foreach(const QModelIndex &index, indexes) {
for (const QModelIndex &index : indexes) {
// Only delete a row when column==0, otherwise the row will be delete
// multiple times (the loop iterate over every cell, not over rows).
if( index.column() == 0 ) {
......
......@@ -160,7 +160,8 @@ void TopLevel::setTeaList(const QList<Tea> &tealist) {
tealistGroup.config()->sync();
foreach(QAction* a, m_teaActionGroup->actions() ) {
const auto actions = m_teaActionGroup->actions();
for ( QAction* a : actions ) {
m_teaActionGroup->removeAction( a );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment