chore: make all the regexes static const
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
21c90527d2
commit
c5fd5e6ac1
37 changed files with 87 additions and 84 deletions
|
@ -150,7 +150,8 @@ class FilterModel : public QIdentityProxyModel {
|
|||
return QVariant();
|
||||
if (role == Qt::DisplayRole || role == Qt::EditRole) {
|
||||
QVariant result = sourceModel()->data(mapToSource(proxyIndex), role);
|
||||
return result.toString().remove(QRegularExpression("\\.png$"));
|
||||
static const QRegularExpression s_removeChars("\\.png$");
|
||||
return result.toString().remove(s_removeChars);
|
||||
}
|
||||
if (role == Qt::DecorationRole) {
|
||||
QVariant result = sourceModel()->data(mapToSource(proxyIndex), QFileSystemModel::FilePathRole);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue