QPtrList<File>* Engine::files(FilterNode* filterRootNode) { tracer->sinvoked(__func__) << "with filter:" << endl; if (filterRootNode) { filterRootNode->dump(""); } // remove all files currently shown m_fileList2display->clear(); // loop over all source directories QIntDictIterator<Folder> sourceDirIt(*m_sourceDirDict); for ( ; sourceDirIt.current(); ++sourceDirIt ) { Folder* sourceDir = sourceDirIt.current(); // handle the files in this directory only if it is selected if (sourceDir->include()) { // loop over all files in the current sourcedirectory QPtrList<File>* fileList = sourceDir->files(); for (File* file = fileList->first(); file; file = fileList->next()) { // append the file if it matches the filter if (filterRootNode->evaluate(file)) { m_fileList2display->append(file); } } } } return m_fileList2display; }