Issues with qobject.h file
-
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.
-
Hi,
You should add which version of Qt you are using as well as OS and compiler
-
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; }
@