[libcalamaresui] Reduce warnings
- getting a (sensible) uint from an int is tougher than you might think
This commit is contained in:
parent
8dd22dcbbf
commit
1008a91eba
@ -143,8 +143,9 @@ RequirementsChecker::reportProgress()
|
|||||||
auto remaining = std::count_if( m_watchers.cbegin(), m_watchers.cend(), []( const Watcher *w ) { return w && !w->isFinished(); } );
|
auto remaining = std::count_if( m_watchers.cbegin(), m_watchers.cend(), []( const Watcher *w ) { return w && !w->isFinished(); } );
|
||||||
if ( remaining > 0 )
|
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 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 );
|
emit requirementsProgress( waiting + QString( " " ) + elapsed );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user