File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -201,9 +201,14 @@ QList<QStandardItem*> ProcessesPage::createRow(const Process &proc)
201
201
202
202
void ProcessesPage::on_txtProcessSearch_textChanged (const QString &val)
203
203
{
204
- QRegularExpression query (QRegularExpression::wildcardToRegularExpression (val), QRegularExpression::CaseInsensitiveOption);
205
- mSortFilterModel ->setFilterKeyColumn (mHeaders .count () - 1 ); // process name
206
- mSortFilterModel ->setFilterRegularExpression (query);
204
+ QString cleanVal = val;
205
+ cleanVal.replace (" *" , " .*" );
206
+
207
+ QRegularExpression query (cleanVal, QRegularExpression::CaseInsensitiveOption);
208
+ if (query.isValid ()) {
209
+ mSortFilterModel ->setFilterKeyColumn (mHeaders .count () - 1 ); // process name
210
+ mSortFilterModel ->setFilterRegularExpression (query);
211
+ }
207
212
}
208
213
209
214
void ProcessesPage::on_sliderRefresh_valueChanged (const int &i)
You can’t perform that action at this time.
0 commit comments