Fix one more clazy issue

qt66
Nicolas Werner 1 year ago
parent 9e983b1584
commit 308efd48b6
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 4
      src/timeline/InputBar.cpp
  2. 2
      src/timeline/TimelineModel.cpp

@ -776,7 +776,9 @@ InputBar::getCommandAndArgs(const QString &currentText) 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…
Cancel
Save