From bebfdad52f30fa99f4c9ec279b3f6828b36df84c Mon Sep 17 00:00:00 2001 From: RickyRister Date: Thu, 12 Dec 2024 08:50:07 -0800 Subject: [PATCH] explain what the numbers mean _error is directly displayed to the user in the "play top card until" validation failure window, so we should make it friendlier --- cockatrice/src/game/filters/filter_string.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/game/filters/filter_string.cpp b/cockatrice/src/game/filters/filter_string.cpp index d87e8b039..d8950c26f 100644 --- a/cockatrice/src/game/filters/filter_string.cpp +++ b/cockatrice/src/game/filters/filter_string.cpp @@ -361,11 +361,11 @@ FilterString::FilterString(const QString &expr) } search.log = [&](size_t ln, size_t col, const std::string &msg) { - _error = QString("%1:%2: %3").arg(ln).arg(col).arg(QString::fromStdString(msg)); + _error = QString("line %1, col %2: %3").arg(ln).arg(col).arg(QString::fromStdString(msg)); }; if (!search.parse(ba.data(), result)) { - qDebug().nospace() << "FilterString error for " << expr << "; " << _error; + qDebug().nospace() << "FilterString error for " << expr << "; " << qPrintable(_error); result = [](CardData) -> bool { return false; }; } }