QtScrcpy icon indicating copy to clipboard operation
QtScrcpy copied to clipboard

Build failed on Qt5 and in Qt6 with Qt6::CorePrivate enabled for X11Extras

Open blacklightpy opened this issue 1 year ago • 2 comments

System Information

OS: Void Linux x86_64 C Library: musl libc Compiler: gcc

I have Qt6, but in Qt6 X11Extras are in private headers, and is not enabled in the build configuration, so I did not try it.

jyothish@void ~/r/QtScrcpy (dev)> ./ci/linux/build_for_linux.sh "Release"
---------------------------------------------------------------
Check & Set Environment Variables
---------------------------------------------------------------
Current ENV_QT_PATH:
Current directory: /home/jyothish/repos/QtScrcpy
./ci/linux/build_for_linux.sh: 17: cd: can't cd to ./ci/linux/.../


---------------------------------------------------------------
Check Build Parameters
---------------------------------------------------------------
Possible build modes: Debug/Release/MinSizeRel/RelWithDebInfo
./ci/linux/build_for_linux.sh: 27: [[: not found
Current build mode: Release


---------------------------------------------------------------
CMake Build Begins
---------------------------------------------------------------
-- [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
-- [QtScrcpy] QSC_CPU_ARCH:x64
-- [QtScrcpyCore] QSC_DEPLOY_PATH: /home/jyothish/repos/QtScrcpy/QtScrcpy/../output/x64/Release/$<0:>
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/jyothish/repos/QtScrcpy
[  2%] Automatic MOC and UIC for target QtScrcpyCore
[  2%] Built target QtScrcpyCore_autogen
[  4%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/adb/adbprocessimpl.cpp.o
[  6%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/adb/adbprocess.cpp.o
[  9%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/device.cpp.o
[ 11%] 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
[ 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/device/controller/inputconvert/inputconvertnormal.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
In file included from /usr/include/qt5/QtCore/QPointer:1,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/devicemanage/../../include/QtScrcpyCore.h:2,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/devicemanage/devicemanage.h:6,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/devicemanage/devicemanage.cpp:6:
/usr/include/qt5/QtCore/qpointer.h: In instantiation of 'QPointer<T>::QPointer(T*) [with T = VideoSocket]':
/home/jyothish/repos/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<QObject>::QWeakPointer(VideoSocket*&, bool)'
   62 |     inline QPointer(T *p) : wp(p, true) { }
      |                             ^~~~~~~~~~~
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/jyothish/repos/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 <anonymous> > QWeakPointer<T>::QWeakPointer(X*, bool) [with typename std::enable_if<std::is_convertible<_Up*, _Tp*>::value, bool>::type <anonymous> = X; T = QObject]'
  685 |     inline QWeakPointer(X *ptr, bool) : d(ptr ? Data::getAndRef(ptr) : nullptr), value(ptr)
      |            ^~~~~~~~~~~~
/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<X> = 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 <anonymous> > QWeakPointer<T>::QWeakPointer(const QSharedPointer<X>&) [with typename std::enable_if<std::is_convertible<_Up*, _Tp*>::value, bool>::type <anonymous> = X; T = QObject]'
  642 |     inline QWeakPointer(const QSharedPointer<X> &o) : d(nullptr), value(nullptr)
      |            ^~~~~~~~~~~~
/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<T>' and 'VideoSocket*'
   62 |     inline QPointer(T *p) : wp(p, true) { }
      |                             ^~~~~~~~~~~
/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 <anonymous> > QWeakPointer<T>::QWeakPointer(const QWeakPointer<X>&) [with typename std::enable_if<std::is_convertible<_Up*, _Tp*>::value, bool>::type <anonymous> = X; T = QObject]'
  621 |     inline QWeakPointer(const QWeakPointer<X> &o) : d(nullptr), value(nullptr)
      |            ^~~~~~~~~~~~
/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<T>' and 'VideoSocket*'
   62 |     inline QPointer(T *p) : wp(p, true) { }
      |                             ^~~~~~~~~~~
/usr/include/qt5/QtCore/qsharedpointer_impl.h:612:12: note: candidate: 'QWeakPointer<T>::QWeakPointer(const QSharedPointer<T>&) [with T = QObject]'
  612 |     inline QWeakPointer(const QSharedPointer<T> &o) : d(o.d), value(o.data())
      |            ^~~~~~~~~~~~
/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<T>::QWeakPointer(QWeakPointer<T>&&) [with T = QObject]'
  591 |     QWeakPointer(QWeakPointer &&other) noexcept
      |     ^~~~~~~~~~~~
/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<T>::QWeakPointer(const QWeakPointer<T>&) [with T = QObject]'
  589 |     QWeakPointer(const QWeakPointer &other) noexcept : d(other.d), value(other.value)
      |     ^~~~~~~~~~~~
/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<T>::QWeakPointer() [with T = QObject]'
  571 |     inline QWeakPointer() noexcept : d(nullptr), value(nullptr) { }
      |            ^~~~~~~~~~~~
/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
make[2]: *** [QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/build.make:398: QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/devicemanage/devicemanage.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:170: QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
error: CMake build failed, exiting......

blacklightpy avatar Dec 20 '23 19:12 blacklightpy

I tried replacing all references of X11Extras with CorePrivate and removed Qt5 from the QT versions in find_packages() to make it use Qt6.

It still failed:

jyothish@void ~/r/QtScrcpy (dev)> ./ci/linux/build_for_linux.sh "Release"
---------------------------------------------------------------
Check & Set Environment Variables
---------------------------------------------------------------
Current ENV_QT_PATH:
Current directory: /home/jyothish/repos/QtScrcpy
./ci/linux/build_for_linux.sh: 17: cd: can't cd to ./ci/linux/.../


---------------------------------------------------------------
Check Build Parameters
---------------------------------------------------------------
Possible build modes: Debug/Release/MinSizeRel/RelWithDebInfo
./ci/linux/build_for_linux.sh: 27: [[: not found
Current build mode: Release


---------------------------------------------------------------
CMake Build Begins
---------------------------------------------------------------
-- [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: 6.6
-- multi config:QC_IS_MUTIL_CONFIG
-- [QtScrcpy] QSC_CPU_ARCH:x64
-- [QtScrcpyCore] QSC_DEPLOY_PATH: /home/jyothish/repos/QtScrcpy/QtScrcpy/../output/x64/Release/$<0:>
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /home/jyothish/repos/QtScrcpy
[  2%] Automatic MOC and UIC for target QtScrcpyCore
[  2%] Built target QtScrcpyCore_autogen
[  6%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/QtScrcpyCore_autogen/mocs_compilation.cpp.o
[  9%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/adb/adbprocess.cpp.o
[  9%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/adb/adbprocessimpl.cpp.o
[ 11%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/device.cpp.o
[ 13%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/controller.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/device/controller/inputconvert/inputconvertnormal.cpp.o
[ 22%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/inputconvert/inputconvertgame.cpp.o
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertnormal.cpp: In member function 'virtual void InputConvertNormal::mouseEvent(const QMouseEvent*, const QSize&, const QSize&)':
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertnormal.cpp:38:33: error: 'QPointF QMouseEvent::localPos() const' is deprecated: Use position() [-Werror=deprecated-declarations]
   38 |     QPointF pos = from->localPos();
      |                   ~~~~~~~~~~~~~~^~
In file included from /usr/include/qt6/QtGui/QKeyEvent:1,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertbase.h:4,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertnormal.h:4,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertnormal.cpp:4:
/usr/include/qt6/QtGui/qevent.h:234:13: note: declared here
  234 |     QPointF localPos() const { return position(); }
      |             ^~~~~~~~
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp: In static member function 'static const QString& AdbProcessImpl::getAdbPath()':
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp:32:20: error: no match for 'operator=' (operand types are 'QFileInfo' and 'QString')
   32 |         fileInfo = s_adbPath;
      |                    ^~~~~~~~~
In file included from /usr/include/qt6/QtCore/qdir.h:9,
                 from /usr/include/qt6/QtCore/QDir:1,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp:3:
/usr/include/qt6/QtCore/qfileinfo.h:55:16: note: candidate: 'QFileInfo& QFileInfo::operator=(const QFileInfo&)'
   55 |     QFileInfo &operator=(const QFileInfo &fileinfo);
      |                ^~~~~~~~
/usr/include/qt6/QtCore/qfileinfo.h:55:43: note:   no known conversion for argument 1 from 'QString' to 'const QFileInfo&'
   55 |     QFileInfo &operator=(const QFileInfo &fileinfo);
      |                          ~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/qt6/QtCore/qglobal.h:43,
                 from /usr/include/qt6/QtCore/qcoreapplication.h:7,
                 from /usr/include/qt6/QtCore/QCoreApplication:1,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp:1:
/usr/include/qt6/QtCore/qfileinfo.h:56:5: note: candidate: 'QFileInfo& QFileInfo::operator=(QFileInfo&&)'
   56 |     QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QFileInfo)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qfileinfo.h:56:5: note:   no known conversion for argument 1 from 'QString' to 'QFileInfo&&'
   56 |     QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QFileInfo)
      |     ^
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp: In member function 'QStringList AdbProcessImpl::getDevicesSerialFromStdOut()':
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp:120:58: error: 'QRegExp' was not declared in this scope
  120 |     QStringList devicesInfoList = m_standardOutput.split(QRegExp("\r\n|\n"), Qt::SkipEmptyParts);
      |                                                          ^~~~~~~
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp: In member function 'QString AdbProcessImpl::getDeviceIPFromStdOut()':
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp:149:5: error: 'QRegExp' was not declared in this scope
  149 |     QRegExp ipRegExp(strIPExp, Qt::CaseInsensitive);
      |     ^~~~~~~
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp:150:9: error: 'ipRegExp' was not declared in this scope
  150 |     if (ipRegExp.indexIn(m_standardOutput) != -1) {
      |         ^~~~~~~~
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp: In member function 'QString AdbProcessImpl::getDeviceIPByIpFromStdOut()':
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp:164:5: error: 'QRegExp' was not declared in this scope
  164 |     QRegExp ipRegExp(strIPExp, Qt::CaseInsensitive);
      |     ^~~~~~~
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/adb/adbprocessimpl.cpp:165:9: error: 'ipRegExp' was not declared in this scope
  165 |     if (ipRegExp.indexIn(m_standardOutput) != -1) {
      |         ^~~~~~~~
[ 25%] Building CXX object QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/inputconvert/controlmsg.cpp.o
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
make[2]: *** [QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/build.make:174: QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/inputconvert/inputconvertnormal.cpp.o] Error 1
make[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
make[2]: *** [QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/build.make:90: QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/adb/adbprocessimpl.cpp.o] Error 1
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertgame.cpp: In member function 'bool InputConvertGame::processMouseMove(const QMouseEvent*)':
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertgame.cpp:557:44: error: 'QPointF QMouseEvent::localPos() const' is deprecated: Use position() [-Werror=deprecated-declarations]
  557 |         QPointF distance_raw{from->localPos() - m_ctrlMouseMove.lastPos};
      |                              ~~~~~~~~~~~~~~^~
In file included from /usr/include/qt6/QtGui/QKeyEvent:1,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertbase.h:4,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertnormal.h:4,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertgame.h:7,
                 from /home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertgame.cpp:8:
/usr/include/qt6/QtGui/qevent.h:234:13: note: declared here
  234 |     QPointF localPos() const { return position(); }
      |             ^~~~~~~~
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertgame.cpp:585:45: error: 'QPointF QMouseEvent::localPos() const' is deprecated: Use position() [-Werror=deprecated-declarations]
  585 |     m_ctrlMouseMove.lastPos = from->localPos();
      |                               ~~~~~~~~~~~~~~^~
/usr/include/qt6/QtGui/qevent.h:234:13: note: declared here
  234 |     QPointF localPos() const { return position(); }
      |             ^~~~~~~~
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertgame.cpp: In member function 'void InputConvertGame::moveCursorTo(const QMouseEvent*, const QPoint&)':
/home/jyothish/repos/QtScrcpy/QtScrcpy/QtScrcpyCore/src/device/controller/inputconvert/inputconvertgame.cpp:617:39: error: 'QPoint QMouseEvent::globalPos() const' is deprecated: Use globalPosition() [-Werror=deprecated-declarations]
  617 |     QPoint globalPos = from->globalPos();
      |                        ~~~~~~~~~~~~~~~^~
/usr/include/qt6/QtGui/qevent.h:223:19: note: declared here
  223 |     inline QPoint globalPos() const { return globalPosition().toPoint(); }
      |                   ^~~~~~~~~
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
make[2]: *** [QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/build.make:188: QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/src/device/controller/inputconvert/inputconvertgame.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:170: QtScrcpy/QtScrcpyCore/CMakeFiles/QtScrcpyCore.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
error: CMake build failed, exiting......

blacklightpy avatar Dec 20 '23 20:12 blacklightpy

一样的问题简直浪费时间

itimetime avatar Mar 06 '24 03:03 itimetime