Commit dc6480fd authored by hjk's avatar hjk
Browse files

debugger: open a new watch item on double click in the locals&watchers view

An attempt to fix http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1841
parent bc325eb9
......@@ -202,6 +202,16 @@ void WatchWindow::dropEvent(QDropEvent *ev)
//QTreeView::dropEvent(ev);
}
void WatchWindow::mouseDoubleClickEvent(QMouseEvent *ev)
{
const QModelIndex idx = indexAt(ev->pos());
if (!idx.isValid()) {
setModelData(RequestWatchExpressionRole, QString("<Edit>"));
return;
}
QTreeView::mouseDoubleClickEvent(ev);
}
void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
{
const QModelIndex idx = indexAt(ev->pos());
......
......@@ -69,6 +69,7 @@ private:
void dragEnterEvent(QDragEnterEvent *ev);
void dropEvent(QDropEvent *ev);
void dragMoveEvent(QDragMoveEvent *ev);
void mouseDoubleClickEvent(QMouseEvent *ev);
bool event(QEvent *ev);
void editItem(const QModelIndex &idx);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment