QmlJSTools: Fix glitches in QML console

Half of the widget height is a particularly bad estimate for the
default height of a console item. Focusing editable items should be
done by explicitly transferring focus. Also, this only "worked" if
an editable or formerly editable row was the very first line in the
view, which rarely happens.

By default, if no settings are present, all log categories are enabled
now. Otherwise we might miss the error messages resulting from failed
evaluations.

Repeatedly setting the filter regexp to the same thing doesn't signal
a filter change, which is what we actually want when changing the
filter.

Change-Id: Ibe33b0438d92e777bdceaf9af032fc5117ba4041
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-08-25 15:26:48 +02:00
parent b5717a5315
commit 7dd898a1b1
4 changed files with 14 additions and 10 deletions

View File

@@ -269,8 +269,6 @@ QSize QmlConsoleItemDelegate::sizeHint(const QStyleOptionViewItem &option,
level++;
}
int width = view->width() - level * view->indentation() - view->verticalScrollBar()->width();
if (index.flags() & Qt::ItemIsEditable)
return QSize(width, view->height() * 1/2);
const bool selected = (view->selectionModel()->currentIndex() == index);
if (!selected && option.font == m_cachedFont && m_cachedHeight > 0)