| 1150 | } |
| 1151 | |
| 1152 | void UBFeaturesController::searchStarted(const QString &pattern, QListView *pOnView) |
| 1153 | { |
| 1154 | if (pattern.isEmpty()) { |
| 1155 | |
| 1156 | pOnView->setModel(featuresProxyModel); |
| 1157 | featuresProxyModel->invalidate(); |
| 1158 | curListModel = featuresProxyModel; |
| 1159 | } else if ( pattern.size() > 1 ) { |
| 1160 | |
| 1161 | // featuresSearchModel->setFilterPrefix(currentElement.getFullVirtualPath()); |
| 1162 | featuresSearchModel->setFilterRegularExpression(QRegularExpression::wildcardToRegularExpression("*" + pattern + "*")); |
| 1163 | pOnView->setModel(featuresSearchModel ); |
| 1164 | featuresSearchModel->invalidate(); |
| 1165 | curListModel = featuresSearchModel; |
| 1166 | } |
| 1167 | } |
| 1168 | |
| 1169 | void UBFeaturesController::refreshModels() |
| 1170 | { |