[welcome] Chase deprecations in Qt (screen geometry)

main
Adriaan de Groot 5 years ago
parent c2ebfbf6ae
commit a70b7ad89e

@ -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…
Cancel
Save