diff --git a/src/calamares/progresstree/ProgressTreeDelegate.cpp b/src/calamares/progresstree/ProgressTreeDelegate.cpp index 5fb9dbf8b..9db508c6e 100644 --- a/src/calamares/progresstree/ProgressTreeDelegate.cpp +++ b/src/calamares/progresstree/ProgressTreeDelegate.cpp @@ -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 { diff --git a/src/libcalamares/PythonHelper.cpp b/src/libcalamares/PythonHelper.cpp index 670390d6c..26a57ec14 100644 --- a/src/libcalamares/PythonHelper.cpp +++ b/src/libcalamares/PythonHelper.cpp @@ -26,8 +26,13 @@ #include #undef slots +#include "utils/boost-warnings.h" #include +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + namespace bp = boost::python; namespace CalamaresPython diff --git a/src/libcalamares/PythonHelper.h b/src/libcalamares/PythonHelper.h index 667a08614..9035ba6d4 100644 --- a/src/libcalamares/PythonHelper.h +++ b/src/libcalamares/PythonHelper.h @@ -25,10 +25,16 @@ #include #undef slots +#include "utils/boost-warnings.h" + #include #include #include +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + namespace CalamaresPython { diff --git a/src/libcalamares/PythonJobApi.cpp b/src/libcalamares/PythonJobApi.cpp index 610003492..7b65e979c 100644 --- a/src/libcalamares/PythonJobApi.cpp +++ b/src/libcalamares/PythonJobApi.cpp @@ -32,8 +32,13 @@ #include #undef slots +#include "utils/boost-warnings.h" #include +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + namespace bp = boost::python; static int diff --git a/src/libcalamares/utils/Yaml.h b/src/libcalamares/utils/Yaml.h index 6b786aef8..fd6537be6 100644 --- a/src/libcalamares/utils/Yaml.h +++ b/src/libcalamares/utils/Yaml.h @@ -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 diff --git a/src/libcalamares/utils/boost-warnings.h b/src/libcalamares/utils/boost-warnings.h new file mode 100644 index 000000000..65a66b0f6 --- /dev/null +++ b/src/libcalamares/utils/boost-warnings.h @@ -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 diff --git a/src/modules/hostinfo/Tests.cpp b/src/modules/hostinfo/Tests.cpp index 32fce19ed..8241ef022 100644 --- a/src/modules/hostinfo/Tests.cpp +++ b/src/modules/hostinfo/Tests.cpp @@ -65,5 +65,6 @@ HostInfoTests::testHostOS() QTEST_GUILESS_MAIN( HostInfoTests ) -#include "Tests.moc" #include "utils/moc-warnings.h" + +#include "Tests.moc" diff --git a/src/modules/machineid/Tests.cpp b/src/modules/machineid/Tests.cpp index cfd96bbdd..273645e22 100644 --- a/src/modules/machineid/Tests.cpp +++ b/src/modules/machineid/Tests.cpp @@ -104,5 +104,6 @@ MachineIdTests::testPoolSize() QTEST_GUILESS_MAIN( MachineIdTests ) -#include "Tests.moc" #include "utils/moc-warnings.h" + +#include "Tests.moc" diff --git a/src/modules/machineid/Workers.cpp b/src/modules/machineid/Workers.cpp index e6379f3f1..178f03de5 100644 --- a/src/modules/machineid/Workers.cpp +++ b/src/modules/machineid/Workers.cpp @@ -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 } ); } diff --git a/src/modules/summary/SummaryPage.cpp b/src/modules/summary/SummaryPage.cpp index 997a7bb9f..61a9c2ec2 100644 --- a/src/modules/summary/SummaryPage.cpp +++ b/src/modules/summary/SummaryPage.cpp @@ -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 ); diff --git a/src/modules/users/UsersPage.cpp b/src/modules/users/UsersPage.cpp index 2a7516589..a7c72ce69 100644 --- a/src/modules/users/UsersPage.cpp +++ b/src/modules/users/UsersPage.cpp @@ -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() ); diff --git a/src/modules/welcome/checker/GeneralRequirements.cpp b/src/modules/welcome/checker/GeneralRequirements.cpp index 1881558b8..6e8e66d5d 100644 --- a/src/modules/welcome/checker/GeneralRequirements.cpp +++ b/src/modules/welcome/checker/GeneralRequirements.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include #include //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;