[libcalamares] Reduce warnings
- Although milliseconds::count() is long long, we pass it to a Qt interface that only takes int; let's assume we have only a 32-bit count, since a timeout of 4 billion milliseconds is roughly 46 days, which we'll just call "no timeout".
This commit is contained in:
parent
dc09c5700b
commit
6f73151786
@ -236,8 +236,9 @@ System::runCommand( System::RunLocation location,
|
|||||||
}
|
}
|
||||||
process.closeWriteChannel();
|
process.closeWriteChannel();
|
||||||
|
|
||||||
if ( !process.waitForFinished(
|
if ( !process.waitForFinished( timeoutSec > std::chrono::seconds::zero()
|
||||||
timeoutSec > std::chrono::seconds::zero() ? ( std::chrono::milliseconds( timeoutSec ).count() ) : -1 ) )
|
? ( static_cast< int >( std::chrono::milliseconds( timeoutSec ).count() ) )
|
||||||
|
: -1 ) )
|
||||||
{
|
{
|
||||||
cWarning().noquote().nospace() << "Timed out. Output so far:\n" << process.readAllStandardOutput();
|
cWarning().noquote().nospace() << "Timed out. Output so far:\n" << process.readAllStandardOutput();
|
||||||
return ProcessResult::Code::TimedOut;
|
return ProcessResult::Code::TimedOut;
|
||||||
|
Loading…
Reference in New Issue
Block a user