Debugger: Don't fetch more data for console after engine shutdown

The engine might not exist anymore.

Change-Id: I7a542de7fb8b160d71a1650d37263e4433f97003
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Ulf Hermann
2017-01-05 15:25:13 +01:00
parent 8d08c601d5
commit abc4e96886
3 changed files with 16 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ namespace Internal {
ConsoleItemModel::ConsoleItemModel(QObject *parent) :
Utils::TreeModel<>(new ConsoleItem, parent),
m_maxSizeOfFileName(0)
m_maxSizeOfFileName(0), m_canFetchMore(false)
{
clear();
}
@@ -51,6 +51,16 @@ void ConsoleItemModel::clear()
emit selectEditableRow(index(0, 0, QModelIndex()), QItemSelectionModel::ClearAndSelect);
}
void ConsoleItemModel::setCanFetchMore(bool canFetchMore)
{
m_canFetchMore = canFetchMore;
}
bool ConsoleItemModel::canFetchMore(const QModelIndex &parent) const
{
return m_canFetchMore && TreeModel::canFetchMore(parent);
}
void ConsoleItemModel::appendItem(ConsoleItem *item, int position)
{
if (position < 0)