Commit af1127f7 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

VCS: Do not delete SubmitFileModel before setting the new one

setFileModel() calls QTreeView::clearSelection() before setting the new model.
If the view has no model (because it was deleted earlier), a warning is shown.

Change-Id: Id694b073360b08bd8fd4e8b1db04250a71f792c1
Reviewed-by: default avatarAndré Hartmann <>
Reviewed-by: default avatarTobias Hunger <>
parent 6a17eafa
......@@ -417,11 +417,11 @@ QStringList VcsBaseSubmitEditor::checkedFiles() const
void VcsBaseSubmitEditor::setFileModel(SubmitFileModel *model)
QTC_ASSERT(model, return);
if (SubmitFileModel *oldModel = d->m_widget->fileModel()) {
SubmitFileModel *oldModel = d->m_widget->fileModel();
if (oldModel)
delete oldModel;
delete oldModel;
QSet<QString> uniqueSymbols;
const CPlusPlus::Snapshot cppSnapShot = CppTools::CppModelManager::instance()->snapshot();
Supports Markdown
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