Commit d6d298e8 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Don't use range-based loops with Qt containers

REVIEW: 127317
parent 3687345d
......@@ -138,7 +138,7 @@ void ExportMenu::getKipiItems()
KIPI::PluginLoader::PluginList pluginList = loader->pluginList();
for (auto pluginInfo: pluginList) {
Q_FOREACH (const auto &pluginInfo, pluginList) {
if (!(pluginInfo->shouldLoad())) {
continue;
}
......@@ -154,7 +154,7 @@ void ExportMenu::getKipiItems()
QList<QAction *> actions = plugin->actions();
QSet<QAction *> exportActions;
for (auto action: actions) {
Q_FOREACH (auto action, actions) {
KIPI::Category category = plugin->category(action);
if (category == KIPI::ExportPlugin) {
exportActions += action;
......@@ -163,7 +163,7 @@ void ExportMenu::getKipiItems()
}
}
for (auto action: exportActions) {
Q_FOREACH (auto action, exportActions) {
mKipiMenu->addAction(action);
}
}
......
......@@ -27,7 +27,7 @@ KSGKipiImageCollectionSelector::KSGKipiImageCollectionSelector(KIPI::Interface *
mInterface(interface),
mListWidget(new QListWidget)
{
for(auto collection: interface->allAlbums()) {
Q_FOREACH (const auto &collection, interface->allAlbums()) {
QListWidgetItem *item = new QListWidgetItem(mListWidget);
QString name = collection.name();
int imageCount = collection.images().size();
......@@ -53,7 +53,7 @@ QList<KIPI::ImageCollection> KSGKipiImageCollectionSelector::selectedImageCollec
QList<KIPI::ImageCollection> selectedList;
if (item) {
QString name = item->data(Qt::UserRole).toString();
for(auto collection: mInterface->allAlbums()) {
Q_FOREACH (const auto &collection, mInterface->allAlbums()) {
if (collection.name() == name) {
selectedList.append(collection);
break;
......
......@@ -125,7 +125,7 @@ void X11ImageGrabber::doOnClickGrab()
QByteArrayLiteral("cross-reverse")
};
for (auto cursorName: cursorNames) {
Q_FOREACH (const QByteArray &cursorName, cursorNames) {
xcb_cursor_t cursor = xcb_cursor_load_cursor(xcbCursorCtx, cursorName.constData());
if (cursor != XCB_CURSOR_NONE) {
xcbCursor = cursor;
......
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