Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Port away from foreach

parent f4dea91d
......@@ -566,8 +566,8 @@ void KmagApp::saveZoomPixmap()
}
QStringList mimeTypes;
QList<QByteArray> supported = QImageWriter::supportedMimeTypes();
foreach (QByteArray mimeType, supported) {
const QList<QByteArray> supported = QImageWriter::supportedMimeTypes();
for (const QByteArray& mimeType : supported) {
mimeTypes.append(QString::fromLatin1(mimeType));
}
......
......@@ -974,7 +974,7 @@ void KMagZoomView::grabFrame()
// ... but exclude own popups ...
const QList<QWidget *> siblings = QApplication::topLevelWidgets();
foreach (QWidget *sibling, siblings) {
for (QWidget *sibling : siblings) {
if (sibling != window() && (sibling->windowType() & Qt::Window) && sibling->isVisible()) {
QRect rect = sibling->frameGeometry();
rect.translate(-selRect.topLeft());
......@@ -983,7 +983,7 @@ void KMagZoomView::grabFrame()
}
QPainter p(&m_coloredPixmap);
foreach (const QRect &rect, region.rects()) {
for (const QRect &rect : region) {
p.fillRect(rect, palette().dark());
}
p.end();
......
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