Open DieALot36T9 opened 8 months ago
hello,I have encountered the same error,
no matching function for call to ‘QWeakPointer::QWeakPointer(QTableWidget&, bool)’ 62 | inline QPointer(T p) : wp(p, true) { }
Do you have resolved this error?
Use qt 5
and use * instead to QWeakPointer
I'm getting this while trying to build from source:
CMake Build Begins
-- The C compiler identification is GNU 13.2.1 -- The CXX compiler identification is GNU 13.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- [QtScrcpy] Project QtScrcpy 0.0.0 -- [QtScrcpy] CPU_ARCH:x64 -- [QtScrcpy] BUILD_TYPE:Release -- [QtScrcpy] C++ compiler ID is: GNU -- [QtScrcpy] Set warnings as error -- [QtScrcpy] Qt version is: 5.15 -- multi config:QC_IS_MUTIL_CONFIG -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE::QPointer(T ) [with T = VideoSocket]’:
/home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/demuxer/demuxer.h:44:43: required from here
/usr/include/qt5/QtCore/qpointer.h:62:29: error: no matching function for call to ‘QWeakPointer::QWeakPointer(VideoSocket&, bool)’
62 | inline QPointer(T p) : wp(p, true) { }
| ^ > QWeakPointer::QWeakPointer(X, bool) [with typename std::enable_if<std::is_convertible<_Up, _Tp>::value, bool>::type = X; T = QObject]’
685 | inline QWeakPointer(X ptr, bool) : d(ptr ? Data::getAndRef(ptr) : nullptr), value(ptr)
| ^ = true>
| ^~~~
/usr/include/qt5/QtCore/qsharedpointer_impl.h:642:12: note: candidate: ‘template<class X, typename std::enable_if<std::is_convertible<_Up, QObject>::value, bool>::type > QWeakPointer::QWeakPointer(const QSharedPointer&) [with typename std::enable_if<std::is_convertible<_Up, _Tp>::value, bool>::type = X; T = QObject]’
642 | inline QWeakPointer(const QSharedPointer &o) : d(nullptr), value(nullptr)
| ^’ and ‘VideoSocket’
62 | inline QPointer(T p) : wp(p, true) { }
| ^ > QWeakPointer::QWeakPointer(const QWeakPointer&) [with typename std::enable_if<std::is_convertible<_Up, _Tp>::value, bool>::type = X; T = QObject]’
621 | inline QWeakPointer(const QWeakPointer &o) : d(nullptr), value(nullptr)
| ^’ and ‘VideoSocket’
62 | inline QPointer(T p) : wp(p, true) { }
| ^::QWeakPointer(const QSharedPointer&) [with T = QObject]’
612 | inline QWeakPointer(const QSharedPointer &o) : d(o.d), value(o.data())
| ^::QWeakPointer(QWeakPointer&&) [with T = QObject]’
591 | QWeakPointer(QWeakPointer &&other) noexcept
| ^::QWeakPointer(const QWeakPointer&) [with T = QObject]’
589 | QWeakPointer(const QWeakPointer &other) noexcept : d(other.d), value(other.value)
| ^::QWeakPointer() [with T = QObject]’
571 | inline QWeakPointer() noexcept : d(nullptr), value(nullptr) { }
| ^
-- [QtScrcpy] QSC_CPU_ARCH:x64 -- [QtScrcpyCore] QSC_DEPLOY_PATH: /home/diealotto/QtScrcpy/QtScrcpy/../output/x64/Release/$<0:> -- Configuring done (0.9s) -- Generating done (0.0s) -- Build files have been written to: /home/diealotto/QtScrcpy [ 2%] Automatic MOC and UIC for target QtScrcpyCore [ 2%] Built target QtScrcpyCore_autogen [ 4%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/device.cpp.o [ 6%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/inputconvert/inputconvertnormal.cpp.o [ 9%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/QtScrcpyCore_autogen/mocs_compilation.cpp.o [ 13%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/controller.cpp.o [ 13%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/adb/adbprocess.cpp.o [ 15%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/bufferutil.cpp.o [ 18%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/inputconvert/inputconvertbase.cpp.o [ 20%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/adb/adbprocessimpl.cpp.o [ 22%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/inputconvert/inputconvertgame.cpp.o [ 25%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/inputconvert/controlmsg.cpp.o [ 27%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/inputconvert/keymap/keymap.cpp.o [ 29%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/receiver/devicemsg.cpp.o [ 31%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/receiver/receiver.cpp.o [ 34%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/decoder/avframeconvert.cpp.o [ 36%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/decoder/decoder.cpp.o [ 38%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/decoder/fpscounter.cpp.o [ 40%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/decoder/videobuffer.cpp.o [ 43%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/filehandler/filehandler.cpp.o [ 45%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/recorder/recorder.cpp.o [ 47%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/server/server.cpp.o [ 50%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/server/tcpserver.cpp.o [ 52%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/server/videosocket.cpp.o [ 54%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/demuxer/demuxer.cpp.o [ 56%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/devicemanage/devicemanage.cpp.o /home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/server/server.cpp: In member function ‘bool Server::execute()’: /home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/server/server.cpp:173:12: error: comparison of integer expressions of different signedness: ‘int’ and ‘quint32’ {aka ‘unsigned int’} [-Werror=sign-compare] 173 | if (-1 != m_params.scid) { |
~^~~~~~ /home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/server/server.cpp: In member function ‘bool Server::readInfo(VideoSocket, QString&, QSize&)’: /home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/server/server.cpp:322:58: error: unused parameter ‘deviceName’ [-Werror=unused-parameter] 322 | bool Server::readInfo(VideoSocket videoSocket, QString &deviceName, QSize &size) |~~~^~~~ /home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/server/server.cpp:322:77: error: unused parameter ‘size’ [-Werror=unused-parameter] 322 | bool Server::readInfo(VideoSocket videoSocket, QString &deviceName, QSize &size) |~^~ In file included from /usr/include/qt5/QtCore/QPointer:1, from /home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/devicemanage/../../include/QtScrcpyCore.h:2, from /home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/devicemanage/devicemanage.h:6, from /home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/devicemanage/devicemanage.cpp:6: /usr/include/qt5/QtCore/qpointer.h: In instantiation of ‘QPointer~~In file included from /usr/include/qt5/QtCore/qsharedpointer.h:48, from /usr/include/qt5/QtCore/qdebug.h:54, from /usr/include/qt5/QtCore/QDebug:1, from /home/diealotto/QtScrcpy/QtScrcpy/QtScrcpyCore/src/devicemanage/devicemanage.cpp:1: /usr/include/qt5/QtCore/qsharedpointer_impl.h:685:12: note: candidate: ‘template<class X, typename std::enable_if<std::is_convertible<_Up, QObject>::value, bool>::type~~~ /usr/include/qt5/QtCore/qsharedpointer_impl.h:685:12: note: template argument deduction/substitution failed: /usr/include/qt5/QtCore/qsharedpointer_impl.h:684:42: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’ 684 | template <class X, IfCompatible~~~ /usr/include/qt5/QtCore/qsharedpointer_impl.h:642:12: note: template argument deduction/substitution failed: /usr/include/qt5/QtCore/qpointer.h:62:29: note: mismatched types ‘const QSharedPointer~~/usr/include/qt5/QtCore/qsharedpointer_impl.h:621:12: note: candidate: ‘template<class X, typename std::enable_if<std::is_convertible<_Up, QObject>::value, bool>::type~~~ /usr/include/qt5/QtCore/qsharedpointer_impl.h:621:12: note: template argument deduction/substitution failed: /usr/include/qt5/QtCore/qpointer.h:62:29: note: mismatched types ‘const QWeakPointer~~/usr/include/qt5/QtCore/qsharedpointer_impl.h:612:12: note: candidate: ‘QWeakPointer~~~ /usr/include/qt5/QtCore/qsharedpointer_impl.h:612:12: note: candidate expects 1 argument, 2 provided /usr/include/qt5/QtCore/qsharedpointer_impl.h:591:5: note: candidate: ‘QWeakPointer~~~ /usr/include/qt5/QtCore/qsharedpointer_impl.h:591:5: note: candidate expects 1 argument, 2 provided /usr/include/qt5/QtCore/qsharedpointer_impl.h:589:5: note: candidate: ‘QWeakPointer~~~ /usr/include/qt5/QtCore/qsharedpointer_impl.h:589:5: note: candidate expects 1 argument, 2 provided /usr/include/qt5/QtCore/qsharedpointer_impl.h:571:12: note: candidate: ‘QWeakPointer~~~ /usr/include/qt5/QtCore/qsharedpointer_impl.h:571:12: note: candidate expects 0 arguments, 2 provided cc1plus: note: unrecognized command-line option ‘-Wno-nested-anon-types’ may have been intended to silence earlier diagnostics gmake[2]: [QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/build.make:398: QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/devicemanage/devicemanage.cpp.o] Error 1 gmake[2]: Waiting for unfinished jobs.... At global scope: cc1plus: note: unrecognized command-line option ‘-Wno-nested-anon-types’ may have been intended to silence earlier diagnostics cc1plus: all warnings being treated as errors gmake[2]: [QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/build.make:342: QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/server/server.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:170: QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 error: CMake build failed, exiting......any advice on how to solve this?