MCPcopy Create free account
hub / github.com/Artikash/Textractor / SetRegex

Method SetRegex

extensions/regexfilter.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 void SetRegex(QString regex)
34 {
35 ui.regexEdit->setText(regex);
36 std::scoped_lock lock(m);
37 if (!regex.isEmpty()) try { ::regex = S(regex); }
38 catch (std::regex_error) { return ui.output->setText(INVALID_REGEX); }
39 else ::regex = std::nullopt;
40 ui.output->setText(QString(CURRENT_FILTER).arg(regex));
41 }
42
43private:
44 void Save()

Callers

nothing calls this directly

Calls 1

SFunction · 0.85

Tested by

no test coverage detected