1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

feat(Settings): Add GUI notice for global settings upgrade failure

Due to new MessageBoxManager, Settings now has the ability to show errors
during init.
This commit is contained in:
Anthony Bilinski 2022-03-14 00:22:46 -07:00
parent b24faabf42
commit efc641efd7
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
49 changed files with 196 additions and 2 deletions

View File

@ -121,8 +121,10 @@ void Settings::loadGlobal()
auto upgradeSuccess = GlobalSettingsUpgrader::doUpgrade(*this, globalSettingsVersion, GLOBAL_SETTINGS_VERSION);
if (!upgradeSuccess) {
// Would be nice to show a GUI warning, but GUI isn't initialized yet.
// Trying to run without even default settings isn't sane.
messageBoxManager.showError(tr("Failed to load global settings"),
tr("Unable to upgrade settings from version %1 to version %2. Cannot start qTox.")
.arg(globalSettingsVersion)
.arg(GLOBAL_SETTINGS_VERSION));
std::terminate();
return;
}

4
translations/ar.ts vendored
View File

@ -2668,6 +2668,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/be.ts vendored
View File

@ -2664,6 +2664,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/bg.ts vendored
View File

@ -2665,6 +2665,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/cs.ts vendored
View File

@ -2668,6 +2668,10 @@ ID zahrnuje kód NoSpam (modře) a kontrolní součet (šedě).</translation>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/da.ts vendored
View File

@ -2648,6 +2648,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/de.ts vendored
View File

@ -2673,6 +2673,10 @@ Diese ID enthält den NoSpam-Code (in blau) und die Prüfsumme (in grau).</trans
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/el.ts vendored
View File

@ -2652,6 +2652,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/eo.ts vendored
View File

@ -2640,6 +2640,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/es.ts vendored
View File

@ -2665,6 +2665,10 @@ Este ID incluye el código NoSpam (en azul), y la suma de comprobación (en gris
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/et.ts vendored
View File

@ -2667,6 +2667,10 @@ See ID sisaldab NoSpam koodi (sinine) ja kontrollsumma (hall).</translation>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/fa.ts vendored
View File

@ -2656,6 +2656,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/fi.ts vendored
View File

@ -2664,6 +2664,10 @@ Tämä ID sisältää spammin estävän koodin(joka on sinisellä), ja tarkistus
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/fr.ts vendored
View File

@ -2664,6 +2664,10 @@ Cet identifiant comprend le code NoSpam (en bleu) et la somme de contrôle (en g
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/gl.ts vendored
View File

@ -2660,6 +2660,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/he.ts vendored
View File

@ -2648,6 +2648,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/hr.ts vendored
View File

@ -2656,6 +2656,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/hu.ts vendored
View File

@ -2648,6 +2648,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/is.ts vendored
View File

@ -2648,6 +2648,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/it.ts vendored
View File

@ -2661,6 +2661,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/ja.ts vendored
View File

@ -2647,6 +2647,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/kn.ts vendored
View File

@ -2648,6 +2648,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/ko.ts vendored
View File

@ -2646,6 +2646,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/lt.ts vendored
View File

@ -2670,6 +2670,10 @@ Pasidalinkite ja su draugais, kad pradėtumėte kalbėtis.
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/lv.ts vendored
View File

@ -2671,6 +2671,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/mk.ts vendored
View File

@ -2664,6 +2664,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/nl.ts vendored
View File

@ -2652,6 +2652,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

View File

@ -2660,6 +2660,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

View File

@ -2654,6 +2654,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/pl.ts vendored
View File

@ -2690,6 +2690,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/pt.ts vendored
View File

@ -2664,6 +2664,10 @@ Este ID inclui o código NoSpam (em azul) e o checkum (em cinzento).</translatio
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

View File

@ -2672,6 +2672,10 @@ Este ID inclui o código NoSpam (em azul) e o checkum (em cinza).</translation>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/ro.ts vendored
View File

@ -2676,6 +2676,10 @@ Acest ID include codul NoSpam (în albastru) și suma de control (în gri).</tra
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/ru.ts vendored
View File

@ -2674,6 +2674,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/si.ts vendored
View File

@ -2648,6 +2648,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/sk.ts vendored
View File

@ -2676,6 +2676,10 @@ Toto ID obsahuje kód NoSpam (modrou) a kontrolný súčet (šedou).</translatio
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/sl.ts vendored
View File

@ -2658,6 +2658,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/sq.ts vendored
View File

@ -2648,6 +2648,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/sr.ts vendored
View File

@ -2664,6 +2664,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

View File

@ -2665,6 +2665,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/sv.ts vendored
View File

@ -2664,6 +2664,10 @@ ID:t innehåller NoSpam-koden (i blått) och kontrollsumman (i grått).</transla
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/sw.ts vendored
View File

@ -2648,6 +2648,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/ta.ts vendored
View File

@ -2654,6 +2654,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/tr.ts vendored
View File

@ -2664,6 +2664,10 @@ Bu kimlik NoSpam kodunu (mavi) ve sağlama toplamını (gri) içerir.</translati
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/ug.ts vendored
View File

@ -2660,6 +2660,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/uk.ts vendored
View File

@ -2664,6 +2664,10 @@ It&apos;s difficult to translate &quot;Tox me maybe&quot; because in Ukrainian n
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

4
translations/ur.ts vendored
View File

@ -2656,6 +2656,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

View File

@ -2660,6 +2660,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>

View File

@ -2648,6 +2648,10 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Unable to upgrade settings from version %1 to version %2. Cannot start qTox.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load global settings</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToxURIDialog</name>