forked from qt-creator/qt-creator
Port QtCreator over to use filterRegularExpression
QSortFilterProxyModel::filterRegExp is going to go away in Qt6, so port over to use QRegularExpression instead. This required some changes where setFilterWildcard/FixedString() was being used, as those would instantiate QRegExp based filters in Qt 5, and will use QRegularExpression in Qt 6. Use the generic setFilterRegularExpression here, to keep things portable between 5 and 6. Change-Id: I6379be781aa3821b10ba783c088f82c1a0970911 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -554,7 +554,7 @@ void CallgrindToolPrivate::doClear(bool clearParseData)
|
||||
m_proxyModel.setFilterBaseDir(QString());
|
||||
if (m_searchFilter)
|
||||
m_searchFilter->clear();
|
||||
m_proxyModel.setFilterFixedString(QString());
|
||||
m_proxyModel.setFilterRegularExpression(QRegularExpression());
|
||||
}
|
||||
|
||||
void CallgrindToolPrivate::setBusyCursor(bool busy)
|
||||
@@ -609,7 +609,7 @@ void CallgrindToolPrivate::stackBrowserChanged()
|
||||
|
||||
void CallgrindToolPrivate::updateFilterString()
|
||||
{
|
||||
m_proxyModel.setFilterFixedString(m_searchFilter->text());
|
||||
m_proxyModel.setFilterRegularExpression(QRegularExpression::escape(m_searchFilter->text()));
|
||||
}
|
||||
|
||||
void CallgrindToolPrivate::setCostFormat(CostDelegate::CostFormat format)
|
||||
|
||||
Reference in New Issue
Block a user