Commit 3cef425
committed
fix: EPMCLI example missing QCoreApplication caused unreliable path resolution
EPMCLI.exe's main() never constructed a QCoreApplication/QApplication
object, yet its call chain (InitializeEPMDev -> EPMPreferences::setAppName
-> defaultPlatformPath -> epmConfigRoot -> applicationDataPath ->
installFolderName -> QCoreApplication::applicationDirPath()) depends on
one existing. Without it, applicationDirPath() emits a runtime warning
and returns an unreliable result, causing installFolderName() to fall
back to a default value instead of correctly deriving the actual install
folder name. This meant EPMCLI could look in the wrong ProgramData
namespace for configs depending on how the package was installed.
Fixed by constructing a minimal QCoreApplication at the start of main(),
matching the pattern already used correctly by all real GUI apps.1 parent d8905fc commit 3cef425
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments