mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
quick workaround to avoid crash in loadCircles()
This commit is contained in:
parent
230eca985f
commit
70d0c7b1b3
@ -59,6 +59,8 @@
|
||||
* #define ID_DEBUG 1
|
||||
*****/
|
||||
|
||||
#define QT_BUG_CRASH_IN_TAKECHILD_WORKAROUND 1
|
||||
|
||||
// Data Requests.
|
||||
#define IDDIALOG_IDLIST 1
|
||||
#define IDDIALOG_IDDETAILS 2
|
||||
@ -586,6 +588,17 @@ void IdDialog::loadCircles(const std::list<RsGroupMetaData>& groupInfo)
|
||||
|
||||
mStateHelper->setActive(CIRCLESDIALOG_GROUPMETA, true);
|
||||
|
||||
#ifdef QT_BUG_CRASH_IN_TAKECHILD_WORKAROUND
|
||||
// These 3 lines are normally not needed. But apparently a bug (in Qt ??) causes Qt to crash when takeChild() is called. If we remove everything from the
|
||||
// tree widget before updating it, takeChild() is never called, but the all tree is filled again from scratch. This is less efficient obviously, and
|
||||
// also collapses the tree. Because it is a *temporary* fix, I dont take the effort to save open/collapsed items yet. If we cannot find a proper way to fix
|
||||
// this, then we'll need to implement the two missing functions to save open/collapsed items.
|
||||
|
||||
ui->treeWidget_membership->clear();
|
||||
mExternalOtherCircleItem = NULL ;
|
||||
mExternalBelongingCircleItem = NULL ;
|
||||
#endif
|
||||
|
||||
/* add the top level item */
|
||||
//QTreeWidgetItem *personalCirclesItem = new QTreeWidgetItem();
|
||||
//personalCirclesItem->setText(0, tr("Personal Circles"));
|
||||
|
Loading…
Reference in New Issue
Block a user