Commit 2bbd9a4c authored by MikeSalmela's avatar MikeSalmela

Merge branch 'jb48218' into 'master'

[vault] Add getter for option value. Contributes to JB#48218

See merge request !13
parents 9ae3a603 4b184087
......@@ -509,6 +509,9 @@ int execute(QVariantMap const &info)
} catch (error::Error const &e) {
qCDebug(lcBackup) << e;
return 1;
} catch (std::exception const &e) {
qCDebug(lcBackup) << e.what();
return 2;
}
return 0;
}
......@@ -527,4 +530,16 @@ int runProcess(const QString &program, const QStringList &args)
return 0;
}
QString optValue(const QString &arg)
{
try {
return getopt()->value(arg);
} catch (error::Error const &e) {
qCDebug(lcBackup) << e;
} catch (std::exception const & e) {
qCDebug(lcBackup) << e.what();
}
return QString();
}
}} // namespace vault::unit
......@@ -25,6 +25,8 @@ int execute(QVariantMap const &info);
int runProcess(const QString &program, const QStringList &args);
QString optValue(const QString &arg);
}}
#endif // _CUTES_UNIT_HPP_
Summary: Incremental backup/restore framework
Name: vault
Version: 1.0.1
Version: 1.0.2
Release: 1
License: LGPLv2
Group: Development/Libraries
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment