File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,9 +10,11 @@ QByteArray QuasarAppUtils::QASecretService::getByAlias(const QString &alias) {
1010
1111 proc.start ();
1212
13- proc.waitForFinished (2000 );
13+ if (!proc.waitForFinished (2000 )) {
14+ return " " ;
15+ }
1416
15- if (proc.error () || proc. exitCode ()) {
17+ if (proc.exitCode ()) {
1618 return " " ;
1719 }
1820
@@ -30,13 +32,16 @@ QByteArray QuasarAppUtils::QASecretService::getByHash(const QByteArray &hash)
3032
3133 proc.start ();
3234
33- proc.waitForFinished (2000 );
34- QByteArray result = proc.readAllStandardOutput ();
35+ if (!proc.waitForFinished (2000 )) {
36+ return " " ;
37+ }
3538
36- if (proc.error () || proc. exitCode ()) {
39+ if (proc.exitCode ()) {
3740 return " " ;
3841 }
3942
43+ QByteArray result = proc.readAllStandardOutput ();
44+
4045 // drop \n
4146 return result.left (result.size () - 1 );
4247}
You can’t perform that action at this time.
0 commit comments