Skip to content
  • 0 Votes
    3 Posts
    287 Views
    A

    @SGaist
    Hey thank you,
    I removed the QObject heredity for every class since I don't need ^^
    I made every copy constructor and operator= overload not usable (= delete)
    I made for each a static clone() method which makes a deep copy

    CueTrack * CueTrack::clone(CueTrack *other) { if(!other) return nullptr; CueTrack * trackToReturn = new CueTrack(); if(other->_animationsList) { delete trackToReturn->_animationsList; trackToReturn->_animationsList = AnimationsSubTrack::clone(other->_animationsList); } QVectorIterator<FxSubTrack*> it(other->_fxList); while (it.hasNext()) { auto p = it.next(); FxSubTrack * fx = FxSubTrack::clone(p); trackToReturn->appendFx(fx); } if(other->_zoneChase) trackToReturn->_zoneChase = ZoneChaseSubTrack::clone(other->_zoneChase); return trackToReturn; }
  • 0 Votes
    3 Posts
    593 Views
    JonBJ

    @Lucky01
    So far you have asked about Laravel and SQL in PHP. Why do you want to use this forum if you are using them and not Qt? Beats me.