Added Qt dependent macro for QSortFilterProxyModel::setFilterRegularExpression/setFilterRegExp

This commit is contained in:
thunder2 2025-07-21 01:04:24 +02:00
parent 13b294838b
commit fad7774767
8 changed files with 42 additions and 34 deletions

View file

@ -264,7 +264,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
ui->threadTreeWidget->setModel(mThreadProxyModel);
mThreadProxyModel->setFilterRole(RsGxsForumModel::FilterRole);
mThreadProxyModel->setFilterRegExp(QRegExp(QString(RsGxsForumModel::FilterString))) ;
QSortFilterProxyModel_setFilterRegularExpression(mThreadProxyModel, QString(RsGxsForumModel::FilterString)) ;
ui->threadTreeWidget->setSortingEnabled(true);
@ -1854,7 +1854,7 @@ void GxsForumThreadWidget::filterItems(const QString& text)
mThreadModel->setFilter(filterColumn,lst,count) ;
// We do this in order to trigger a new filtering action in the proxy model.
mThreadProxyModel->setFilterRegExp(QRegExp(QString(RsGxsForumModel::FilterString))) ;
QSortFilterProxyModel_setFilterRegularExpression(mThreadProxyModel, QString(RsGxsForumModel::FilterString)) ;
if(!lst.empty())
ui->threadTreeWidget->expandAll();