Merge branch 'reduce-warnings'

This commit is contained in:
Adriaan de Groot 2019-11-29 00:18:58 +01:00
commit 28141661da
12 changed files with 54 additions and 7 deletions

View File

@ -96,7 +96,7 @@ ProgressTreeDelegate::paintViewStep( QPainter* painter,
= Calamares::Branding::instance()->styleString( Calamares::Branding::SidebarTextHighlight );
if ( textHighlight.isEmpty() )
{
painter->setBrush( CalamaresApplication::instance()->mainWindow()->palette().background() );
painter->setBrush( CalamaresApplication::instance()->mainWindow()->palette().window() );
}
else
{

View File

@ -26,8 +26,13 @@
#include <QFileInfo>
#undef slots
#include "utils/boost-warnings.h"
#include <boost/python.hpp>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
namespace bp = boost::python;
namespace CalamaresPython

View File

@ -25,10 +25,16 @@
#include <QStringList>
#undef slots
#include "utils/boost-warnings.h"
#include <boost/python/dict.hpp>
#include <boost/python/list.hpp>
#include <boost/python/object.hpp>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
namespace CalamaresPython
{

View File

@ -32,8 +32,13 @@
#include <QStandardPaths>
#undef slots
#include "utils/boost-warnings.h"
#include <boost/python.hpp>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
namespace bp = boost::python;
static int

View File

@ -34,6 +34,7 @@ class QFileInfo;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma clang diagnostic ignored "-Wshadow"
#pragma clang diagnostic ignored "-Wfloat-equal"
#endif
#include <yaml-cpp/yaml.h>

View File

@ -0,0 +1,8 @@
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-id-macro"
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
#pragma clang diagnostic ignored "-Wall"
#endif

View File

@ -65,5 +65,6 @@ HostInfoTests::testHostOS()
QTEST_GUILESS_MAIN( HostInfoTests )
#include "Tests.moc"
#include "utils/moc-warnings.h"
#include "Tests.moc"

View File

@ -104,5 +104,6 @@ MachineIdTests::testPoolSize()
QTEST_GUILESS_MAIN( MachineIdTests )
#include "Tests.moc"
#include "utils/moc-warnings.h"
#include "Tests.moc"

View File

@ -192,7 +192,7 @@ createDBusMachineId( const QString& rootMountPoint, const QString& fileName )
Calamares::JobResult
createDBusLink( const QString& rootMountPoint, const QString& fileName, const QString& systemdFileName )
{
Q_UNUSED( rootMountPoint );
Q_UNUSED( rootMountPoint )
return runCmd( QStringList { QStringLiteral( "ln" ), QStringLiteral( "-s" ), systemdFileName, fileName } );
}

View File

@ -184,7 +184,7 @@ SummaryPage::createBodyLabel( const QString& text ) const
QLabel* label = new QLabel;
label->setMargin( CalamaresUtils::defaultFontHeight() / 2 );
QPalette pal( palette() );
pal.setColor( QPalette::Background, palette().background().color().lighter( 108 ) );
pal.setColor( QPalette::Background, palette().window().color().lighter( 108 ) );
label->setAutoFillBackground( true );
label->setPalette( pal );
label->setText( text );

View File

@ -97,7 +97,7 @@ UsersPage::UsersPage( QWidget* parent )
connect( ui->textBoxUserVerifiedPassword, &QLineEdit::textChanged, this, &UsersPage::onPasswordTextChanged );
connect( ui->textBoxRootPassword, &QLineEdit::textChanged, this, &UsersPage::onRootPasswordTextChanged );
connect( ui->textBoxVerifiedRootPassword, &QLineEdit::textChanged, this, &UsersPage::onRootPasswordTextChanged );
connect( ui->checkBoxValidatePassword, &QCheckBox::stateChanged, this, [this]( int checked )
connect( ui->checkBoxValidatePassword, &QCheckBox::stateChanged, this, [this]( int )
{
onPasswordTextChanged( ui->textBoxUserPassword->text() );
onRootPasswordTextChanged( ui->textBoxRootPassword->text() );

View File

@ -48,6 +48,7 @@
#include <QFileInfo>
#include <QLabel>
#include <QProcess>
#include <QScreen>
#include <QTimer>
#include <unistd.h> //geteuid
@ -59,9 +60,28 @@ GeneralRequirements::GeneralRequirements( QObject* parent )
{
}
static QSize
biggestSingleScreen()
{
QSize s;
for ( const auto* screen : QGuiApplication::screens() )
{
QSize thisScreen = screen->availableSize();
if ( !s.isValid() )
{
s = thisScreen;
}
else if ( s.width() * s.height() < thisScreen.width() * thisScreen.height() )
{
s = thisScreen;
}
}
return s;
}
Calamares::RequirementsList GeneralRequirements::checkRequirements()
{
QSize availableSize = qApp->desktop()->availableGeometry().size();
QSize availableSize = biggestSingleScreen();
bool enoughStorage = false;
bool enoughRam = false;