aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/help/HelpWindow.cpp
diff options
context:
space:
mode:
authorGravatar Alexey Sokolov2016-05-01 16:16:09 +0100
committerGravatar Alexey Sokolov2016-05-01 16:16:09 +0100
commitfe375f69972cd912739c0d68fa4951d35de90e5e (patch)
tree71bd2c2b59d6be62d7c18588a417e5aa39ab233c /src/modules/help/HelpWindow.cpp
parentlibkvidcc: fix $dcc.currentSpeed documentation add missing @short and fix rig... (diff)
parentApply clang-tidy: modernize-loop-convert (diff)
downloadKVIrc-fe375f69972cd912739c0d68fa4951d35de90e5e.tar.gz
KVIrc-fe375f69972cd912739c0d68fa4951d35de90e5e.tar.bz2
KVIrc-fe375f69972cd912739c0d68fa4951d35de90e5e.zip
Merge pull request #1962 from DarthGandalf/modernize
Apply several fixes of clang-tidy
Diffstat (limited to 'src/modules/help/HelpWindow.cpp')
-rw-r--r--src/modules/help/HelpWindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/help/HelpWindow.cpp b/src/modules/help/HelpWindow.cpp
index 541ca1ca8..0f1803eca 100644
--- a/src/modules/help/HelpWindow.cpp
+++ b/src/modules/help/HelpWindow.cpp
@@ -249,9 +249,9 @@ void HelpWindow::startSearch()
m_terms.clear();
bool isPhrase = false;
QString s = "";
- for(int i = 0; i < (int)buf.length(); ++i)
+ for(const auto & i : buf)
{
- if(buf[i] == '\"')
+ if(i == '\"')
{
isPhrase = !isPhrase;
s = s.simplified();
@@ -259,7 +259,7 @@ void HelpWindow::startSearch()
m_terms << s;
s = "";
}
- else if(buf[i] == ' ' && !isPhrase)
+ else if(i == ' ' && !isPhrase)
{
s = s.simplified();
if(!s.isEmpty())
@@ -267,7 +267,7 @@ void HelpWindow::startSearch()
s = "";
}
else
- s += buf[i];
+ s += i;
}
if(!s.isEmpty())
m_terms << s;