aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/LDesktopUtils.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2019-10-29 08:16:05 -0400
committerGitHub <noreply@github.com>2019-10-29 08:16:05 -0400
commitbbf4e940ff2e1c257ffd78c10d85b3681eb72f46 (patch)
tree480c429c743606f09a837ebc652ca57a69c42119 /src-qt5/core/libLumina/LDesktopUtils.cpp
parentMerge pull request #705 from lbartoletti/shortcut_lumina_photo (diff)
parentremove QSignalMapper. Use lambda func instead. (diff)
downloadlumina-bbf4e940ff2e1c257ffd78c10d85b3681eb72f46.tar.gz
lumina-bbf4e940ff2e1c257ffd78c10d85b3681eb72f46.tar.bz2
lumina-bbf4e940ff2e1c257ffd78c10d85b3681eb72f46.zip
Merge pull request #706 from lbartoletti/fix_deprecated
Fix deprecated
Diffstat (limited to 'src-qt5/core/libLumina/LDesktopUtils.cpp')
-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