Revert "Use persistent model index in devices widget"

This reverts commit 46dd028a33.

The above commit caused a regression - issue #281

As seen in valgrind, crash was caused by portModel reset writing into
a freed block - presumably pertaining to persistent indexes. The block
was freed by the persistent index itself earlier when it was set to
invalid - so the model should not have been accessing that.

The application code seems correct - maybe the Qt code has a bug?
Unlikely but not impossible. For now go back to using QModelIndex
instead of QPersistentModelIndex

Fixes #281
This commit is contained in:
Srivats P 2019-08-24 11:59:41 +05:30
parent 3e46c1b991
commit 36e0a64f81

View File

@ -58,7 +58,7 @@ private:
void setDeviceInfoButtonsVisible(bool show);
PortGroupList *portGroups_;
QPersistentModelIndex currentPortIndex_;
QModelIndex currentPortIndex_;
};
#endif