Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109097

OPC UA examples use relative paths and assume in-source builds, thus do not work out-of-the-box when loaded in Qt Creator

    XMLWordPrintable

Details

    • ddfe36393 (dev), db2fb1c26 (6.4), a03a658bb (6.5)

    Description

      The examples use relative paths to navigate from the executable's directory back to the source directory. These paths are only correct for in-source builds, not for shadow builds.

       

      In addition, the Windows-specific path building code in the OPC UA Viewer Example is wrong anyway:

      Critical: Creating PKI path 'C:/Qt/Examples/Qt-6.4.1/opcua/build-opcuaviewer-Desktop_Qt_6_4_1_MSVC2019_64bit-Debug..//pki/trusted/certs': FAILED.
      

       

      Suggestions

      • Embed provided certificates in a QRC resource, to avoid loading them from the source folder.
      • Save certificates somewhere using QStandardPaths or in PWD, to avoid writing files to the source folder.
      • Just ask the user to manually run the Simulation Server before starting the client (like how the WebSocket examples do it: https://doc.qt.io/qt-6/qtwebsockets-examples.html ). Don't try to be programatically find the other executable.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-109097
          # Subject Branch Project Status CR V

          Activity

            People

              kkohne Kai Köhne
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes