forked from qt-creator/qt-creator
TextEditor: Limit size of tool tips
Otherwise we may end up in crashes deep inside Qt code on Windows. Fixes: QTCREATORBUG-26112 Change-Id: Iabdd544271a99b680adad3abb84341db2bf2c1f3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -155,6 +155,8 @@ void ToolTip::show(
|
||||
{
|
||||
if (content && content->count()) {
|
||||
auto tooltipWidget = new FakeToolTip;
|
||||
// limit the size of the widget to 90% of the screen size to have some context around it
|
||||
tooltipWidget->setMaximumSize(QGuiApplication::screenAt(pos)->availableSize() * 0.9);
|
||||
if (contextHelp.isNull()) {
|
||||
tooltipWidget->setLayout(content);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user