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

Alexander Drozdov adrozdoff at gmail.com
Tue Sep 6 09:30:35 CEST 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20160906/4a35bc31/attachment.html>


More information about the Qt-creator mailing list