Skip to content

Commit

Permalink
fix: Correct the tab completion regex so it works with Qt6.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Nov 24, 2024
1 parent 18df99a commit 1680064
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/widget/form/tabcompleter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ void TabCompleter::buildCompletionList()
// section
QString tabAbbrev = msgEdit->toPlainText()
.left(msgEdit->textCursor().position())
.section(QRegularExpression("[^\\w\\d\\$:@--_\\[\\]{}|`^.\\\\]"), -1, -1);
.section(QRegularExpression(R"([^\w\d\$:@_\[\]{}|`^.\\-])"), -1, -1);
// that section is then used as the completion regex
QRegularExpression regex(QString("^[-_\\[\\]{}|`^.\\\\]*").append(QRegularExpression::escape(tabAbbrev)),
QRegularExpression regex(QStringLiteral(R"(^[-_\[\]{}|`^.\\]*)")
.append(QRegularExpression::escape(tabAbbrev)),
QRegularExpression::CaseInsensitiveOption);

const QString ownNick = conference->getSelfName();
Expand Down

0 comments on commit 1680064

Please sign in to comment.