diff options
Diffstat (limited to 'src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp')
-rw-r--r-- | src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp b/src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp index 7c44ec4f7..190540db2 100644 --- a/src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp +++ b/src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp @@ -100,19 +100,17 @@ void QDesignerFormWindowCommand::updateBuddies(QDesignerFormWindowInterface *for { QExtensionManager* extensionManager = form->core()->extensionManager(); - using LabelList = QList<QLabel *>; - - const LabelList label_list = form->findChildren<QLabel*>(); - if (label_list.empty()) + const auto label_list = form->findChildren<QLabel*>(); + if (label_list.isEmpty()) return; const QString buddyProperty = QStringLiteral("buddy"); const QByteArray oldNameU8 = old_name.toUtf8(); const QByteArray newNameU8 = new_name.toUtf8(); - const LabelList::const_iterator cend = label_list.constEnd(); - for (LabelList::const_iterator it = label_list.constBegin(); it != cend; ++it ) { - if (QDesignerPropertySheetExtension* sheet = qt_extension<QDesignerPropertySheetExtension*>(extensionManager, *it)) { + for (QLabel *label : label_list) { + if (QDesignerPropertySheetExtension* sheet = + qt_extension<QDesignerPropertySheetExtension*>(extensionManager, label)) { const int idx = sheet->indexOf(buddyProperty); if (idx != -1) { const QByteArray oldBuddy = sheet->property(idx).toByteArray(); |