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

Method loadFileDetails

src/SessionManager.cpp:253–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253ScintillaNext* SessionManager::loadFileDetails(QSettings &settings)
254{
255 qInfo(Q_FUNC_INFO);
256
257 const QString filePath = settings.value("FilePath").toString();
258
259 qDebug("Session file: \"%s\"", qUtf8Printable(filePath));
260
261 ScintillaNext *editor = app->getEditorManager()->getEditorByFilePath(filePath);
262 if (editor != Q_NULLPTR) {
263 qDebug(" file is already open, ignoring");
264 return Q_NULLPTR;
265 }
266
267 if (QFileInfo::exists(filePath)) {
268 editor = ScintillaNext::fromFile(filePath);
269
270 app->getEditorManager()->manageEditor(editor);
271
272 loadEditorViewDetails(editor, settings);
273
274 return editor;
275 }
276 else {
277 qDebug(" no longer exists on disk, ignoring");
278 return Q_NULLPTR;
279 }
280}
281
282void SessionManager::storeUnsavedFileDetails(ScintillaNext *editor, QSettings &settings)
283{

Callers

nothing calls this directly

Calls 4

toStringMethod · 0.80
getEditorByFilePathMethod · 0.80
getEditorManagerMethod · 0.80
manageEditorMethod · 0.80

Tested by

no test coverage detected