Compilation issue on new 2.9.0
kerautret opened this issue · 5 comments
When trying the new version I obtain this errors. (it was working in previous version for instance from 3050415)
qglviewer.cpp:661:3: error: no matching member function for call to 'disconnect'
disconnect(screen(), SIGNAL(physicalDotsPerInchChanged(qreal)), this->camera(), SLOT(setDevicePixelRatio(qreal)));
^~~~~~~~~~
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:351:17: note: candidate function not viable: cannot convert argument of incomplete type 'QScreen *' to 'const QObject *' for 1st argument
static bool disconnect(const QObject *sender, const char *signal,
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:384:24: note: candidate function template not viable: no known conversion from 'const char[28]' to 'void **' for 4th argument
static inline bool disconnect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal,
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:353:17: note: candidate function not viable: cannot convert argument of incomplete type 'QScreen *' to 'const QObject *' for 1st argument
static bool disconnect(const QObject *sender, const QMetaMethod &signal,
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:367:24: note: candidate template ignored: substitution failure [with Func1 = const char *, Func2 = const char *]: no type named 'Object' in 'QtPrivate::FunctionPointer<const char *>'
static inline bool disconnect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal,
^ ~~~~~~
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:355:17: note: candidate function not viable: requires at most 3 arguments, but 4 were provided
inline bool disconnect(const char *signal = nullptr,
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:358:17: note: candidate function not viable: requires at most 2 arguments, but 4 were provided
inline bool disconnect(const QObject *receiver, const char *member = nullptr) const
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:360:17: note: candidate function not viable: requires 1 argument, but 4 were provided
static bool disconnect(const QMetaObject::Connection &);
^
qglviewer.cpp:669:39: error: member access into incomplete type 'QScreen'
camera->setDevicePixelRatio(screen()->devicePixelRatio());
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtGui.framework/Headers/qcursor.h:51:7: note: forward declaration of 'QScreen'
class QScreen;
^
qglviewer.cpp:674:3: error: no matching member function for call to 'connect'
connect(screen(), SIGNAL(physicalDotsPerInchChanged(qreal)), camera, SLOT(setDevicePixelRatio(qreal)));
^~~~~~~
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:222:36: note: candidate function not viable: cannot convert argument of incomplete type 'QScreen *' to 'const QObject *' for 1st argument
static QMetaObject::Connection connect(const QObject *sender, const char *signal,
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:225:36: note: candidate function not viable: cannot convert argument of incomplete type 'QScreen *' to 'const QObject *' for 1st argument
static QMetaObject::Connection connect(const QObject *sender, const QMetaMethod &signal,
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:481:41: note: candidate function not viable: cannot convert argument of incomplete type 'QScreen *' to 'const QObject *' for 1st argument
inline QMetaObject::Connection QObject::connect(const QObject *asender, const char *asignal,
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:242:43: note: candidate template ignored: substitution failure [with Func1 = const char *, Func2 = const char *]: no type named 'Object' in 'QtPrivate::FunctionPointer<const char *>'
static inline QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal,
^ ~~~~~~
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:283:13: note: candidate template ignored: requirement 'int(QtPrivate::FunctionPointer<const char *>::ArgumentCount) >= 0 && !QtPrivate::FunctionPointer<const char *>::IsPointerToMemberFunction' was not satisfied [with Func1 = const char *, Func2 = const char *]
connect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal, const QObject *context, Func2 slot,
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:322:13: note: candidate template ignored: substitution failure [with Func1 = const char *, Func2 = const char *]: no type named 'Object' in 'QtPrivate::FunctionPointer<const char *>'
connect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal, const QObject *context, Func2 slot,
^ ~~~~~~
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:274:13: note: candidate function template not viable: requires 3 arguments, but 4 were provided
connect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal, Func2 slot)
^
/opt/homebrew/Cellar/qt@5/5.15.6/lib/QtCore.framework/Headers/qobject.h:314:13: note: candidate function template not viable: requires 3 arguments, but 4 were provided
connect(const typename QtPrivate::FunctionPointer::Object *sender, Func1 signal, Func2 slot)
Thank you for this feedback. This is Qt5 specific, I'll add a Qt5 build in the push actions to catch these.
Fixed in v2.9.1
I just tested and it perfectly works on QT5 thanks ;)