[welcome] Remove unneeded member variables.
- local to the constructor, only needed to be members because of the weird split between constructor and init()
This commit is contained in:
parent
5aae736ced
commit
5795801be5
@ -143,16 +143,17 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
|||||||
{
|
{
|
||||||
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||||
|
|
||||||
m_mainLayout = new QVBoxLayout;
|
QBoxLayout* mainLayout = new QVBoxLayout;
|
||||||
setLayout( m_mainLayout );
|
QBoxLayout* entriesLayout = new QVBoxLayout;
|
||||||
|
|
||||||
|
setLayout( mainLayout );
|
||||||
|
|
||||||
int paddingSize = qBound( 32, CalamaresUtils::defaultFontHeight() * 4, 128 );
|
int paddingSize = qBound( 32, CalamaresUtils::defaultFontHeight() * 4, 128 );
|
||||||
|
|
||||||
QHBoxLayout* spacerLayout = new QHBoxLayout;
|
QHBoxLayout* spacerLayout = new QHBoxLayout;
|
||||||
m_mainLayout->addLayout( spacerLayout );
|
mainLayout->addLayout( spacerLayout );
|
||||||
spacerLayout->addSpacing( paddingSize );
|
spacerLayout->addSpacing( paddingSize );
|
||||||
m_entriesLayout = new QVBoxLayout;
|
spacerLayout->addLayout( entriesLayout );
|
||||||
spacerLayout->addLayout( m_entriesLayout );
|
|
||||||
spacerLayout->addSpacing( paddingSize );
|
spacerLayout->addSpacing( paddingSize );
|
||||||
CalamaresUtils::unmarginLayout( spacerLayout );
|
CalamaresUtils::unmarginLayout( spacerLayout );
|
||||||
|
|
||||||
@ -165,7 +166,7 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
|||||||
{
|
{
|
||||||
ResultWidget* ciw = new ResultWidget( entry.satisfied, entry.mandatory );
|
ResultWidget* ciw = new ResultWidget( entry.satisfied, entry.mandatory );
|
||||||
CALAMARES_RETRANSLATE( ciw->setText( entry.negatedText() ); )
|
CALAMARES_RETRANSLATE( ciw->setText( entry.negatedText() ); )
|
||||||
m_entriesLayout->addWidget( ciw );
|
entriesLayout->addWidget( ciw );
|
||||||
ciw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
ciw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||||
|
|
||||||
allChecked = false;
|
allChecked = false;
|
||||||
@ -187,12 +188,12 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
|||||||
QLabel* textLabel = new QLabel;
|
QLabel* textLabel = new QLabel;
|
||||||
|
|
||||||
textLabel->setWordWrap( true );
|
textLabel->setWordWrap( true );
|
||||||
m_entriesLayout->insertWidget( 0, textLabel );
|
entriesLayout->insertWidget( 0, textLabel );
|
||||||
textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||||
|
|
||||||
if ( !allChecked )
|
if ( !allChecked )
|
||||||
{
|
{
|
||||||
m_entriesLayout->insertSpacing( 1, CalamaresUtils::defaultFontHeight() / 2 );
|
entriesLayout->insertSpacing( 1, CalamaresUtils::defaultFontHeight() / 2 );
|
||||||
|
|
||||||
if ( !requirementsSatisfied )
|
if ( !requirementsSatisfied )
|
||||||
{
|
{
|
||||||
@ -251,7 +252,7 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
|||||||
}
|
}
|
||||||
|
|
||||||
imageLabel->setContentsMargins( 4, CalamaresUtils::defaultFontHeight() * 3 / 4, 4, 4 );
|
imageLabel->setContentsMargins( 4, CalamaresUtils::defaultFontHeight() * 3 / 4, 4, 4 );
|
||||||
m_mainLayout->addWidget( imageLabel );
|
mainLayout->addWidget( imageLabel );
|
||||||
imageLabel->setAlignment( Qt::AlignCenter );
|
imageLabel->setAlignment( Qt::AlignCenter );
|
||||||
imageLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
imageLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||||
}
|
}
|
||||||
@ -263,7 +264,7 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_mainLayout->addStretch();
|
mainLayout->addStretch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,8 +34,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
void showDetailsDialog( const Calamares::RequirementsList& checkEntries );
|
void showDetailsDialog( const Calamares::RequirementsList& checkEntries );
|
||||||
|
|
||||||
QBoxLayout* m_mainLayout;
|
|
||||||
QBoxLayout* m_entriesLayout;
|
|
||||||
const Calamares::RequirementsList& m_entries;
|
const Calamares::RequirementsList& m_entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user