MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / getProgramDirPath

Method getProgramDirPath

global.cpp:271–278  ·  view source on GitHub ↗

Return the path the program is executing under If we are in /usr/bin, then we need to return /usr/share/nixnote2. This is because we want to find other paths (like images). This allows for users to run it out of a non-path location.

Source from the content-addressed store, hash-verified

269// This is because we want to find other paths (like images). This
270// allows for users to run it out of a non-path location.
271QString Global::getProgramDirPath() {
272 QString path = QCoreApplication::applicationDirPath();
273 if (path.endsWith("/bin")) {
274 path.chop(3);
275 return path+"share/nixnote2";
276 }
277 return path;
278}
279
280
281void Global::setDeleteConfirmation(bool value) {

Callers 9

loadPluginsMethod · 0.45
loadThemeMethod · 0.45
getThemeNamesMethod · 0.45
mainFunction · 0.45
openManualMethod · 0.45
ShortcutKeysMethod · 0.45
loadPluginsMethod · 0.45
foreachFunction · 0.45
AboutDialogMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected