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. Issues with qobject.h file
Qt 6.11 is out! See what's new in the release blog

Issues with qobject.h file

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.7k Views 1 Watching
  • 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.
  • vishnuV Offline
    vishnuV Offline
    vishnu
    wrote on last edited by
    #1

    Hello all,
    Till yesterday all my Qt applications were working fine. Today, while developing qt application all of a sudden I got the error Messages.
    @
    "error: 'bool QtPrivate::QSlotObjectBase::Compare(void**)' conflicts with a previous declaration
    inline bool Compare(void **a) { bool ret; m_impl(Compare, this, 0, a, &ret); return ret; }

    "error: cannot convert 'QtPrivate::QSlotObjectBase::Compare' from type 'bool (QtPrivate::QSlotObjectBase::)(void**)' to type 'int'
    inline bool Compare(void **a) { bool ret; m_impl(Compare, this, 0, a, &ret); return ret; }

    error: 'bool QtPrivate::QSlotObjectBase::Compare(void**)' cannot appear in a constant-expression
    case Compare:
    @

    Even my previous qt application are not working .showing the same error. I have no idea what is the mistake i have done. Can any one help me to get out of this Problem?
    Thanks

    [andreyc EDIT]: Added @ around code.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should add which version of Qt you are using as well as OS and compiler

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #3

        Hi, just guessing but could the problem be you've by accident edited one of Qt's internal files?
        I'm thinking of qobject_impl.h in my case it's in the directory
        C:\Qt\5.4\mingw491_32\include\QtCore. If you open that file, check line 123, is it like this:
        @
        ...
        inline bool Compare(void **a) { bool ret; m_impl(Compare, this, 0, a, &ret); return ret; }
        ...
        @

        if so change it back to the original:
        @
        inline bool compare(void **a) { bool ret; m_impl(Compare, this, 0, a, &ret); return ret; }
        @

        1 Reply Last reply
        0

        • Login

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