Running Examples on INTEGRITY

See Building for INTEGRITY for instructions on how to build the examples for INTEGRITY. The instructions provide high-level steps that are required for building Qt Safe Renderer for INTEGRITY.

However, you should note that the steps assume you already have experience of working with the INTEGRITY environment. If you need more detailed information about how to build Qt Safe Renderer for INTEGRITY, you can contact Qt Consulting Services.

Workaround for Running Qt Cluster Example

The Qt Cluster example in INTEGRITY has a known error QTAUTO-1003. The error is described in the release note section 1.6. You find the release note under <Qt installation directory>/Docs/QtSafeRenderer-<version>. The following code changes provide a workaround for the error until the proper fix is available.

To include the required files for INTEGRITY, update <Qt installation directory>/Examples/QtSafeRenderer-<version>/qtcluster/main.cpp as follows:

  1. #include "etcprovider.h"
  2. #include "crasher.h"
  3. #ifdef Q_OS_INTEGRITY
  4. #include <mqueue.h>
  5. #include <unistd.h>
  6. #define ATTACH_POINT "saferenderer"
  7. #endif

To add the actual workaround functionality, update <Qt installation directory>/Examples/QtSafeRenderer-<version>/qtcluster/main.cpp as follows:

  1. qputenv("QT_QPA_WM_DISP_ID", "0");
  2. qputenv("QT_QPA_WM_LAYER", "3");
  3. #ifdef Q_OS_INTEGRITY
  4. sleep(10);
  5. mqd_t mqdes;
  6. if ((mqdes = mq_open(ATTACH_POINT, O_WRONLY)) != MQ_FAILED) {
  7. qWarning() << "Dummy op success";
  8. mq_close(mqdes);
  9. } else {
  10. qFatal("Failed to open connection to safe renderer. Dummy.");
  11. }
  12. #endif
  13. QGuiApplication app(argc, argv);

The following code provides all the required updates in a .patch file format:

  1. diff --git a/examples/qtcluster/main.cpp b/examples/qtcluster/main.cpp
  2. index 0c7e836..4fbd3e9 100644
  3. --- a/examples/qtcluster/main.cpp
  4. +++ b/examples/qtcluster/main.cpp
  5. @@ -65,6 +65,11 @@
  6. #include "etcprovider.h"
  7. #include "crasher.h"
  8. +#ifdef Q_OS_INTEGRITY
  9. +#include <mqueue.h>
  10. +#include <unistd.h>
  11. +#define ATTACH_POINT "saferenderer"
  12. +#endif
  13. int main(int argc, char **argv)
  14. {
  15. @@ -78,6 +83,18 @@ int main(int argc, char **argv)
  16. qputenv("QT_QPA_WM_DISP_ID", "0");
  17. qputenv("QT_QPA_WM_LAYER", "3");
  18. + #ifdef Q_OS_INTEGRITY
  19. + sleep(10);
  20. + mqd_t mqdes;
  21. +
  22. + if ((mqdes = mq_open(ATTACH_POINT, O_WRONLY)) != MQ_FAILED) {
  23. + qWarning() << "Dummy op success";
  24. + mq_close(mqdes);
  25. + } else {
  26. + qFatal("Failed to open connection to safe renderer. Dummy.");
  27. + }
  28. + #endif
  29. +
  30. QGuiApplication app(argc, argv);
  31. //Find the ip address to the environment variable

Running Examples on QNXTesting the Messaging Interface

Available under certain Qt licenses.Find out more.