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

Method getInitialEditor

src/dialogs/MainWindow.cpp:1066–1085  ·  view source on GitHub ↗

One unedited, new blank document

Source from the content-addressed store, hash-verified

1064
1065// One unedited, new blank document
1066ScintillaNext *MainWindow::getInitialEditor()
1067{
1068 if (editorCount() == 1) {
1069 ScintillaNext *editor = currentEditor();
1070
1071 // If the editor:
1072 // is a temporary file
1073 // is a 'real' file (or a 'missing' file)
1074 // can undo any actions
1075 // can redo any actions
1076 // Then do not treat it as an 'initial editor' that can be transparently closed for the user
1077 if (editor->isTemporary() || editor->isFile() || editor->canUndo() || editor->canRedo()) {
1078 return Q_NULLPTR;
1079 }
1080
1081 return editor;
1082 }
1083
1084 return Q_NULLPTR;
1085}
1086
1087void MainWindow::openFileList(const QStringList &fileNames)
1088{

Callers

nothing calls this directly

Calls 2

isTemporaryMethod · 0.80
isFileMethod · 0.80

Tested by

no test coverage detected