MCPcopy Create free account
hub / github.com/cxasm/notepad-- / on_mark

Method on_mark

src/batchfindreplace.cpp:316–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316void 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
345void BatchFindReplace::on_clearMark()
346{

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.80
appendMethod · 0.80
textMethod · 0.45
markAtBackMethod · 0.45

Tested by

no test coverage detected