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

Function getOverrideWindowSize

libs/librepcb/editor/mainwindow.cpp:88–98  ·  view source on GitHub ↗

Detect window size enforced by environment variable (required for testing).

Source from the content-addressed store, hash-verified

86
87// Detect window size enforced by environment variable (required for testing).
88static std::optional<QSize> getOverrideWindowSize() noexcept {
89 static const QString value =
90 qgetenv("LIBREPCB_WINDOW_SIZE").trimmed().toLower();
91 if (value.isEmpty()) {
92 return std::nullopt; // Environment variable not set.
93 }
94 const QStringList numbers = value.split("x");
95 const int width = numbers.value(0).toInt();
96 const int height = numbers.value(1).toInt();
97 return QSize(width, height);
98}
99
100static bool askForRestoringBackup(const FilePath&) {
101 QMessageBox::StandardButton btn = QMessageBox::question(

Callers 1

MainWindowMethod · 0.85

Calls 3

isEmptyMethod · 0.45
splitMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected