[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".
main
Adriaan de Groot 6 years ago
parent dc09c5700b
commit 6f73151786

@ -236,8 +236,9 @@ System::runCommand( System::RunLocation location,
}
process.closeWriteChannel();
if ( !process.waitForFinished(
timeoutSec > std::chrono::seconds::zero() ? ( std::chrono::milliseconds( timeoutSec ).count() ) : -1 ) )
if ( !process.waitForFinished( timeoutSec > std::chrono::seconds::zero()
? ( static_cast< int >( std::chrono::milliseconds( timeoutSec ).count() ) )
: -1 ) )
{
cWarning().noquote().nospace() << "Timed out. Output so far:\n" << process.readAllStandardOutput();
return ProcessResult::Code::TimedOut;

Loading…
Cancel
Save