MCPcopy Create free account
hub / github.com/OpenBoard-org/OpenBoard / searchStarted

Method searchStarted

src/board/UBFeaturesController.cpp:1152–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150}
1151
1152void 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
1169void UBFeaturesController::refreshModels()
1170{

Callers

nothing calls this directly

Calls 3

setModelMethod · 0.80
isEmptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected