Commit e64543aa authored by Christian Kandeler's avatar Christian Kandeler

TextEditor: Remove unneeded ifdefs.

Change-Id: I21b508b4fc911296aee1c077445c7d6c1e765c20
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent 5b7c86d9
......@@ -2606,13 +2606,7 @@ void BaseTextEditorWidgetPrivate::snippetTabOrBacktab(bool forward)
QPoint BaseTextEditorWidget::toolTipPosition(const QTextCursor &c) const
{
const QPoint cursorPos = mapToGlobal(cursorRect(c).bottomRight() + QPoint(1,1));
return cursorPos + QPoint(d->m_extraArea->width(),
#ifdef Q_OS_WIN
-24
#else
-16
#endif
);
return cursorPos + QPoint(d->m_extraArea->width(), HostOsInfo::isWindowsHost() ? -24 : -16);
}
void BaseTextEditorWidget::processTooltipRequest(const QTextCursor &c)
......
......@@ -34,6 +34,8 @@
#include "effects.h"
#include "reuse.h"
#include <utils/hostosinfo.h>
#include <QString>
#include <QColor>
#include <QApplication>
......@@ -204,14 +206,7 @@ void ToolTip::placeTip(const QPoint &pos, QWidget *w)
{
QRect screen = Internal::screenGeometry(pos, w);
QPoint p = pos;
p += QPoint(2,
#ifdef Q_OS_WIN
21
#else
16
#endif
);
p += QPoint(2, Utils::HostOsInfo::isWindowsHost() ? 21 : 16);
if (p.x() + m_tip->width() > screen.x() + screen.width())
p.rx() -= 4 + m_tip->width();
if (p.y() + m_tip->height() > screen.y() + screen.height())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment