| 87 | } |
| 88 | |
| 89 | QString keyToString(const QString &key) |
| 90 | { |
| 91 | using std::begin; |
| 92 | using std::end; |
| 93 | if (std::find_first_of(begin(key), end(key), begin(special_chars), end(special_chars)) == end(key) |
| 94 | && key != QLatin1String("AND") |
| 95 | && key != QLatin1String("OR") |
| 96 | && key != QLatin1String("SYMBOL")) |
| 97 | return key; |
| 98 | else |
| 99 | return QLatin1Char('"') + toEscaped(key) + QLatin1Char('"'); |
| 100 | } |
| 101 | |
| 102 | |
| 103 | /** |
no test coverage detected