| 155 | ******************************************************************************/ |
| 156 | |
| 157 | static void configureApplicationSettings() noexcept { |
| 158 | // Make sure the INI format is used for settings on all platforms because: |
| 159 | // - Consistent storage format on all platforms |
| 160 | // - Useful for functional testing (control settings by fixtures) |
| 161 | // - Windows Registry is a mess (hard to find, edit and track changes of our |
| 162 | // settings) |
| 163 | QSettings::setDefaultFormat(QSettings::IniFormat); |
| 164 | |
| 165 | // Use different configuration directory if supplied by environment variable |
| 166 | // "LIBREPCB_CONFIG_DIR" (useful for functional testing) |
| 167 | QString customConfigDir = qgetenv("LIBREPCB_CONFIG_DIR"); |
| 168 | if (!customConfigDir.isEmpty()) { |
| 169 | QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, |
| 170 | customConfigDir); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | /******************************************************************************* |
| 175 | * writeLogHeader() |