aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlbartoletti <l.bartoletti@free.fr>2019-10-22 18:26:34 +0200
committerlbartoletti <l.bartoletti@free.fr>2019-10-22 18:26:34 +0200
commit6bb83050350dba461ec092ef9b6922745741edfa (patch)
tree8a27d2525cac5e16a8bb4fc0d5647feb3f4aff49
parentQString::null -> QString() (diff)
downloadlumina-6bb83050350dba461ec092ef9b6922745741edfa.tar.gz
lumina-6bb83050350dba461ec092ef9b6922745741edfa.tar.bz2
lumina-6bb83050350dba461ec092ef9b6922745741edfa.zip
screenCount/screenGeometry -> QGuiApplication::screens()
-rw-r--r--src-qt5/core/libLumina/LDesktopUtils.cpp14
1 files 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; i<desk->screenCount(); i++){
- if(desk->screenGeometry(i).x()==0){
- screen = QString::number(i);
- screenGeom = desk->screenGeometry(i);
- break;
+ QList<QScreen*> screens = QGuiApplication::screens();
+ QList<QScreen*>::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
bgstack15