X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatviewsearchcontroller.cpp;h=dd1ca08a59b332bd2dff20cf6104407cbe4dbac0;hp=57ca2c0d492944c3edd53d773260bfb089a257cc;hb=HEAD;hpb=ec747d2e6065e645e2cd768abc84923ef6a19705 diff --git a/src/qtui/chatviewsearchcontroller.cpp b/src/qtui/chatviewsearchcontroller.cpp index 57ca2c0d..90dd0f39 100644 --- a/src/qtui/chatviewsearchcontroller.cpp +++ b/src/qtui/chatviewsearchcontroller.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2019 by the Quassel Project * + * Copyright (C) 2005-2022 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,7 +41,7 @@ void ChatViewSearchController::setSearchString(const QString& searchString) _searchString = searchString; if (_scene) { if (!searchString.startsWith(oldSearchString) || oldSearchString.isEmpty()) { - // we can't reuse our all findings... cler the scene and do it all over + // we can't reuse our all findings... clear the scene and do it all over updateHighlights(); } else { @@ -118,7 +118,7 @@ void ChatViewSearchController::updateHighlights(bool reuse) if (line) chatLines << line; } - foreach (ChatLine* line, QList(chatLines.toList())) { + foreach (ChatLine* line, chatLines) { updateHighlights(line); } } @@ -302,8 +302,7 @@ void ChatViewSearchController::repositionHighlights() if (line) chatLines << line; } - QList chatLineList(chatLines.toList()); - foreach (ChatLine* line, chatLineList) { + foreach (ChatLine* line, chatLines) { repositionHighlights(line); } }