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

qRegisterMetaType<QPointer<QWidget> > does not compile

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 5.1.0
    • Fix Version/s: 5.1.1
    • Component/s: Core: Object Model
    • Labels:
      None
    • Commits:
      bef01c87a81d88ac2a32b87e1bb23e7c12fd4dd9

      Description

      The problem is limited to Visual Studio 2012 (Update 3), in 64 bit, and in Qt 5.1.0

      qRegisterMetaType<QPointer<QWidget> >("QPointer<QWidget>");

      This compiles fine in Qt 4.8.4 (32/64 bit), and in 5.1.0 32 bit

      1>c:\qt\5.1.0\64\qtbase\include\qtcore\../../src/corelib/kernel/qmetatype.h(886): error C2220: warning treated as error - no 'object' file generated
      1>          c:\qt\5.1.0\64\qtbase\include\qtcore\../../src/corelib/kernel/qmetatype.h(886) : while compiling class template member function 'int QMetaTypeId_QPointer_QObjectStar<T>::qt_metatype_id(void)'
      1>          with
      1>          [
      1>              T=QWidget
      1>          ]
      1>          c:\qt\5.1.0\64\qtbase\include\qtcore\../../src/corelib/kernel/qmetatype.h(532) : see reference to function template instantiation 'int QMetaTypeId_QPointer_QObjectStar<T>::qt_metatype_id(void)' being compiled
      1>          with
      1>          [
      1>              T=QWidget
      1>          ]
      1>          c:\qt\5.1.0\64\qtbase\include\qtcore\../../src/corelib/kernel/qmetatype.h(886) : see reference to class template instantiation 'QMetaTypeId_QPointer_QObjectStar<T>' being compiled
      1>          with
      1>          [
      1>              T=QWidget
      1>          ]
      1>          c:\qt\5.1.0\64\qtbase\include\qtcore\../../src/corelib/kernel/qmetatype.h(531) : see reference to class template instantiation 'QMetaTypeId<T>' being compiled
      1>          with
      1>          [
      1>              T=QPointer<QWidget>
      1>          ]
      1>          Source\Application.cpp(524) : see reference to class template instantiation 'QMetaTypeId2<T>' being compiled
      1>          with
      1>          [
      1>              T=QPointer<QWidget>
      1>          ]
      1>c:\qt\5.1.0\64\qtbase\include\qtcore\../../src/corelib/kernel/qmetatype.h(886): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
      Build has been canceled.
      

        Attachments

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

          Activity

            People

            Assignee:
            kleint Friedemann Kleint
            Reporter:
            philippe Philippe Goutier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes