| 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 | |
| 43 | private: |
| 44 | void Save() |