[libcalamaresui] Reduce warnings

- getting a (sensible) uint from an int is tougher than you might think
This commit is contained in:
Adriaan de Groot 2019-04-11 13:09:31 +02:00
parent 8dd22dcbbf
commit 1008a91eba

View File

@ -143,8 +143,9 @@ RequirementsChecker::reportProgress()
auto remaining = std::count_if( m_watchers.cbegin(), m_watchers.cend(), []( const Watcher *w ) { return w && !w->isFinished(); } );
if ( remaining > 0 )
{
unsigned int posInterval = ( m_progressTimer->interval() < 0 ) ? 1000 : uint( m_progressTimer->interval() );
QString waiting = tr( "Waiting for %n module(s).", "", remaining );
QString elapsed = tr( "(%n second(s))", "", m_progressTimeouts * m_progressTimer->interval() / 1000 );
QString elapsed = tr( "(%n second(s))", "", m_progressTimeouts * posInterval / 1000 );
emit requirementsProgress( waiting + QString( " " ) + elapsed );
}
else