mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-30 23:04:13 +02:00
65a1080cd3
The MCP server gives each QElectroTech run a private HOME and writes the element collection path for it (elements_dir) into ~/.config/QElectroTech/QElectroTech.conf there. Only Linux reads that file: Qt keeps settings in the registry on Windows and in the system preferences on macOS. So on those systems elements_dir did nothing, and every run read the user's own settings (#1178). When QET_SETTINGS_DIR names a folder, QElectroTech now keeps its settings in <folder>/QElectroTech/QElectroTech.ini on every system. It is set in main() before the first setting is read. Without the variable nothing changes. The server sets it for each run and writes the collection path to the .ini as well as the .conf, so an older QElectroTech keeps working on Linux. The path is written with forward slashes: Qt reads a backslash in these files as an escape. The README notes that elements_dir needs this on Windows and macOS, and that long arguments go on stdin with "-" (Windows refuses a command line over 32,767 characters). tst_settingsdir: a script places a symbol that only the folder's settings can resolve, while the usual settings file points at an empty collection. It fails on master and passes here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>