Skip to content
  • 0 Votes
    3 Posts
    321 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
    4 Posts
    1k Views
    aha_1980A

    @donquixote said in Serial port data loss:

    I used it because i thought maybe the problem is that new incoming data is interrupting the function before the previous one has not finished yet. The problem was still in there before that.

    Slots are not interrupted. They are called one by one from the event loop in the background. Think of your slots are like a subroutine that is called from main if there is work to do.

    process data and block serial signals at the time
    QT'll continue to buffer data at the time

    And I guess that will not work out. Even if it works on one platform, it may fail on another one.

    OK, got your idea. That should be the problem since i don't wait for readyread signal in the loop, right?

    Yeah, but don't wait for readyRead, leave the slot and give Qt the possibility to process the data. It will call your slot again once new data is ready.

    Regards

  • 0 Votes
    8 Posts
    6k Views
    L

    @LuGRU
    Why not to use: QSharedMemory and You don't need to worry about message formatting.
    Because I run process with different account.
    First process run from System account and second from local account

    When I read SharedMemory in another process I have error "QSharedMemory handle doesn't exist"

  • 0 Votes
    4 Posts
    2k Views
    W

    @Jeff-Andle

    If you do not like that cleanup or if it is too hard to decide whether to free the memory you can use one oft these.

    QSharedData QSharedDataPointer QSharedPointer

    I have used QSharedDataPointer (but not the others so far), and it seems to work nice.

  • 0 Votes
    7 Posts
    4k Views
    L

    Hello, everyone. After some hours of debugging, I could finally find the problem. Long story short: apparently, the Linux driver for CP210x USB-TTL converter does not implement software flow control, but only hardware flow control. I've moved to the latter and it's working like a charm now. Thank you all for your help.