From e99233209173e1e48b1fa6665b5560067cf16892 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Mon, 24 Jun 2024 21:18:02 +0800 Subject: [PATCH] opt: headword dialog ,limited filter number --- src/headwordsmodel.cc | 2 +- src/headwordsmodel.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/headwordsmodel.cc b/src/headwordsmodel.cc index 64873c90c5..368f3cc24c 100644 --- a/src/headwordsmodel.cc +++ b/src/headwordsmodel.cc @@ -36,7 +36,7 @@ QString HeadwordListModel::getRow( int row ) return fileSortedList.at( row ); } -void HeadwordListModel::setFilter( QRegularExpression reg ) +void HeadwordListModel::setFilter( const QRegularExpression & reg ) { //if the headword is already finished loaded, do nothing。 if ( finished ) { diff --git a/src/headwordsmodel.hh b/src/headwordsmodel.hh index 91c8b3a6e0..d68df7182b 100644 --- a/src/headwordsmodel.hh +++ b/src/headwordsmodel.hh @@ -20,7 +20,7 @@ public: bool isFinish() const; QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const override; QString getRow( int row ); - void setFilter( QRegularExpression ); + void setFilter( const QRegularExpression & ); void appendWord( const QString & word ); int getCurrentIndex() const; bool containWord( const QString & word );