modernize: Use raw string literals instead of escaped strings
[quassel.git] / src / client / clientuserinputhandler.cpp
index 1be2692..7179515 100644 (file)
@@ -50,7 +50,7 @@ void ClientUserInputHandler::completionSuffixChanged(const QVariant &v)
 {
     QString suffix = v.toString();
     QString letter = "A-Za-z";
-    QString special = "\x5b-\x60\x7b-\x7d";
+    QString special = "\x5b-\x60\x7b-\x7d";  // NOLINT(modernize-raw-string-literal)
     _nickRx = QRegExp(QString("^([%1%2][%1%2\\d-]*)%3").arg(letter, special, suffix).trimmed());
 }
 
@@ -64,7 +64,7 @@ void ClientUserInputHandler::handleUserInput(const BufferInfo &bufferInfo, const
     if (!msg.startsWith('/')) {
         if (_nickRx.indexIn(msg) == 0) {
             const Network *net = Client::network(bufferInfo.networkId());
-            IrcUser *user = net ? net->ircUser(_nickRx.cap(1)) : 0;
+            IrcUser *user = net ? net->ircUser(_nickRx.cap(1)) : nullptr;
             if (user)
                 user->setLastSpokenTo(bufferInfo.bufferId(), QDateTime::currentDateTime().toUTC());
         }
@@ -89,7 +89,7 @@ void ClientUserInputHandler::defaultHandler(const QString &cmd, const BufferInfo
 
 void ClientUserInputHandler::handleExec(const BufferInfo &bufferInfo, const QString &execString)
 {
-    ExecWrapper *exec = new ExecWrapper(this); // gets suicidal when it's done
+    auto *exec = new ExecWrapper(this); // gets suicidal when it's done
     exec->start(bufferInfo, execString);
 }
 
@@ -142,8 +142,8 @@ void ClientUserInputHandler::handleIgnore(const BufferInfo &bufferInfo, const QS
 
 void ClientUserInputHandler::handleList(const BufferInfo &bufferInfo, const QString &text)
 {
-    // Pass along any potential search parameters
-    Client::instance()->displayChannelList(bufferInfo.networkId(), text);
+    // Pass along any potential search parameters, list channels immediately
+    Client::instance()->displayChannelList(bufferInfo.networkId(), text, true);
 }