[ChannelOptionsDialog] Port to QRegularExpression plus some optimisations

Authored by ahmadsamir on Mar 27 2020, 12:51 PM.

Description

[ChannelOptionsDialog] Port to QRegularExpression plus some optimisations

Summary:

  • More const
  • Use range-for
  • Remove some redundant vars that weren't used anywhere
  • Replace QString arg().arg() with QString::arg(string, string), (the latter is more safe to use)
  • Where appropriate, move var declaration/definition to right where they'll be used

Test Plan:
make && a quick check with creating a channel on Freenode and setting
modes for it, seems to work well.

Reviewers: Konversation, psn, hein

Reviewed By: Konversation, psn

Differential Revision: https://phabricator.kde.org/D28357