MCPcopy Create free account
hub / github.com/KDE/kdevelop / run

Method run

plugins/grepview/grepfindthread.cpp:286–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void GrepFindFilesThread::run()
287{
288 Q_D(GrepFindFilesThread);
289
290 const QStringList include = GrepFindFilesThread::parseInclude(d->m_patString);
291 const QStringList exclude = GrepFindFilesThread::parseExclude(d->m_exclString);
292
293 qCDebug(PLUGIN_GREPVIEW) << "running with start dir" << d->m_startDirs;
294
295 FileFinder finder(include, exclude, d->m_tryAbort);
296 // m_projectFileSets contains a project file set for each element of m_startDirs at a
297 // corresponding index if this search is limited to project files; is empty otherwise.
298 Q_ASSERT(d->m_projectFileSets.empty() ||
299 d->m_projectFileSets.size() == static_cast<std::size_t>(d->m_startDirs.size()));
300 for (const QUrl& directory : d->m_startDirs) {
301 if (d->m_projectFileSets.empty()) {
302 finder.findFiles(directory.toLocalFile(), d->m_depth, d->m_files);
303 } else {
304 finder.getProjectFiles(d->m_projectFileSets.front(), directory, d->m_depth, d->m_files);
305 // Removing the no longer needed file set from the collection as
306 // soon as possible may save some memory or prevent a copy on write
307 // if the project's file set is changed during the search.
308 d->m_projectFileSets.pop();
309 }
310 }
311}
312
313QList<QUrl> GrepFindFilesThread::takeFiles()
314{

Callers 8

testUpdateBreakpointMethod · 0.45
testManualBreakpointMethod · 0.45
testAttachMethod · 0.45
testManualAttachMethod · 0.45
testVariablesLocalsMethod · 0.45
testRemoteDebugMethod · 0.45

Calls 6

emptyMethod · 0.80
findFilesMethod · 0.80
toLocalFileMethod · 0.80
getProjectFilesMethod · 0.80
sizeMethod · 0.45
popMethod · 0.45

Tested by 8

testUpdateBreakpointMethod · 0.36
testManualBreakpointMethod · 0.36
testAttachMethod · 0.36
testManualAttachMethod · 0.36
testVariablesLocalsMethod · 0.36
testRemoteDebugMethod · 0.36