summaryrefslogtreecommitdiff
path: root/repo/nheko/remove-fatal-secrets-error.patch
blob: 3db84bd664d4be56cabbfe7bc2d64a71d3786a25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- a/src/Cache.cpp	2022-06-05 16:42:28.397722089 +0100
+++ b/src/Cache.cpp	2022-06-05 16:41:12.208727406 +0100
@@ -328,24 +328,6 @@
     });
 }
 
-static void
-fatalSecretError()
-{
-    QMessageBox::critical(
-      nullptr,
-      QCoreApplication::translate("SecretStorage", "Failed to connect to secret storage"),
-      QCoreApplication::translate(
-        "SecretStorage",
-        "Nheko could not connect to the secure storage to save encryption secrets to. This can "
-        "have multiple reasons. Check if your D-Bus service is running and you have configured a "
-        "service like KWallet, Gnome Keyring, KeePassXC or the equivalent for your platform. If "
-        "you are having trouble, feel free to open an issue here: "
-        "https://github.com/Nheko-Reborn/nheko/issues"));
-
-    QCoreApplication::exit(1);
-    exit(1);
-}
-
 static QString
 secretName(std::string name, bool internal)
 {
@@ -406,7 +388,6 @@
                                        job->error(),
                                        job->errorString().toStdString());
 
-                    fatalSecretError();
                 }
                 if (secret.isEmpty()) {
                     nhlog::db()->debug("Restored empty secret '{}'.", name.toStdString());
@@ -472,7 +453,6 @@
           if (job->error()) {
               nhlog::db()->warn(
                 "Storing secret '{}' failed: {}", name_, job->errorString().toStdString());
-              fatalSecretError();
           } else {
               // if we emit the signal directly, qtkeychain breaks and won't execute new
               // jobs. You can't start a job from the finish signal of a job.