projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change str.indexOf(rx) to rx.indexIn(str)
[quassel.git]
/
src
/
qtui
/
chatitem.cpp
diff --git
a/src/qtui/chatitem.cpp
b/src/qtui/chatitem.cpp
index
de96b2d
..
934fadf
100644
(file)
--- a/
src/qtui/chatitem.cpp
+++ b/
src/qtui/chatitem.cpp
@@
-445,7
+445,7
@@
QList<ContentsChatItem::Clickable> ContentsChatItem::findClickables() const {
for(int i = 0; i < regExpCount; i++) {
if(matches[i] < 0 || matchEnd[i] > str.length()) continue;
if(idx >= matchEnd[i]) {
for(int i = 0; i < regExpCount; i++) {
if(matches[i] < 0 || matchEnd[i] > str.length()) continue;
if(idx >= matchEnd[i]) {
- matches[i] =
str.indexOf(regExp[i]
, qMax(matchEnd[i], idx));
+ matches[i] =
regExp[i].indexIn(str
, qMax(matchEnd[i], idx));
if(matches[i] >= 0) matchEnd[i] = matches[i] + regExp[i].cap(1).length();
}
if(matches[i] >= 0 && matches[i] < minidx) {
if(matches[i] >= 0) matchEnd[i] = matches[i] + regExp[i].cap(1).length();
}
if(matches[i] >= 0 && matches[i] < minidx) {