summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp')
-rw-r--r--src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp
index 292c46cccc..149fba33fa 100644
--- a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp
+++ b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp
@@ -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();