mirror of
https://github.com/QuasarApp/QuasarAppLib.git
synced 2025-05-05 05:59:42 +00:00
update qasecretservice handler functions
This commit is contained in:
parent
78ceff0f09
commit
f3fabf4f64
@ -10,9 +10,11 @@ QByteArray QuasarAppUtils::QASecretService::getByAlias(const QString &alias) {
|
||||
|
||||
proc.start();
|
||||
|
||||
proc.waitForFinished(2000);
|
||||
if (!proc.waitForFinished(2000)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (proc.error() || proc.exitCode()) {
|
||||
if (proc.exitCode()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -30,13 +32,16 @@ QByteArray QuasarAppUtils::QASecretService::getByHash(const QByteArray &hash)
|
||||
|
||||
proc.start();
|
||||
|
||||
proc.waitForFinished(2000);
|
||||
QByteArray result = proc.readAllStandardOutput();
|
||||
|
||||
if (proc.error() || proc.exitCode()) {
|
||||
if (!proc.waitForFinished(2000)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (proc.exitCode()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
QByteArray result = proc.readAllStandardOutput();
|
||||
|
||||
// drop \n
|
||||
return result.left(result.size() - 1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user