mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 16:32:16 -07:00
fix build failure
This commit is contained in:
parent
7e9bfd8fed
commit
5a950303da
1 changed files with 6 additions and 1 deletions
|
|
@ -150,7 +150,12 @@ void ShortcutTreeView::currentChanged(const QModelIndex ¤t, const QModelIn
|
|||
*/
|
||||
void ShortcutTreeView::updateSearchString(const QString &searchString)
|
||||
{
|
||||
QStringList searchWords = searchString.split(" ", Qt::SkipEmptyParts);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
|
||||
const auto skipEmptyParts = Qt::SkipEmptyParts;
|
||||
#else
|
||||
const auto skipEmptyParts = QString::SkipEmptyParts;
|
||||
#endif
|
||||
QStringList searchWords = searchString.split(" ", skipEmptyParts);
|
||||
|
||||
auto escapeRegex = [](const QString &s) { return QRegularExpression::escape(s); };
|
||||
std::transform(searchWords.begin(), searchWords.end(), searchWords.begin(), escapeRegex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue