forked from qt-creator/qt-creator
Process: Get rid of timeoutS()
The setter setTimeoutS() is going to be removed soon. It's going to be replaced by the extra arg to runBlocking(). Change-Id: I60b8c952ba5e27e36183f8652aaa92059e08746e Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -1630,7 +1630,7 @@ QString Process::readAllStandardError()
|
||||
}
|
||||
|
||||
QString Process::exitMessage(const CommandLine &command, ProcessResult result, int exitCode,
|
||||
int maxHangTimerCount)
|
||||
int timeoutInSeconds)
|
||||
{
|
||||
const QString cmd = command.toUserOutput();
|
||||
switch (result) {
|
||||
@@ -1644,14 +1644,14 @@ QString Process::exitMessage(const CommandLine &command, ProcessResult result, i
|
||||
return Tr::tr("The command \"%1\" could not be started.").arg(cmd);
|
||||
case ProcessResult::Hang:
|
||||
return Tr::tr("The command \"%1\" did not respond within the timeout limit (%2 s).")
|
||||
.arg(cmd).arg(maxHangTimerCount);
|
||||
.arg(cmd).arg(timeoutInSeconds);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
QString Process::exitMessage() const
|
||||
{
|
||||
return exitMessage(commandLine(), result(), exitCode(), timeoutS());
|
||||
return exitMessage(commandLine(), result(), exitCode(), d->m_timeoutInSeconds);
|
||||
}
|
||||
|
||||
QByteArray Process::allRawOutput() const
|
||||
@@ -1826,11 +1826,6 @@ void Process::setTimeoutS(int timeoutS)
|
||||
d->m_timeoutInSeconds = INT_MAX / 1000;
|
||||
}
|
||||
|
||||
int Process::timeoutS() const
|
||||
{
|
||||
return d->m_timeoutInSeconds;
|
||||
}
|
||||
|
||||
void Process::setCodec(QTextCodec *c)
|
||||
{
|
||||
QTC_ASSERT(c, return);
|
||||
|
@@ -149,7 +149,6 @@ public:
|
||||
/* Timeout for hanging processes (triggers after no more output
|
||||
* occurs on stderr/stdout). */
|
||||
void setTimeoutS(int timeoutS);
|
||||
int timeoutS() const;
|
||||
|
||||
// TODO: We should specify the purpose of the codec, e.g. setCodecForStandardChannel()
|
||||
void setCodec(QTextCodec *c);
|
||||
@@ -182,8 +181,8 @@ public:
|
||||
const QStringList stdOutLines() const; // split, CR removed
|
||||
const QStringList stdErrLines() const; // split, CR removed
|
||||
|
||||
static QString exitMessage(const CommandLine &command, ProcessResult result,
|
||||
int exitCode, int maxHangTimerCount);
|
||||
static QString exitMessage(const CommandLine &command, ProcessResult result, int exitCode,
|
||||
int timeoutInSeconds);
|
||||
QString exitMessage() const;
|
||||
|
||||
QString toStandaloneCommandLine() const;
|
||||
|
Reference in New Issue
Block a user