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.
| 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. |
| 271 | QString 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 | |
| 281 | void Global::setDeleteConfirmation(bool value) { |
no outgoing calls
no test coverage detected