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

QMutex is missing lock() on MSVC 2017

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.10.1
    • Core: Other
    • None

    Description

      Using MSVC64 2017, QMutex is missing the lock() method. Including <QMutex> makes the compilation fails with the following errors:

       

      c:\qt\5.10.1\msvc2017_64\include\qtcore\qmutex.h(206): error C2039: 'lock': n'est pas membre de 'QMutex'
      c:\qt\5.10.1\msvc2017_64\include\qtcore\qmutex.h(126): note: voir la déclaration de 'QMutex'
      c:\qt\5.10.1\msvc2017_64\include\qtcore\qmutex.h(227): error C2039: 'lock': n'est pas membre de 'QMutex'
      c:\qt\5.10.1\msvc2017_64\include\qtcore\qmutex.h(126): note: voir la déclaration de 'QMutex'
      

      Looking at the diff against MSVC 2015:

      --- C:\Qt\5.10.1\msvc2015_64\include\QtCore\qmutex.h
      +++ C:\Qt\5.10.1\msvc2017_64\include\QtCore\qmutex.h
      @@ -74,7 +74,7 @@
       #endif
       
           // BasicLockable concept
      -    inline void lock() QT_MUTEX_LOCK_NOEXCEPT {
      +    inline void ScopedLock() QT_MUTEX_LOCK_NOEXCEPT {
               if (!fastTryLock())
                   lockInternal();
           }
      @@ -131,7 +131,7 @@
           ~QMutex();
       
           // BasicLockable concept
      -    void lock() QT_MUTEX_LOCK_NOEXCEPT;
      +    void ScopedLock() QT_MUTEX_LOCK_NOEXCEPT;
           bool tryLock(int timeout = 0) QT_MUTEX_LOCK_NOEXCEPT;
           // BasicLockable concept
           void unlock() Q_DECL_NOTHROW;
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            renaud13 Renaud Cerrato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes