From: <ibr...@us...> - 2011-06-07 12:12:24
|
Revision: 3971 http://tora.svn.sourceforge.net/tora/?rev=3971&view=rev Author: ibre5041 Date: 2011-06-07 12:12:18 +0000 (Tue, 07 Jun 2011) Log Message: ----------- Fix SEGFAULT in toSecurity tool. The QT's doc's days "use QAbstractItemModel::beginResetModel and QAbstractItemModel::endResetModel rather than pure reset()". So I did it. It is not crashing anymore. Modified Paths: -------------- trunk/tora/src/tosecuritytreemodel.cpp Modified: trunk/tora/src/tosecuritytreemodel.cpp =================================================================== --- trunk/tora/src/tosecuritytreemodel.cpp 2011-06-07 11:50:07 UTC (rev 3970) +++ trunk/tora/src/tosecuritytreemodel.cpp 2011-06-07 12:12:18 UTC (rev 3971) @@ -276,6 +276,8 @@ QString owner; QString name; + beginResetModel(); + const std::list<toConnection::objectName> &objectList = toCurrentConnection(this).objects(true); for (std::list<toConnection::objectName>::const_iterator i = objectList.begin(); i != objectList.end(); @@ -339,7 +341,7 @@ } } - reset(); + endResetModel(); } void toSecurityTreeModel::sql(const QString &user, std::list<QString> &sqlLst) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |