[libcalamaresui] Move lambda to a "real" slot.
This commit is contained in:
parent
7393198f7b
commit
af4220331e
@ -119,18 +119,7 @@ ViewManager::insertViewStep( int before, ViewStep* step )
|
||||
emit beginInsertRows( QModelIndex(), before, before );
|
||||
m_steps.insert( before, step );
|
||||
connect( step, &ViewStep::enlarge, this, &ViewManager::enlarge );
|
||||
// TODO: this can be a regular slot
|
||||
connect( step, &ViewStep::nextStatusChanged, this, [this]( bool status ) {
|
||||
ViewStep* vs = qobject_cast< ViewStep* >( sender() );
|
||||
if ( vs && currentStepValid() )
|
||||
{
|
||||
if ( vs == m_steps.at( m_currentStep ) )
|
||||
{
|
||||
m_nextEnabled = status;
|
||||
emit nextEnabledChanged( m_nextEnabled );
|
||||
}
|
||||
}
|
||||
} );
|
||||
connect( step, &ViewStep::nextStatusChanged, this, &ViewManager::updateNextStatus );
|
||||
|
||||
if ( !step->widget() )
|
||||
{
|
||||
@ -250,6 +239,21 @@ ViewManager::onInitComplete()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ViewManager::updateNextStatus( bool status )
|
||||
{
|
||||
ViewStep* vs = qobject_cast< ViewStep* >( sender() );
|
||||
if ( vs && currentStepValid() )
|
||||
{
|
||||
if ( vs == m_steps.at( m_currentStep ) )
|
||||
{
|
||||
m_nextEnabled = status;
|
||||
emit nextEnabledChanged( m_nextEnabled );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ViewStepList
|
||||
ViewManager::viewSteps() const
|
||||
{
|
||||
|
@ -190,6 +190,9 @@ public Q_SLOTS:
|
||||
*/
|
||||
void onInitComplete();
|
||||
|
||||
/// @brief Connected to ViewStep::nextStatusChanged for all steps
|
||||
void updateNextStatus( bool enabled );
|
||||
|
||||
signals:
|
||||
void currentStepChanged();
|
||||
void enlarge( QSize enlarge ) const; // See ViewStep::enlarge()
|
||||
|
Loading…
Reference in New Issue
Block a user