| 103 | } |
| 104 | |
| 105 | QModelIndex SpreadsheetModel::index(const QString& text) const { |
| 106 | const int colCount = m_spreadsheet->columnCount(); |
| 107 | const int rowCount = m_spreadsheet->rowCount(); |
| 108 | for (int col = 0; col < colCount; ++col) { |
| 109 | auto* column = m_spreadsheet->column(col)->asStringColumn(); |
| 110 | for (int row = 0; row < rowCount; ++row) { |
| 111 | if (column->textAt(row).indexOf(text) != -1) |
| 112 | return createIndex(row, col); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | return createIndex(-1, -1); |
| 117 | } |
| 118 | |
| 119 | Spreadsheet* SpreadsheetModel::spreadsheet() { |
| 120 | return m_spreadsheet; |
nothing calls this directly
no test coverage detected