MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / findFileItem

Method findFileItem

gui/resultstree.cpp:385–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385ResultItem *ResultsTree::findFileItem(const QString &name) const
386{
387 // The first column contains the file name. In Windows we can get filenames
388 // "header.h" and "Header.h" and must compare them as identical.
389
390 for (int i = 0; i < mModel->rowCount(); i++) {
391#ifdef _WIN32
392 if (QString::compare(mModel->item(i, COLUMN_FILE)->text(), name, Qt::CaseInsensitive) == 0)
393#else
394 if (mModel->item(i, COLUMN_FILE)->text() == name)
395#endif
396 return dynamic_cast<ResultItem*>(mModel->item(i, COLUMN_FILE));
397 }
398 return nullptr;
399}
400
401void ResultsTree::clear()
402{

Callers

nothing calls this directly

Calls 1

rowCountMethod · 0.80

Tested by

no test coverage detected