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

Method getDefaultDirectory

src/DefaultDirectoryManager.cpp:29–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29QString DefaultDirectoryManager::getDefaultDirectory() const
30{
31 ApplicationSettings::DefaultDirectoryBehaviorEnum e = settings->defaultDirectoryBehavior();
32
33 if (e == ApplicationSettings::FollowCurrentDocument){
34 const ScintillaNext *editor = window->currentEditor();
35 return editor->isFile() ? editor->getPath() : settings->defaultDirectory();
36 }
37 else if (e == ApplicationSettings::RememberLastUsed) {
38 return settings->defaultDirectory();
39 }
40 else if (e == ApplicationSettings::HardCoded) {
41 return settings->defaultDirectory();
42 }
43
44 return QString();
45}
46
47void DefaultDirectoryManager::editorActivated(ScintillaNext *editor)
48{

Callers 5

openFileDialogMethod · 0.80
saveCopyAsDialogMethod · 0.80
renameFileMethod · 0.80

Calls 3

currentEditorMethod · 0.80
isFileMethod · 0.80
getPathMethod · 0.80

Tested by

no test coverage detected