can I change SegmentList class into a derived class of QList?
I tried to do a for loop using the new c++11 range-based for loop format "for (Segment *seg : measure->segments()) {" but noticed wouldn't compile because SegmentLists (https://github.com/musescore/MuseScore/blob/master/libmscore/segmentlis…) is currently manually-coded and lacks the begin & end iterators, which are necessary for the new c++11 range-based for loop format.
Can I change the code for SegmentList by making the class simply extend QList and remove the SegmentList::insert,push_back,push_front,remove,insert functions from the codebase (since they would be implemented by QList)?
Comments
You cannot replace SegmentList with a QList. Every Segment in SegmentList has a next() method which is used at various places. This does not work with QList which needs an explicit iterator.
In reply to You cannot replace by [DELETED] 3
ok.