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

Method loadEditorViewDetails

src/SessionManager.cpp:391–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void SessionManager::loadEditorViewDetails(ScintillaNext *editor, QSettings &settings)
392{
393 const int firstVisibleLine = settings.value("FirstVisibleLine").toInt() - 1;
394 const int currentPosition = settings.value("CurrentPosition").toInt();
395
396 editor->setFirstVisibleLine(firstVisibleLine);
397 editor->setEmptySelection(currentPosition);
398
399 if (settings.contains("BookMarks"))
400 {
401 QList<int> bookMarkedLines = QVariantListToQList(settings.value("BookMarks").toList()); // just using .value<QList<int>>() does not work...possibly a Qt bug?
402
403 BookMarkDecorator *decorator = editor->findChild<BookMarkDecorator*>(QString(), Qt::FindDirectChildrenOnly);
404 decorator->setBookMarkedLines(bookMarkedLines);
405 }
406}

Callers

nothing calls this directly

Calls 2

QVariantListToQListFunction · 0.85
setBookMarkedLinesMethod · 0.80

Tested by

no test coverage detected