MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / promptRestartAndQuit

Method promptRestartAndQuit

app/src/Misc/GraphicsBackend.cpp:243–259  ·  view source on GitHub ↗

* @brief Asks the user via a native message box whether to relaunch to apply the change. */

Source from the content-addressed store, hash-verified

241 * @brief Asks the user via a native message box whether to relaunch to apply the change.
242 */
243void Misc::GraphicsBackend::promptRestartAndQuit()
244{
245 const int choice = Misc::Utilities::showMessageBox(
246 tr("Restart Required"),
247 tr("The new rendering backend will take effect after restarting Serial Studio. "
248 "Restart now to apply the change?"),
249 QMessageBox::Question,
250 qAppName(),
251 QMessageBox::Yes | QMessageBox::No,
252 QMessageBox::Yes);
253
254 if (choice != QMessageBox::Yes)
255 return;
256
257 Misc::CrashTracker::instance().markCleanExit();
258 Misc::Utilities::rebootApplication();
259}
260
261/**
262 * @brief Clears the "startup pending" flag once QML has loaded without crashing.

Callers

nothing calls this directly

Calls 1

markCleanExitMethod · 0.80

Tested by

no test coverage detected