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

Function isFileFormatStableOrAcceptUnstable

apps/librepcb/main.cpp:278–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276 ******************************************************************************/
277
278static bool isFileFormatStableOrAcceptUnstable() noexcept {
279 if (Application::isFileFormatStable() ||
280 (qgetenv("LIBREPCB_DISABLE_UNSTABLE_WARNING") == "1")) {
281 return true;
282 } else {
283 QMessageBox::StandardButton btn = QMessageBox::critical(
284 nullptr, QCoreApplication::translate("main", "Unstable file format!"),
285 QCoreApplication::translate(
286 "main",
287 "<p><b>ATTENTION: This application version is UNSTABLE!</b></p>"
288 "<p>Everything you do with this application can break your "
289 "workspace, libraries or projects! Saved files will not be "
290 "readable with stable releases of LibrePCB. It's highly "
291 "recommended to create a backup before proceeding. If you are "
292 "unsure, please download an official stable release instead.</p>"
293 "<p>For details, please take a look at LibrePCB's "
294 "<a href=\"%1\">versioning concept</a>.</p>"
295 "<p>Are you really sure to continue with the risk of breaking your "
296 "files?!</p>")
297 .arg("https://developers.librepcb.org/da/dbc/"
298 "doc_release_workflow.html"),
299 QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
300 return (btn == QMessageBox::Yes);
301 }
302}
303
304/*******************************************************************************
305 * openWorkspace()

Callers 1

runApplicationFunction · 0.85

Calls 1

translateFunction · 0.85

Tested by

no test coverage detected