forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user