[welcome] Apply coding style
This commit is contained in:
parent
e023adc9b2
commit
7d1800a0d7
@ -23,8 +23,8 @@
|
||||
#ifndef CHECKERCONTAINER_H
|
||||
#define CHECKERCONTAINER_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "Config.h"
|
||||
#include <QWidget>
|
||||
|
||||
class ResultsListWidget;
|
||||
class WaitingWidget;
|
||||
|
@ -38,12 +38,12 @@
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusInterface>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
|
||||
#include <unistd.h> //geteuid
|
||||
@ -123,7 +123,9 @@ GeneralRequirements::checkRequirements()
|
||||
{
|
||||
checkEntries.append(
|
||||
{ entry,
|
||||
[req = m_requiredStorageGiB] { return tr( "has at least %1 GiB available drive space" ).arg( req ); },
|
||||
[ req = m_requiredStorageGiB ] {
|
||||
return tr( "has at least %1 GiB available drive space" ).arg( req );
|
||||
},
|
||||
[ req = m_requiredStorageGiB ] {
|
||||
return tr( "There is not enough drive space. At least %1 GiB is required." ).arg( req );
|
||||
},
|
||||
|
@ -24,17 +24,14 @@
|
||||
|
||||
#include <QBoxLayout>
|
||||
|
||||
static inline void setCondition( QLabel* label, CalamaresUtils::ImageType t )
|
||||
static inline void
|
||||
setCondition( QLabel* label, CalamaresUtils::ImageType t )
|
||||
{
|
||||
label->setPixmap(
|
||||
CalamaresUtils::defaultPixmap( t,
|
||||
CalamaresUtils::Original,
|
||||
QSize( label->height(), label->height() ) ) );
|
||||
CalamaresUtils::defaultPixmap( t, CalamaresUtils::Original, QSize( label->height(), label->height() ) ) );
|
||||
}
|
||||
|
||||
ResultWidget::ResultWidget( bool satisfied,
|
||||
bool required,
|
||||
QWidget* parent )
|
||||
ResultWidget::ResultWidget( bool satisfied, bool required, QWidget* parent )
|
||||
: QWidget( parent )
|
||||
{
|
||||
QBoxLayout* mainLayout = new QHBoxLayout;
|
||||
@ -48,12 +45,18 @@ ResultWidget::ResultWidget( bool satisfied,
|
||||
m_textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||
|
||||
if ( satisfied )
|
||||
{
|
||||
setCondition( m_iconLabel, CalamaresUtils::StatusOk );
|
||||
}
|
||||
else if ( required )
|
||||
{
|
||||
setCondition( m_iconLabel, CalamaresUtils::StatusError );
|
||||
}
|
||||
else
|
||||
{
|
||||
setCondition( m_iconLabel, CalamaresUtils::StatusWarning );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
|
@ -38,11 +38,11 @@ public:
|
||||
*
|
||||
* Use setText() to set up the text of the widget.
|
||||
*/
|
||||
explicit ResultWidget( bool satisfied, bool required,
|
||||
QWidget* parent = nullptr );
|
||||
explicit ResultWidget( bool satisfied, bool required, QWidget* parent = nullptr );
|
||||
|
||||
/// @brief Set the displayed description of the check.
|
||||
void setText( const QString& text );
|
||||
|
||||
private:
|
||||
QLabel* m_textLabel;
|
||||
QLabel* m_iconLabel;
|
||||
|
@ -48,8 +48,7 @@ static void
|
||||
createResultWidgets( QLayout* layout,
|
||||
QList< ResultWidget* >& resultWidgets,
|
||||
const Calamares::RequirementsModel& model,
|
||||
std::function< bool( const Calamares::RequirementEntry& ) > predicate
|
||||
)
|
||||
std::function< bool( const Calamares::RequirementEntry& ) > predicate )
|
||||
{
|
||||
resultWidgets.clear();
|
||||
resultWidgets.reserve( model.count() );
|
||||
@ -114,9 +113,8 @@ ResultsListDialog::ResultsListDialog( const Calamares::RequirementsModel& model,
|
||||
|
||||
m_title = new QLabel( this );
|
||||
|
||||
createResultWidgets( entriesLayout, m_resultWidgets, model, []( const Calamares::RequirementEntry& e ) {
|
||||
return e.hasDetails();
|
||||
} );
|
||||
createResultWidgets(
|
||||
entriesLayout, m_resultWidgets, model, []( const Calamares::RequirementEntry& e ) { return e.hasDetails(); } );
|
||||
|
||||
QDialogButtonBox* buttonBox = new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user