Debugger: Remove foreach / Q_FOREACH usage

Task-number: QTCREATORBUG-27464
Change-Id: Ib49afb4d0283aeeffead6b31e1a3d0bcb9a7ae14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Artem Sokolovskii
2022-04-29 12:43:37 +02:00
parent fbefd45b94
commit 27fddc8dc7
10 changed files with 54 additions and 40 deletions

View File

@@ -1319,7 +1319,8 @@ void DebuggerToolTipManagerPrivate::leavingDebugMode()
hideAllToolTips();
if (QWidget *topLevel = ICore::mainWindow()->topLevelWidget())
topLevel->removeEventFilter(this);
foreach (IEditor *e, DocumentModel::editorsForOpenedDocuments()) {
const QList<IEditor *> editors = DocumentModel::editorsForOpenedDocuments();
for (IEditor *e : editors) {
if (auto toolTipEditor = qobject_cast<BaseTextEditor *>(e)) {
toolTipEditor->editorWidget()->verticalScrollBar()->disconnect(this);
toolTipEditor->editorWidget()->disconnect(this);