mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Use QRegularExpression
This commit is contained in:
parent
6c31bb6ddc
commit
463dd20682
1 changed files with 1 additions and 1 deletions
|
@ -204,7 +204,7 @@ InputBar::send()
|
||||||
auto wasEdit = !room->edit().isEmpty();
|
auto wasEdit = !room->edit().isEmpty();
|
||||||
|
|
||||||
if (text().startsWith('/')) {
|
if (text().startsWith('/')) {
|
||||||
int command_end = text().indexOf(QRegExp("\\s+"));
|
int command_end = text().indexOf(QRegularExpression("\\s"));
|
||||||
if (command_end == -1)
|
if (command_end == -1)
|
||||||
command_end = text().size();
|
command_end = text().size();
|
||||||
auto name = text().mid(1, command_end - 1);
|
auto name = text().mid(1, command_end - 1);
|
||||||
|
|
Loading…
Reference in a new issue