| 314 | } |
| 315 | |
| 316 | void BatchFindReplace::on_mark() |
| 317 | { |
| 318 | if (m_mainNotepad != nullptr) |
| 319 | { |
| 320 | int rowNums = ui.findReplaceTable->rowCount(); |
| 321 | if (rowNums == 0) |
| 322 | { |
| 323 | CTipWin::showTips(this, tr("Please fresh first !"), 1200); |
| 324 | return; |
| 325 | } |
| 326 | int markTimes = 0; |
| 327 | |
| 328 | QStringList findKeyList; |
| 329 | |
| 330 | for (int i = 0; i < rowNums; ++i) |
| 331 | { |
| 332 | QTableWidgetItem* item = ui.findReplaceTable->item(i, 0); |
| 333 | if (item != nullptr && !item->text().isEmpty()) |
| 334 | { |
| 335 | findKeyList.append(item->text()); |
| 336 | } |
| 337 | } |
| 338 | |
| 339 | markTimes = m_mainNotepad->markAtBack(findKeyList); |
| 340 | |
| 341 | ui.statusBar->showMessage(tr("Batch Mark Finished, total Mark %1 times !").arg(markTimes), 10000); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | void BatchFindReplace::on_clearMark() |
| 346 | { |
nothing calls this directly
no test coverage detected