X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fclientuserinputhandler.cpp;h=7179515af02e3ed9e2a4510659877b0ccafc07ce;hb=8582c2ad5708a1972c85bea1cf8d81ad3ece4814;hp=561eb3d8cedf3e860df1e58572d099e0635d558c;hpb=928af86f954aaa925b35505957faced2ea5ac964;p=quassel.git diff --git a/src/client/clientuserinputhandler.cpp b/src/client/clientuserinputhandler.cpp index 561eb3d8..7179515a 100644 --- a/src/client/clientuserinputhandler.cpp +++ b/src/client/clientuserinputhandler.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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,7 +142,8 @@ void ClientUserInputHandler::handleIgnore(const BufferInfo &bufferInfo, const QS void ClientUserInputHandler::handleList(const BufferInfo &bufferInfo, const QString &text) { - emit Client::instance()->showChannelList(bufferInfo.networkId()); + // Pass along any potential search parameters, list channels immediately + Client::instance()->displayChannelList(bufferInfo.networkId(), text, true); }