diff options
Diffstat (limited to 'src/plugins/debugger/sourcefileshandler.cpp')
-rw-r--r-- | src/plugins/debugger/sourcefileshandler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/debugger/sourcefileshandler.cpp b/src/plugins/debugger/sourcefileshandler.cpp index b933a6ab9c..5a1ede17d8 100644 --- a/src/plugins/debugger/sourcefileshandler.cpp +++ b/src/plugins/debugger/sourcefileshandler.cpp @@ -48,9 +48,10 @@ void SourceFilesHandler::clearModel() { if (m_shortNames.isEmpty()) return; + beginResetModel(); m_shortNames.clear(); m_fullNames.clear(); - reset(); + endResetModel(); } QVariant SourceFilesHandler::headerData(int section, @@ -100,6 +101,7 @@ QVariant SourceFilesHandler::data(const QModelIndex &index, int role) const void SourceFilesHandler::setSourceFiles(const QMap<QString, QString> &sourceFiles) { + beginResetModel(); m_shortNames.clear(); m_fullNames.clear(); QMap<QString, QString>::ConstIterator it = sourceFiles.begin(); @@ -108,7 +110,7 @@ void SourceFilesHandler::setSourceFiles(const QMap<QString, QString> &sourceFile m_shortNames.append(it.key()); m_fullNames.append(it.value()); } - reset(); + endResetModel(); } void SourceFilesHandler::removeAll() |