From e5888967290c8cef8da7d630d9dfa7a178839e13 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 18 Feb 2025 17:08:17 +0100 Subject: [PATCH] FilterParser: Update tooltip Fixes #1680 --- src/filterparser/filterparser.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/filterparser/filterparser.cpp b/src/filterparser/filterparser.cpp index cb2494170..18d475f18 100644 --- a/src/filterparser/filterparser.cpp +++ b/src/filterparser/filterparser.cpp @@ -476,13 +476,16 @@ float FilterParser::ParseRating(const QString &rating_str) { QString FilterParser::ToolTip() { - return QLatin1String("

") + + return "

"_L1 + QObject::tr("Prefix a search term with a field name to limit the search to that field, e.g.:") + - QLatin1Char(' ') + + u' ' + ""_L1 + QObject::tr("artist") + ":Strawbs "_L1 + - QObject::tr("searches for all artists containing the word %1. ").arg("Strawbs"_L1) + + QObject::tr("searches for all artists containing the word %1.").arg("Strawbs"_L1) + + "

"_L1 + + + QObject::tr("A word can be excluded with a preceding \"%1\", if you need to search for a word including \"%1\", place quotes around the word.").arg("-"_L1) + "

"_L1 + QObject::tr("Search terms for numerical fields can be prefixed with %1 or %2 to refine the search, e.g.: ") @@ -494,7 +497,7 @@ QString FilterParser::ToolTip() { "4"_L1 + "

"_L1 + - QObject::tr("Multiple search terms can also be combined with \"%1\" (default) and \"%2\", as well as grouped with parentheses. ") + QObject::tr("Multiple search terms can also be combined with \"%1\" (default) and \"%2\", as well as grouped with parentheses.") .arg("AND"_L1, "OR"_L1) + "

"_L1 +