forked from qt-creator/qt-creator
Welcome: Replace search term when adding tags
Currently, both are mixed into one so neither of them works. When both are separated with a space, the search term is ignored anyway so it's better to just remove it. Change-Id: I449b5d80dc50620f13f37c908e63877eb63b3c26 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -132,8 +132,9 @@ public:
|
||||
|
||||
void onTagClicked(const QString &tag)
|
||||
{
|
||||
QString text = m_searcher->text();
|
||||
m_searcher->setText(text + QString("tag:\"%1\" ").arg(tag));
|
||||
const QString text = m_searcher->text();
|
||||
m_searcher->setText((text.startsWith("tag:\"") ? text.trimmed() + " " : QString())
|
||||
+ QString("tag:\"%1\" ").arg(tag));
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -326,8 +326,9 @@ public:
|
||||
|
||||
void onTagClicked(const QString &tag)
|
||||
{
|
||||
QString text = m_searcher->text();
|
||||
m_searcher->setText(text + QString("tag:\"%1\" ").arg(tag));
|
||||
const QString text = m_searcher->text();
|
||||
m_searcher->setText((text.startsWith("tag:\"") ? text.trimmed() + " " : QString())
|
||||
+ QString("tag:\"%1\" ").arg(tag));
|
||||
}
|
||||
|
||||
const bool m_isExamples;
|
||||
|
Reference in New Issue
Block a user