| 189 | } |
| 190 | |
| 191 | static bool stringMatches(const std::string &text) |
| 192 | { |
| 193 | const auto &settings = GetMacroSearchSettings(); |
| 194 | const auto ®ex = settings.regex; |
| 195 | const auto &searchString = settings.searchString; |
| 196 | |
| 197 | if (regex.Enabled()) { |
| 198 | return regex.Matches(text, searchString); |
| 199 | } |
| 200 | |
| 201 | return QString::fromStdString(text).contains( |
| 202 | QString::fromStdString(searchString), Qt::CaseInsensitive); |
| 203 | } |
| 204 | |
| 205 | static bool segmentTypeMatches(MacroSegment *segment, bool isCondition) |
| 206 | { |
no test coverage detected