Merge branch 'reduce-warnings'
This commit is contained in:
commit
28141661da
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
{
|
||||
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
8
src/libcalamares/utils/boost-warnings.h
Normal file
8
src/libcalamares/utils/boost-warnings.h
Normal 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
|
@ -65,5 +65,6 @@ HostInfoTests::testHostOS()
|
||||
|
||||
QTEST_GUILESS_MAIN( HostInfoTests )
|
||||
|
||||
#include "Tests.moc"
|
||||
#include "utils/moc-warnings.h"
|
||||
|
||||
#include "Tests.moc"
|
||||
|
@ -104,5 +104,6 @@ MachineIdTests::testPoolSize()
|
||||
|
||||
QTEST_GUILESS_MAIN( MachineIdTests )
|
||||
|
||||
#include "Tests.moc"
|
||||
#include "utils/moc-warnings.h"
|
||||
|
||||
#include "Tests.moc"
|
||||
|
@ -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 } );
|
||||
}
|
||||
|
||||
|
@ -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 );
|
||||
|
@ -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() );
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user