mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-30 02:45:37 -04:00
[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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue