MCPcopy Create free account
hub / github.com/baldurk/renderdoc / performFindAll

Method performFindAll

qrenderdoc/Windows/ShaderViewer.cpp:6852–6975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6850}
6851
6852void ShaderViewer::performFindAll()
6853{
6854 ScintillaEdit *cur = currentScintilla();
6855
6856 if(!cur)
6857 return;
6858
6859 QString find = m_FindReplace->findText();
6860
6861 sptr_t flags = 0;
6862
6863 QString results = tr("Find all \"%1\"").arg(find);
6864
6865 if(m_FindReplace->matchCase())
6866 {
6867 flags |= SCFIND_MATCHCASE;
6868 results += tr(", Match case");
6869 }
6870
6871 if(m_FindReplace->matchWord())
6872 {
6873 flags |= SCFIND_WHOLEWORD;
6874 results += tr(", Match whole word");
6875 }
6876
6877 if(m_FindReplace->regexp())
6878 {
6879 flags |= SCFIND_REGEXP | SCFIND_POSIX;
6880 results += tr(", with Regular Expressions");
6881 }
6882
6883 FindReplace::SearchContext context = m_FindReplace->context();
6884
6885 if(context == FindReplace::File)
6886 results += tr(", in current file\n");
6887 else
6888 results += tr(", in all files\n");
6889
6890 // trash the find state for any incremental finds
6891 m_FindState = FindState();
6892
6893 QList<ScintillaEdit *> scintillas = m_Scintillas;
6894
6895 if(context == FindReplace::File)
6896 scintillas = {cur};
6897
6898 QList<QPair<int, int>> resultList;
6899
6900 m_FindAllResults.clear();
6901
6902 QByteArray findUtf8 = find.toUtf8();
6903
6904 if(findUtf8.isEmpty())
6905 return;
6906
6907 for(ScintillaEdit *s : scintillas)
6908 {
6909 sptr_t start = 0;

Callers

nothing calls this directly

Calls 15

FindStateClass · 0.85
AreaReferenceClass · 0.85
findTextMethod · 0.80
matchCaseMethod · 0.80
matchWordMethod · 0.80
regexpMethod · 0.80
contextMethod · 0.80
toUtf8Method · 0.80
setIndicatorCurrentMethod · 0.80
indicatorClearRangeMethod · 0.80
lineFromPositionMethod · 0.80
positionFromLineMethod · 0.80

Tested by

no test coverage detected