From 6bb83050350dba461ec092ef9b6922745741edfa Mon Sep 17 00:00:00 2001 From: lbartoletti Date: Tue, 22 Oct 2019 18:26:34 +0200 Subject: screenCount/screenGeometry -> QGuiApplication::screens() --- src-qt5/core/libLumina/LDesktopUtils.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index eccba090..e47234d9 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -164,12 +164,14 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ //Find the number of the left-most desktop screen QString screen = "0"; QRect screenGeom; - QDesktopWidget *desk =QApplication::desktop(); - for(int i=0; iscreenCount(); i++){ - if(desk->screenGeometry(i).x()==0){ - screen = QString::number(i); - screenGeom = desk->screenGeometry(i); - break; + QList screens = QGuiApplication::screens(); + QList::const_iterator it; + int i = 0; + for(it = screens.constBegin(); it != screens.constEnd(); ++it, ++i) { + if((*it)->availableGeometry().x()==0) { + screen = i; + screenGeom = (*it)->availableGeometry(); + break; } } //Now setup the default "desktopsettings.conf" and "sessionsettings.conf" files -- cgit