mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix one more clazy issue
This commit is contained in:
parent
9e983b1584
commit
308efd48b6
2 changed files with 4 additions and 2 deletions
|
@ -776,7 +776,9 @@ InputBar::getCommandAndArgs(const QString ¤tText) const
|
|||
if (!currentText.startsWith('/'))
|
||||
return {{}, currentText};
|
||||
|
||||
int command_end = currentText.indexOf(QRegularExpression(QStringLiteral("\\s")));
|
||||
static QRegularExpression spaceRegex(QStringLiteral("\\s"));
|
||||
|
||||
int command_end = currentText.indexOf(spaceRegex);
|
||||
if (command_end == -1)
|
||||
command_end = currentText.size();
|
||||
auto name = currentText.mid(1, command_end - 1);
|
||||
|
|
|
@ -1340,7 +1340,7 @@ TimelineModel::formatDateSeparator(QDate date) const
|
|||
QString fmt = QLocale::system().dateFormat(QLocale::LongFormat);
|
||||
|
||||
if (now.date().year() == date.year()) {
|
||||
QRegularExpression rx(QStringLiteral("[^a-zA-Z]*y+[^a-zA-Z]*"));
|
||||
static QRegularExpression rx(QStringLiteral("[^a-zA-Z]*y+[^a-zA-Z]*"));
|
||||
fmt = fmt.remove(rx);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue