Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
[subprocess] fixing rc, adding start() wrapper
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
  • Loading branch information
Denis Zalevskiy committed Oct 28, 2014
1 parent 2104383 commit 46110d0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion include/qtaround/subprocess.hpp
Expand Up @@ -49,7 +49,7 @@ class Process : public QObject

int rc() const
{
return is_error() ? -1111 : ps->exitCode();
return is_error() ? 254 : ps->exitCode();
}

qint64 write(QString const &data)
Expand Down Expand Up @@ -112,6 +112,14 @@ static inline int check_call(QString const &cmd, QStringList const &args)
return check_call(cmd, args, QVariantMap());
}

static inline Process start
(QString const &name, QStringList const &args = QStringList{})
{
Process ps;
ps.start(name, args);
return std::move(ps);
}

}}

#ifdef QTAROUND_NO_NS
Expand Down

0 comments on commit 46110d0

Please sign in to comment.