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

Global variable found in qeglfsx11integration.cpp

    XMLWordPrintable

    Details

    • Commits:
      9861fd09cb (qt/qtbase/dev) 9861fd09cb (qt/tqtc-qtbase/dev) 930d105dd7 (qt/qtbase/6.3) 930d105dd7 (qt/tqtc-qtbase/6.3) d8dfc44193 (qt/tqtc-qtbase/5.15) 8a758968eb (qt/tqtc-qtbase/6.2) d8dfc44193 (qt/tqtc-qtbase/tqtc/vxworks-5.15.10)

      Description

      The running variable has external linkage: https://code.woboq.org/qt5/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp.html#running

      This causes problems when a user's code also has a global variable called "running" and they statically link to Qt.

       

      Suggestion

      Turn it into a file-static variable: `static QAtomicInt running;`

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes