KDAB / GammaRay

GammaRay is a tool to poke around in a Qt-application and also to manipulate the application to some extent.
https://www.kdab.com/gammaray
Other
1.59k stars 279 forks source link

no matching member function for call to 'connect' #999

Closed chenrui333 closed 1 month ago

chenrui333 commented 1 month ago

while regression build gammaray 3.0.0, I ran into some build failure as below:

  [ 11%] Building CXX object 3rdparty/kuserfeedback/CMakeFiles/gammaray_kuserfeedback.dir/core/auditloguicontroller.cpp.o
  cd /tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/build/3rdparty/kuserfeedback && /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x050500 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_WIDGETS_LIB -Dgammaray_kuserfeedback_EXPORTS -I/tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/build/3rdparty/kuserfeedback -I/tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/3rdparty/kuserfeedback -I/tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/build/3rdparty/kuserfeedback/gammaray_kuserfeedback_autogen/include -I/tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0 -I/tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/3rdparty -I/tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/build -I/tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/3rdparty/kuserfeedback/core -I/tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/3rdparty/kuserfeedback/widgets -isystem /opt/homebrew/lib/QtWidgets.framework/Headers -iframework /opt/homebrew/lib -isystem /opt/homebrew/lib/QtCore.framework/Headers -isystem /opt/homebrew/share/qt/mkspecs/macx-clang -isystem /opt/homebrew/lib/QtGui.framework/Headers -isystem /opt/homebrew/lib/QtNetwork.framework/Headers -Wunused-but-set-variable -Wlogical-op -Wsizeof-pointer-memaccess -Wreorder -Wformat-security -Wsuggest-override -Wall -Wextra -pedantic -Woverloaded-virtual -Winit-self -Wmissing-include-dirs -Wunused -Wundef -Wpointer-arith -Wmissing-noreturn -Werror=return-type -Wswitch -Wno-gnu-zero-variadic-macro-arguments -std=gnu++0x -Qunused-arguments -Wdocumentation -fno-operator-names -Wzero-as-null-pointer-constant -O3 -DNDEBUG -std=gnu++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT 3rdparty/kuserfeedback/CMakeFiles/gammaray_kuserfeedback.dir/core/auditloguicontroller.cpp.o -MF CMakeFiles/gammaray_kuserfeedback.dir/core/auditloguicontroller.cpp.o.d -o CMakeFiles/gammaray_kuserfeedback.dir/core/auditloguicontroller.cpp.o -c /tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/3rdparty/kuserfeedback/core/auditloguicontroller.cpp
  /tmp/gammaray-20240721-26256-54vr1i/gammaray-3.0.0/common/propertysyncer.cpp:56:9: error: no matching member function for call to 'connect'
          connect(obj, QByteArray("2") + prop.notifySignal().methodSignature(), this, SLOT(propertyChanged()));
          ^~~~~~~
  /opt/homebrew/include/QtCore/qobject.h:194:36: note: candidate function not viable: no known conversion from 'QStringBuilder<QByteArray, QByteArray>' to 'const char *' for 2nd argument
      static QMetaObject::Connection connect(const QObject *sender, const char *signal,
                                     ^
  /opt/homebrew/include/QtCore/qobject.h:197:36: note: candidate function not viable: no known conversion from 'QStringBuilder<QByteArray, QByteArray>' to 'const QMetaMethod' for 2nd argument
      static QMetaObject::Connection connect(const QObject *sender, const QMetaMethod &signal,
                                     ^
  /opt/homebrew/include/QtCore/qobject.h:390:41: note: candidate function not viable: no known conversion from 'QStringBuilder<QByteArray, QByteArray>' to 'const char *' for 2nd argument
  inline QMetaObject::Connection QObject::connect(const QObject *asender, const char *asignal,
                                          ^
  /opt/homebrew/include/QtCore/qobject.h:215:9: note: candidate template ignored: substitution failure [with Func1 = QStringBuilder<QByteArray, QByteArray>, Func2 = const char (&)[19]]: no type named 'Object' in 'QtPrivate::FunctionPointer<QStringBuilder<QByteArray, QByteArray>>'
          connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal,
          ^                                                         ~~~~~~
  /opt/homebrew/include/QtCore/qobject.h:264:9: note: candidate function template not viable: requires 3 arguments, but 4 were provided
          connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 &&slot)
          ^

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/10029388831/job/27717728917?pr=177968 relates to https://github.com/Homebrew/homebrew-core/pull/177968

Waqar144 commented 1 month ago

3.0 doesn't support Qt 6.7

Waqar144 commented 1 month ago

Please try to use the 3.1 branch (just branched).

chenrui333 commented 1 month ago

yeah, it works for me. thanks @Waqar144!

close via https://github.com/Homebrew/homebrew-core/pull/178736