summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <[email protected]>2016-03-20 11:31:14 +0100
committerDaniel Vrátil <[email protected]>2016-03-20 11:32:07 +0100
commitd6d298e812cea42ca11df1581d09018b6e2939d9 (patch)
tree64d741d4d25d13eecae4aadd7fe29613348a647b
parent3687345d177886ff2b7a7352ea762adfa663e23c (diff)
Don't use range-based loops with Qt containers
REVIEW: 127317
-rw-r--r--src/Gui/ExportMenu.cpp6
-rw-r--r--src/KipiInterface/KSGKipiImageCollectionSelector.cpp4
-rw-r--r--src/PlatformBackends/X11ImageGrabber.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/Gui/ExportMenu.cpp b/src/Gui/ExportMenu.cpp
index 0232f4e..50333e0 100644
--- a/src/Gui/ExportMenu.cpp
+++ b/src/Gui/ExportMenu.cpp
@@ -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);
}
}
diff --git a/src/KipiInterface/KSGKipiImageCollectionSelector.cpp b/src/KipiInterface/KSGKipiImageCollectionSelector.cpp
index 8a5786c..c6a9676 100644
--- a/src/KipiInterface/KSGKipiImageCollectionSelector.cpp
+++ b/src/KipiInterface/KSGKipiImageCollectionSelector.cpp
@@ -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;
diff --git a/src/PlatformBackends/X11ImageGrabber.cpp b/src/PlatformBackends/X11ImageGrabber.cpp
index 61fce53..d6dc197 100644
--- a/src/PlatformBackends/X11ImageGrabber.cpp
+++ b/src/PlatformBackends/X11ImageGrabber.cpp
@@ -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;