projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cmake: avoid de-duplication of user's CXXFLAGS
[quassel.git]
/
src
/
qtui
/
chatviewsearchcontroller.cpp
diff --git
a/src/qtui/chatviewsearchcontroller.cpp
b/src/qtui/chatviewsearchcontroller.cpp
index
b81e261
..
90dd0f3
100644
(file)
--- a/
src/qtui/chatviewsearchcontroller.cpp
+++ b/
src/qtui/chatviewsearchcontroller.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-20
19
by the Quassel Project *
+ * Copyright (C) 2005-20
22
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-20,6
+20,8
@@
#include "chatviewsearchcontroller.h"
#include "chatviewsearchcontroller.h"
+#include <algorithm>
+
#include <QAbstractItemModel>
#include <QPainter>
#include <QAbstractItemModel>
#include <QPainter>
@@
-39,7
+41,7
@@
void ChatViewSearchController::setSearchString(const QString& searchString)
_searchString = searchString;
if (_scene) {
if (!searchString.startsWith(oldSearchString) || oldSearchString.isEmpty()) {
_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... cle
a
r the scene and do it all over
updateHighlights();
}
else {
updateHighlights();
}
else {
@@
-116,7
+118,7
@@
void ChatViewSearchController::updateHighlights(bool reuse)
if (line)
chatLines << line;
}
if (line)
chatLines << line;
}
- foreach (ChatLine* line,
QList<ChatLine*>(chatLines.toList())
) {
+ foreach (ChatLine* line,
chatLines
) {
updateHighlights(line);
}
}
updateHighlights(line);
}
}
@@
-300,8
+302,7
@@
void ChatViewSearchController::repositionHighlights()
if (line)
chatLines << line;
}
if (line)
chatLines << line;
}
- QList<ChatLine*> chatLineList(chatLines.toList());
- foreach (ChatLine* line, chatLineList) {
+ foreach (ChatLine* line, chatLines) {
repositionHighlights(line);
}
}
repositionHighlights(line);
}
}
@@
-330,7
+331,7
@@
void ChatViewSearchController::repositionHighlights(ChatLine* line)
}
}
}
}
-
qS
ort(searchHighlights.begin(), searchHighlights.end(), SearchHighlightItem::firstInLine);
+
std::s
ort(searchHighlights.begin(), searchHighlights.end(), SearchHighlightItem::firstInLine);
Q_ASSERT(wordPos.count() == searchHighlights.count());
for (int i = 0; i < searchHighlights.count(); i++) {
Q_ASSERT(wordPos.count() == searchHighlights.count());
for (int i = 0; i < searchHighlights.count(); i++) {