projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modernize: Use auto where the type is clear from context
[quassel.git]
/
src
/
qtui
/
chatviewsearchcontroller.cpp
diff --git
a/src/qtui/chatviewsearchcontroller.cpp
b/src/qtui/chatviewsearchcontroller.cpp
index
bb6dc36
..
2360913
100644
(file)
--- a/
src/qtui/chatviewsearchcontroller.cpp
+++ b/
src/qtui/chatviewsearchcontroller.cpp
@@
-30,13
+30,7
@@
#include "messagemodel.h"
ChatViewSearchController::ChatViewSearchController(QObject *parent)
#include "messagemodel.h"
ChatViewSearchController::ChatViewSearchController(QObject *parent)
- : QObject(parent),
- _scene(nullptr),
- _currentHighlight(0),
- _caseSensitive(false),
- _searchSenders(false),
- _searchMsgs(true),
- _searchOnlyRegularMsgs(true)
+ : QObject(parent)
{
}
{
}
@@
-124,7
+118,7
@@
void ChatViewSearchController::updateHighlights(bool reuse)
if (reuse) {
QSet<ChatLine *> chatLines;
foreach(SearchHighlightItem *highlightItem, _highlightItems) {
if (reuse) {
QSet<ChatLine *> chatLines;
foreach(SearchHighlightItem *highlightItem, _highlightItems) {
-
ChatLine
*line = qgraphicsitem_cast<ChatLine *>(highlightItem->parentItem());
+
auto
*line = qgraphicsitem_cast<ChatLine *>(highlightItem->parentItem());
if (line)
chatLines << line;
}
if (line)
chatLines << line;
}
@@
-265,7
+259,7
@@
void ChatViewSearchController::updateHighlights(ChatLine *line)
}
foreach(QGraphicsItem *child, line->childItems()) {
}
foreach(QGraphicsItem *child, line->childItems()) {
-
SearchHighlightItem
*highlightItem = qgraphicsitem_cast<SearchHighlightItem *>(child);
+
auto
*highlightItem = qgraphicsitem_cast<SearchHighlightItem *>(child);
if (!highlightItem)
continue;
if (!highlightItem)
continue;
@@
-310,7
+304,7
@@
void ChatViewSearchController::repositionHighlights()
{
QSet<ChatLine *> chatLines;
foreach(SearchHighlightItem *item, _highlightItems) {
{
QSet<ChatLine *> chatLines;
foreach(SearchHighlightItem *item, _highlightItems) {
-
ChatLine
*line = qgraphicsitem_cast<ChatLine *>(item->parentItem());
+
auto
*line = qgraphicsitem_cast<ChatLine *>(item->parentItem());
if (line)
chatLines << line;
}
if (line)
chatLines << line;
}
@@
-325,7
+319,7
@@
void ChatViewSearchController::repositionHighlights(ChatLine *line)
{
QList<SearchHighlightItem *> searchHighlights;
foreach(QGraphicsItem *child, line->childItems()) {
{
QList<SearchHighlightItem *> searchHighlights;
foreach(QGraphicsItem *child, line->childItems()) {
-
SearchHighlightItem
*highlightItem = qgraphicsitem_cast<SearchHighlightItem *>(child);
+
auto
*highlightItem = qgraphicsitem_cast<SearchHighlightItem *>(child);
if (highlightItem)
searchHighlights << highlightItem;
}
if (highlightItem)
searchHighlights << highlightItem;
}