MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / newFileEntry

Method newFileEntry

src/docks/SearchResultsDock.cpp:108–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void SearchResultsDock::newFileEntry(ScintillaNext *editor)
109{
110 // Store a QPointer since there is no guarantee this editor will be around later
111 QPointer<ScintillaNext> editor_pointer = editor;
112
113 totalFileHitCount = 0;
114 currentFilePath = editor->isFile() ? editor->getFilePath() : editor->getName();
115
116 currentFile = new QTreeWidgetItem(currentSearch);
117 currentFile->setData(0, Qt::UserRole, QVariant::fromValue(editor_pointer));
118
119 currentFile->setBackground(0, QColor(213, 255, 213));
120 currentFile->setForeground(0, QColor(0, 128, 0));
121 currentFile->setExpanded(true);
122 currentFile->setFirstColumnSpanned(true);
123
124 currentFileCount++;
125 updateSearchStatus();
126}
127
128void SearchResultsDock::newResultsEntry(const QString line, int lineNumber, int startPositionFromBeginning, int endPositionFromBeginning, int hitCount)
129{

Callers 1

Calls 4

isFileMethod · 0.80
getFilePathMethod · 0.80
getNameMethod · 0.45
setDataMethod · 0.45

Tested by

no test coverage detected