Solved QObject isn't working
-
I'am working on Ubuntu 16.04 and Qt version 5.9.3. I never touched anything to Qt files, but I get an error. Errors:
In file included from ../../Qt/5.9.3/gcc_64/include/QtCore/QObject:1:0, from ../../Qt/5.9.3/gcc_64/include/QtGui/qopenglcontext.h:48, from ../../Qt/5.9.3/gcc_64/include/QtGui/qopenglfunctions.h:55, from ../../Qt/5.9.3/gcc_64/include/QtGui/QOpenGLFunctions:1: ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h: In static member function ‘static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType)’: ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h:256:69: error: expected primary-expression before ‘)’ token receiver, reinterpret_cast<void **>(&slot), ^ ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h: In static member function ‘static typename std::enable_if<((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)’: ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h:267:52: error: expected primary-expression before ‘,’ token return connect(sender, signal, sender, slot, Qt::DirectConnection); ^ ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h: In static member function ‘static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == (-1)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)’: ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h:307:52: error: expected primary-expression before ‘,’ token return connect(sender, signal, sender, slot, Qt::DirectConnection); ^ ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h: In static member function ‘static bool QObject::disconnect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2)’: ../../Qt/5.9.3/gcc_64/include/QtCore/qobject.h:371:116: error: expected primary-expression before ‘)’ token return disconnectImpl(sender, reinterpret_cast<void **>(&signal), receiver, reinterpret_cast<void **>(&slot),
Note: The "In file included from" only shows files included from Qt files.
I received this error 7 times.Pointing code:
structMultimer* multimer=new structMultimer("protein-cache-data") //It crashes here
-
Hi
Unless you are using very old gcc or something up with your kit, did
you recently use refactor or search and replace?
In any case, try remove it with maintenance tool and
add it again. -
and welcome to the forums :)
-
Thank you. All I have done is reinstalled Qt and it now works fine.
-
I have updated to include the pointing point.