Editor: hide "Hide mouse cursor while typing" option on mac

The mouse cursor is hidden unconditionally in Qt, so do not give the
impression that this can be disabled. Also we have a bunch of bug
reports that claim that the cursor does not come back if the mouse is
moved after typing. This might be caused by the double hide of Qt
Creator, Qt and the moon phase.

Fixes: QTCREATORBUG-27572
Change-Id: I11b39cac6cd8eb0717fca00d1812a4e052223f21
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2022-06-30 07:47:09 +02:00
parent 29bd1b025a
commit b1eadd3bc6
2 changed files with 4 additions and 1 deletions

View File

@@ -36,6 +36,7 @@
#include <texteditor/behaviorsettings.h>
#include <texteditor/extraencodingsettings.h>
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
#include <QList>
#include <QString>
@@ -122,6 +123,8 @@ BehaviorSettingsWidget::BehaviorSettingsWidget(QWidget *parent)
this, &BehaviorSettingsWidget::slotBehaviorSettingsChanged);
connect(d->m_ui.smartSelectionChanging, &QAbstractButton::clicked,
this, &BehaviorSettingsWidget::slotBehaviorSettingsChanged);
d->m_ui.mouseHiding->setVisible(!Utils::HostOsInfo::isMacHost());
}
BehaviorSettingsWidget::~BehaviorSettingsWidget()

View File

@@ -3375,7 +3375,7 @@ void TextEditorWidget::setMouseHidingEnabled(bool b)
bool TextEditorWidget::mouseHidingEnabled() const
{
return d->m_behaviorSettings.m_mouseHiding;
return Utils::HostOsInfo::isMacHost() ? false : d->m_behaviorSettings.m_mouseHiding;
}
void TextEditorWidget::setScrollWheelZoomingEnabled(bool b)