Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QRemoteObjectReplica.Suspect when busy in while loop
Qt 6.11 is out! See what's new in the release blog

QRemoteObjectReplica.Suspect when busy in while loop

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 524 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    majorRonk
    wrote on last edited by majorRonk
    #1

    I'm working with QRemoteObjectReplica and QRemoteObjectPendingReply::waitForSource function and found out that a while loop (~10sec) in the replica class function causes its state to go from QRemoteObjectReplica::State::Valid to QRemoteObjectReplica::State::Suspect after some seconds and i never receive a replica->isFinished() event on the connected node side.
    Is there a way to keep my replica valid/responsive for the other side while its busy with a while loop?
    Something like repetitive calls QCoreApplication::processEvents()?

    jsulmJ 1 Reply Last reply
    0
    • M majorRonk

      I'm working with QRemoteObjectReplica and QRemoteObjectPendingReply::waitForSource function and found out that a while loop (~10sec) in the replica class function causes its state to go from QRemoteObjectReplica::State::Valid to QRemoteObjectReplica::State::Suspect after some seconds and i never receive a replica->isFinished() event on the connected node side.
      Is there a way to keep my replica valid/responsive for the other side while its busy with a while loop?
      Something like repetitive calls QCoreApplication::processEvents()?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @majorRonk Why do you need a loop?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      0
      • jsulmJ jsulm

        @majorRonk Why do you need a loop?

        M Offline
        M Offline
        majorRonk
        wrote on last edited by
        #3

        @jsulm
        The loop has something to do with a special libusb device waiting to be established etc.
        I don't want to change the logic of this code (not from me).
        Just want to wrap the QRemoteObjectReplica class around it, call it from the connection and wait until its finished
        with QRemoteObjectPendingReply
        But i guess it works only if the function returns "immediately".

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved