Advertisement
popov-aa

Untitled

Oct 31st, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. QEventLoop eventLoop;
  2. QObject::connect(&mksManager, &MksManager::connectionFinished,
  3.                  &eventLoop, &QEventLoop::quit);
  4. mksManager.connectToDevice();
  5. eventLoop.exec();
  6.  
  7. if (mksManager.status() != 1)
  8.     throw std::runtime_error(tr("Error of connecting to device.").toStdString());
  9.  
  10. int code = 0;
  11. QByteArray checkpointsByteArray = mksManager.getCheckpoints(code);
  12. if (code != 0)
  13.     throw std::runtime_error(tr("Error of reading checkpoints.xml from device.").toStdString());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement