MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / handleItemUpdated

Method handleItemUpdated

src/services/project/directorygenerator.cpp:148–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void DirectoryGenerator::handleItemUpdated(const QString &path)
149{
150 auto parser = qobject_cast<DirectoryAsynParse *>(sender());
151 auto info = d->findGeneratorInfo(parser);
152 if (!info.item)
153 return;
154
155 ProjectService *prjSrv = dpfGetService(ProjectService);
156 Q_ASSERT(prjSrv);
157
158 auto item = parser->findItem(path, info.item);
159 if (!item)
160 item = info.item;
161 parser->updateItem(item);
162 if (auto model = info.item->model())
163 Q_EMIT model->layoutChanged();
164 prjSrv->restoreExpandState(item);
165}

Callers

nothing calls this directly

Calls 5

findGeneratorInfoMethod · 0.80
restoreExpandStateMethod · 0.80
findItemMethod · 0.45
updateItemMethod · 0.45
modelMethod · 0.45

Tested by

no test coverage detected