forked from qt-creator/qt-creator
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: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
6a17eafa05
commit
af1127f757
@@ -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)
|
||||
model->updateSelections(oldModel);
|
||||
delete oldModel;
|
||||
}
|
||||
d->m_widget->setFileModel(model);
|
||||
delete oldModel;
|
||||
|
||||
QSet<QString> uniqueSymbols;
|
||||
const CPlusPlus::Snapshot cppSnapShot = CppTools::CppModelManager::instance()->snapshot();
|
||||
|
Reference in New Issue
Block a user