Add negated text to requirement entries.
This commit is contained in:
parent
f0dc3d5ae6
commit
7622abce94
@ -90,6 +90,8 @@ RequirementsChecker::RequirementsChecker( QObject* parent )
|
|||||||
entry,
|
entry,
|
||||||
[this]{ return tr( "has at least %1 GB available drive space" )
|
[this]{ return tr( "has at least %1 GB available drive space" )
|
||||||
.arg( m_requiredStorageGB ); },
|
.arg( m_requiredStorageGB ); },
|
||||||
|
[this]{ return tr( "There is not enough drive space. At least %1 GB is required." )
|
||||||
|
.arg( m_requiredStorageGB ); },
|
||||||
enoughStorage,
|
enoughStorage,
|
||||||
m_entriesToRequire.contains( entry )
|
m_entriesToRequire.contains( entry )
|
||||||
} );
|
} );
|
||||||
@ -98,6 +100,8 @@ RequirementsChecker::RequirementsChecker( QObject* parent )
|
|||||||
entry,
|
entry,
|
||||||
[this]{ return tr( "has at least %1 GB working memory" )
|
[this]{ return tr( "has at least %1 GB working memory" )
|
||||||
.arg( m_requiredRamGB ); },
|
.arg( m_requiredRamGB ); },
|
||||||
|
[this]{ return tr( "The system does not have enough working memory. At least %1 GB is required." )
|
||||||
|
.arg( m_requiredRamGB ); },
|
||||||
enoughRam,
|
enoughRam,
|
||||||
m_entriesToRequire.contains( entry )
|
m_entriesToRequire.contains( entry )
|
||||||
} );
|
} );
|
||||||
@ -105,6 +109,7 @@ RequirementsChecker::RequirementsChecker( QObject* parent )
|
|||||||
checkEntries.append( {
|
checkEntries.append( {
|
||||||
entry,
|
entry,
|
||||||
[this]{ return tr( "is plugged in to a power source" ); },
|
[this]{ return tr( "is plugged in to a power source" ); },
|
||||||
|
[this]{ return tr( "The system is not plugged in to a power source." ); },
|
||||||
hasPower,
|
hasPower,
|
||||||
m_entriesToRequire.contains( entry )
|
m_entriesToRequire.contains( entry )
|
||||||
} );
|
} );
|
||||||
@ -112,6 +117,7 @@ RequirementsChecker::RequirementsChecker( QObject* parent )
|
|||||||
checkEntries.append( {
|
checkEntries.append( {
|
||||||
entry,
|
entry,
|
||||||
[this]{ return tr( "is connected to the Internet" ); },
|
[this]{ return tr( "is connected to the Internet" ); },
|
||||||
|
[this]{ return tr( "The system is not connected to the Internet." ); },
|
||||||
hasInternet,
|
hasInternet,
|
||||||
m_entriesToRequire.contains( entry )
|
m_entriesToRequire.contains( entry )
|
||||||
} );
|
} );
|
||||||
@ -120,6 +126,7 @@ RequirementsChecker::RequirementsChecker( QObject* parent )
|
|||||||
m_actualWidget->init( checkEntries );
|
m_actualWidget->init( checkEntries );
|
||||||
m_widget->layout()->removeWidget( waitingWidget );
|
m_widget->layout()->removeWidget( waitingWidget );
|
||||||
waitingWidget->deleteLater();
|
waitingWidget->deleteLater();
|
||||||
|
m_actualWidget->setParent( m_widget );
|
||||||
m_widget->layout()->addWidget( m_actualWidget );
|
m_widget->layout()->addWidget( m_actualWidget );
|
||||||
|
|
||||||
bool canGoNext = true;
|
bool canGoNext = true;
|
||||||
|
@ -30,7 +30,10 @@ class QWidget;
|
|||||||
struct PrepareEntry
|
struct PrepareEntry
|
||||||
{
|
{
|
||||||
QString name;
|
QString name;
|
||||||
std::function< QString() > text;
|
std::function< QString() > enumerationText; //Partial string, inserted in a
|
||||||
|
//list of requirements to satisfy.
|
||||||
|
std::function< QString() > negatedText; //Complete sentence about this requirement
|
||||||
|
//not having been met.
|
||||||
bool checked;
|
bool checked;
|
||||||
bool required;
|
bool required;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user