Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Q_DECLARE_METATYPE results in assert failure after upgrading from Qt 4.8 > 5.15

Q_DECLARE_METATYPE results in assert failure after upgrading from Qt 4.8 > 5.15

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 128 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zeux 0
    wrote on 24 Jun 2024, 20:16 last edited by
    #1

    I have a large file which uses these macros:

    Q_DECLARE_METATYPE(boost::function<void()>);
    Q_DECLARE_METATYPE(boost::function<void(const QPoint&)>);
    

    But sadly after upgrading from Qt 4.8 to 5.15 I am getting the error:

    ASSERT failure in qRegisterNormalizedMetaType: "qRegisterNormalizedMetaType was called with a not normalized type name, please call qRegisterMetaType instead.", file X:\redacted\vcpkg_installed\x86-windows\x86-windows\include\qt5\QtCore\qmetatype.h, line 1855
    

    I have tried to debug this for hours upon hours even went through a rabbit hole searching for a fix to this issue but all the people who have had it have different cases which resolve it.

    How should I call qRegisterMetaType like it is telling me to? I cannot find any macros, I tried to include QMetaType.h and then call it in my constructor for my large file but that did not fix it either please someone help me I cannot figure this out

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zeux 0
      wrote on 24 Jun 2024, 21:45 last edited by
      #2

      Replacing my types with typedefs resolved my issue

      1 Reply Last reply
      0
      • Z zeux 0 has marked this topic as solved on 24 Jun 2024, 21:45

      1/2

      24 Jun 2024, 20:16

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved