forked from qt-creator/qt-creator
Valgrind: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464 Change-Id: Ia507fb7aab405226a954b6059ef326e999a8171a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -735,7 +735,8 @@ void CallgrindToolPrivate::updateEventCombo()
|
||||
}
|
||||
|
||||
m_eventCombo->show();
|
||||
foreach (const QString &event, data->events())
|
||||
const QStringList events = data->events();
|
||||
for (const QString &event : events)
|
||||
m_eventCombo->addItem(ParseData::prettyStringForEvent(event));
|
||||
}
|
||||
|
||||
@@ -848,7 +849,7 @@ void CallgrindToolPrivate::editorOpened(IEditor *editor)
|
||||
void CallgrindToolPrivate::requestContextMenu(TextEditorWidget *widget, int line, QMenu *menu)
|
||||
{
|
||||
// Find callgrind text mark that corresponds to this editor's file and line number
|
||||
foreach (CallgrindTextMark *textMark, m_textMarks) {
|
||||
for (CallgrindTextMark *textMark : qAsConst(m_textMarks)) {
|
||||
if (textMark->fileName() == widget->textDocument()->filePath() && textMark->lineNumber() == line) {
|
||||
const Function *func = textMark->function();
|
||||
QAction *action = menu->addAction(CallgrindTool::tr("Select This Function in the Analyzer Output"));
|
||||
|
||||
Reference in New Issue
Block a user