+void MainWin::showMigrationWarning(bool show)
+{
+ if (show && !_migrationWarning) {
+ _migrationWarning = new QMessageBox(QMessageBox::Information,
+ tr("Upgrading..."),
+ "<b>" + tr("Your database is being upgraded") + "</b>",
+ QMessageBox::NoButton, this);
+ _migrationWarning->setInformativeText("<p>"
+ + tr("In order to support new features, we need to make changes to your backlog database. This may take a long while.")
+ + "</p><p>"
+ + tr("Do not exit Quassel until the upgrade is complete!")
+ + "</p>");
+ _migrationWarning->setStandardButtons(QMessageBox::NoButton);
+ _migrationWarning->show();
+ }
+ else if (!show && _migrationWarning) {
+ _migrationWarning->close();
+ _migrationWarning->deleteLater();
+ _migrationWarning = nullptr;
+ }
+}
+
+
+void MainWin::onExitRequested(const QString &reason)
+{
+ if (!reason.isEmpty()) {
+ QMessageBox box(QMessageBox::Critical,
+ tr("Fatal error"),
+ "<b>" + tr("Quassel encountered a fatal error and is terminated.") + "</b>",
+ QMessageBox::Ok);
+ box.setInformativeText("<p>" + tr("Reason:<em>") + " " + reason + "</em>");
+ box.exec();
+ }
+}
+
+