[Qt-creator] QtC master :: Debugger view for Threads and Breakpoints work wrong

Alexander Drozdov adrozdoff at gmail.com
Fri Sep 9 04:42:11 CEST 2016


Just a reminder

2016-09-06 17:30 GMT+10:00 Alexander Drozdov <adrozdoff at gmail.com>:

> Hi guys!
>
> Seems that after some changes Mouse double click work broken for two views:
> * Threads: double click (and any key pressing) on thread shows context
> menu instead of thread switching
> * Breakpoints: double click on breakpoing line does not moves to the
> breapoint location but show Add breakpoint dialog.
>
> Both of them simple to fix and I work on patch now to commit it to the
> Gerrit. But I have one big question.
>
> Method `BreakHandler::setData()` contains next code:
> ```
>     [1]
>     if (role == BaseTreeView::ItemActivatedRole) {
>         if (Breakpoint bp = findBreakpointByIndex(idx))
>             bp.gotoLocation();
>         return true;
>     }
>
> ...
>         [2]
>         if (ev.as<QMouseEvent>(QEvent::MouseButtonDblClick)) {
>             if (Breakpoint b = findBreakpointByIndex(idx)) {
>                 if (idx.column() >= BreakpointAddressColumn)
>                     editBreakpoints({ b }, ev.view());
>             } else {
>                 addBreakpoint();
>             }
>             return true;
>         }
> ```
> Code block [1] works as expected... when it called by double clicking. But
> code block [2] marks any mouse double clicks as handled and breaks [1].
> Also, code block [2] now always has `idx` with invalid value, as a result
> `addBreakpoint()` calls in all cases. `ev->index()` returns invalid index
> too. `ev->selectedRows()` always returns only one row with valid index...
> but column always zero. As a result, in new environment code block [2] does
> not work as expected at all. It is needed here? This actions avail via
> context menu.
>
> Note, keyboard handling in this location works as expected.
>
> So, any help for code block [2] is welcomed.
>
> I known how to bypass event process, I don't know how to fix edit/add
> functionality. My suggestion: remove it at all.
>
> --
> WBR, Alexander Drozdov
> http://htrd.su
>



-- 
WBR, Alexander Drozdov
http://htrd.su
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20160909/5d16aaeb/attachment.html>


More information about the Qt-creator mailing list