Crash when clicking on BlockList ("View Change in context" or "Annotate" views)
The bottom pane has three functionalities:
- the normal diff view;
- a "View Change in context of file" view;
- an "Annotate with revision numbers" view.
When selecting "View Change in context of file" or "Annotate with revision numbers" (number 1 in the screenshot below), a small graphical widget appears on the left of the pane. The user can click or drag over the box in order to coarsely navigate the file position (number 2).
When doing this in Qt6, there is a crash:
** Mercurial version (6.8.2). TortoiseHg version (6.9+32-ae24d8b47e5d)
** Command:
** CWD: <BASE>
** Encoding: UTF-8
** Extensions loaded: absorb, amend, churn, extdiff, hggit unknown (dulwich 0.22.6), histedit, mq, patchbomb, rebase, show, strip, tortoisehg.util.configitems, uncommit
** Python version: 3.13.2 (main, Feb 4 2025, 00:00:00) [GCC 14.2.1 20250110 (Red Hat 14.2.1-7)]
** System: Linux desktop 6.13.6-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Mar 7 21:33:48 UTC 2025 x86_64
** Qt-6.8.2 PyQt-6.8.1.dev2502011625 QScintilla-2.14.1
Traceback (most recent call last):
File "<BASE>/tortoisehg/hgqt/blockmatcher.py", line 156, in mousePressEvent
self.scrollToPos(event.y())
^^^^^^^
AttributeError: 'QMouseEvent' object has no attribute 'y'
```
This is almost certainly due to QMouseEvent.y() being deprecated in Qt 6.0: