* @brief Asks the user via a native message box whether to relaunch to apply the change. */
| 241 | * @brief Asks the user via a native message box whether to relaunch to apply the change. |
| 242 | */ |
| 243 | void 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. |
nothing calls this directly
no test coverage detected