mirror of
https://github.com/QuasarApp/QuasarAppLib.git
synced 2025-05-06 22:49:42 +00:00
update getSecret methods
This commit is contained in:
parent
c17c20e51f
commit
53c73c2913
@ -10,6 +10,10 @@ QByteArray QuasarAppUtils::QASecretService::getByAlias(const QString &alias) {
|
||||
|
||||
proc.waitForFinished(2000);
|
||||
|
||||
if (proc.error() || proc.exitCode()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
QByteArray result = proc.readAllStandardOutput();
|
||||
|
||||
// drop \n
|
||||
@ -27,6 +31,10 @@ QByteArray QuasarAppUtils::QASecretService::getByHash(const QByteArray &hash)
|
||||
proc.waitForFinished(2000);
|
||||
QByteArray result = proc.readAllStandardOutput();
|
||||
|
||||
if (proc.error() || proc.exitCode()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// drop \n
|
||||
return result.left(result.size() - 1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user