forked from qt-creator/qt-creator
Prepare for QDesktopWidget removal
Change-Id: I9aa2eadea16b5795ee2c4e7b21a24f356cfd3b03 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
#include <QLabel>
|
||||
#include <QToolButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QDesktopWidget>
|
||||
#include <QKeyEvent>
|
||||
#include <QPointer>
|
||||
#include <QScreen>
|
||||
@@ -366,9 +365,7 @@ void FunctionHintProposalWidget::updateContent()
|
||||
|
||||
void FunctionHintProposalWidget::updatePosition()
|
||||
{
|
||||
const QDesktopWidget *desktop = QApplication::desktop();
|
||||
const int screenNumber = desktop->screenNumber(d->m_underlyingWidget);
|
||||
auto widgetScreen = QGuiApplication::screens().value(screenNumber, QGuiApplication::primaryScreen());
|
||||
auto widgetScreen = d->m_underlyingWidget->screen();
|
||||
const QRect &screen = Utils::HostOsInfo::isMacHost()
|
||||
? widgetScreen->availableGeometry() : widgetScreen->geometry();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user