<div dir="ltr">Hi everybody,<br> I just fixed the bug which delete transfer causes crash. During fixing that, I noticed the fucntion TransferTreeModel::isTransferGroup() is kind of inefficient which compares to all group pointers. After looking at class TransferHandler & TransferGroupHandler, I find the two share a lot of interfaces. So my suggestion is to have a Handler class which becomes the base class of TransferHandler & TransferGroupHandler with all those virtual functions as interfaces. Then we will save save pointer of Handler while creating index in the treemodel class. And TransferTreeModel::isTransferGroup() can be simply implemented as <br>
<br>if (dynamic_cast<TransferGroupHandler*>) <br> return true;<br><br>which seems to be better. I'm not sure about the other parts of the code, though. So what's ur opinion?<br><br>Thanks<br>-- <br>Ningyu<br>
</div>