MCPcopy Create free account
hub / github.com/LibrePCB/LibrePCB / configureApplicationSettings

Function configureApplicationSettings

apps/librepcb/main.cpp:157–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 ******************************************************************************/
156
157static 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()

Callers 1

mainFunction · 0.85

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected