| 383 | } |
| 384 | |
| 385 | ResultItem *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 | |
| 401 | void ResultsTree::clear() |
| 402 | { |