QDesktopWidget -> QScreen

This commit is contained in:
David Edmundson 2014-06-04 18:55:05 +02:00
parent 8277da7015
commit e8297e9a0f

View File

@ -23,11 +23,12 @@
#include "corona.h" #include "corona.h"
#include "private/corona_p.h" #include "private/corona_p.h"
#include <QApplication> #include <QGuiApplication>
#include <QDesktopWidget>
#include <QMimeData> #include <QMimeData>
#include <QPainter> #include <QPainter>
#include <QTimer> #include <QTimer>
#include <QScreen>
#include <QScreen>
#include <cmath> #include <cmath>
@ -225,7 +226,10 @@ int Corona::numScreens() const
QRect Corona::screenGeometry(int id) const QRect Corona::screenGeometry(int id) const
{ {
return qApp->desktop()->screenGeometry(id); if (QGuiApplication::screens().size() >= id) {
QGuiApplication::screens().at(id)->geometry();
}
return QRect();
} }
QRegion Corona::availableScreenRegion(int id) const QRegion Corona::availableScreenRegion(int id) const