qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.37k stars 3.99k forks source link

Preliminary Qt 6.6 testing results #19184

Closed xavier2k6 closed 8 months ago

xavier2k6 commented 1 year ago

qBittorrent & operating system versions

qBittorrent: 4.6.0beta1 latest master f6b58f36 (at time of writing) Operating system: GHA CI runners - (Windows: 2022/Ubuntu: 22.04/macOS: 12.6.5) Qt: 6.6.0Beta1 libtorrent-rasterbar: 2.0.9/1.2.19

What is the problem?

Windows

https://github.com/xavier2k6/qBittorrent/actions/runs/5294892886

"Qt 6.6 beta 1" doesn't seem to like the changes made in PR#17723 (Windows)

FAILED: src/gui/CMakeFiles/qbt_gui.dir/utils.cpp.obj 
C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe  /nologo /TP -DBOOST_ALL_NO_LIB -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_NO_DEPRECATED -DNOMINMAX -DNTDDI_VERSION=0x06010000 -DOPENSSL_NO_SSL2 -DQBT_USES_LIBTORRENT2 -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x050f02 -DQT_DISABLE_DEPRECATED_UP_TO=0x040800 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_SQL_LIB -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DQT_WIDGETS_LIB -DQT_XML_LIB -DTORRENT_NO_DEPRECATE -DTORRENT_SSL_PEERS -DTORRENT_USE_LIBCRYPTO -DTORRENT_USE_OPENSSL -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWIN64 -D_CRT_SECURE_NO_DEPRECATE -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_SCL_SECURE_NO_DEPRECATE -D_UNICODE -D_WIN32_IE=0x0601 -D_WIN32_WINNT=0x0601 -D_WIN64 -ID:\a\qBittorrent\qBittorrent\build\src\gui\qbt_gui_autogen\include -ID:\a\qBittorrent\qBittorrent\src -ID:\a\qBittorrent\qBittorrent\build\src\gui -external:ID:\a\qBittorrent\qBittorrent\libtorrent\include -external:IC:\vcpkg\installed\x64-windows-static-release\include -external:ID:\a\qBittorrent\boost -external:ID:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtCore -external:ID:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include -external:ID:\a\qBittorrent\Qt\6.6.0\msvc2019_64\mkspecs\win32-msvc -external:ID:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtNetwork -external:ID:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtSql -external:ID:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtXml -external:ID:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtGui -external:ID:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtWidgets -external:W0 /WX /Zi /O2 /Ob1 /DNDEBUG -std:c++17 -MT /EHsc -Zc:__cplusplus -permissive- -utf-8 /guard:cf /utf-8 /Zc:__cplusplus /showIncludes /Fosrc\gui\CMakeFiles\qbt_gui.dir\utils.cpp.obj /Fdsrc\gui\CMakeFiles\qbt_gui.dir\qbt_gui.pdb /FS -c D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(134): error C2039: 'CoInitializeEx': is not a member of '`global namespace''
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(134): error C2065: 'COINIT_APARTMENTTHREADED': undeclared identifier
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(134): error C2065: 'COINIT_DISABLE_OLE1DDE': undeclared identifier
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(142): error C3861: 'CoInitializeEx': identifier not found
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(134): error C3861: 'SUCCEEDED': identifier not found
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(138): error C2039: 'ShellExecuteW': is not a member of '`global namespace''
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(138): error C2065: 'SW_SHOWNORMAL': undeclared identifier
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(142): error C3861: 'ShellExecuteW': identifier not found
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(140): error C2039: 'CoUninitialize': is not a member of '`global namespace''
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(142): error C3861: 'CoUninitialize': identifier not found
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(167): error C2760: syntax error: 'pidl' was unexpected here; expected ';'
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(176): error C2059: syntax error: ')'
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): error C[353](https://github.com/xavier2k6/qBittorrent/actions/runs/5294892886/jobs/9584700791#step:10:354)6: 'thread': cannot be used before it is initialized
Error: D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): error C2665: 'QObject::connect': no overloaded function could convert all the argument types
D:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtCore/qobject.h([366](https://github.com/xavier2k6/qBittorrent/actions/runs/5294892886/jobs/9584700791#step:10:367)): note: could be 'QMetaObject::Connection QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType) const'
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: 'QMetaObject::Connection QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType) const': cannot convert argument 1 from 'int' to 'const QObject *'
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or parenthesized function-style cast
D:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtCore/qobject.h(180): note: or       'QMetaObject::Connection QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType)'
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: 'QMetaObject::Connection QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType)': cannot convert argument 1 from 'int' to 'const QObject *'
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or parenthesized function-style cast
D:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtCore/qobject.h(177): note: or       'QMetaObject::Connection QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType)'
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: 'QMetaObject::Connection QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType)': cannot convert argument 1 from 'int' to 'const QObject *'
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or parenthesized function-style cast
D:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtCore/qobject.h(198): note: or       'QMetaObject::Connection QObject::connect<void(__cdecl QThread::* )(QThread::QPrivateSignal),void(__cdecl QObject::* )(void)>(const QThread *,Func1,const QObject *,Func2 &&,Qt::ConnectionType)'
        with
        [
            Func1=void (__cdecl QThread::* )(QThread::QPrivateSignal),
            Func2=void (__cdecl QObject::* )(void)
        ]
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: 'QMetaObject::Connection QObject::connect<void(__cdecl QThread::* )(QThread::QPrivateSignal),void(__cdecl QObject::* )(void)>(const QThread *,Func1,const QObject *,Func2 &&,Qt::ConnectionType)': cannot convert argument 1 from 'int' to 'const QThread *'
        with
        [
            Func1=void (__cdecl QThread::* )(QThread::QPrivateSignal),
            Func2=void (__cdecl QObject::* )(void)
        ]
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or parenthesized function-style cast
D:\a\qBittorrent\Qt\6.6.0\msvc2019_64\include\QtCore/qobject.h(240): note: or       'QMetaObject::Connection QObject::connect(const QtPrivate::FunctionPointer<Func>::Object *,Func1,Func2 &&)'
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: 'QMetaObject::Connection QObject::connect(const QtPrivate::FunctionPointer<Func>::Object *,Func1,Func2 &&)': expects 3 arguments - 4 provided
D:\a\qBittorrent\qBittorrent\src\gui\utils.cpp(177): note: while trying to match the argument list '(int, void (__cdecl QThread::* )(QThread::QPrivateSignal), int, void (__cdecl QObject::* )(void))'

macOS

https://github.com/xavier2k6/qBittorrent/actions/runs/5294892888

Alot of possible upcoming deprecations......

'operator""_qs' has been explicitly marked deprecated here QT_DEPRECATED_VERSION_X_6_8("Use _s from Qt::StringLiterals namespace instead.")


Linux

https://github.com/xavier2k6/qBittorrent/actions/runs/5294892889

Not able to build currently.

Steps to reproduce

Use Qt6.6Beta1 to compile qBittorrent.

I used GHA CI for testing... https://github.com/xavier2k6/qBittorrent/actions?query=branch%3AQt6.6_test

Additional context

https://github.com/xavier2k6/qBittorrent/actions?query=branch%3AQt6.6_test

Log(s) & preferences file(s)

https://github.com/xavier2k6/qBittorrent/actions?query=branch%3AQt6.6_test

xavier2k6 commented 1 year ago

@Chocobo1 @glassez

Preliminary testing of Qt 6.6 findings....

https://wiki.qt.io/Qt_6.6_Release#Qt_6.6_release_plan

These issues could be due to Qt 6.6 API Change.... https://bugreports.qt.io/browse/QTBUG-114214 as noted in https://lists.qt-project.org/pipermail/releasing/2023-June/002986.html

Chocobo1 commented 1 year ago

"Qt 6.6 beta 1" doesn't seem to like the changes made in https://github.com/qbittorrent/qBittorrent/pull/17723 (Windows)

It seems gui/utils.cpp is missing some headers. Please try this:

#include "utils.h"

#include <QtGlobal>  // add this line

#ifdef Q_OS_WIN
#include <Objbase.h>
#include <Shlobj.h>
#include <Shellapi.h>
#endif

'operator""_qs' has been explicitly marked deprecated here

IMO we should migrate to the latest literal definition. Qt 6.4 introduced QString operator""_s() and the previous ""_qs is deprecated. IMO it should be possible to modify the current (function) helper to ensure compatibility with all Qt versions.

BTW I'm not sure why Qt renamed the literal operator and it doesn't seem like a productive move...

xavier2k6 commented 1 year ago

Adding #include <QtGlobal> did the trick...

(Windows Builds completed) https://github.com/xavier2k6/qBittorrent/actions/runs/5299493407

Screenshot 2023-06-17 202804

migrate to the latest literal definition. Qt 6.4 introduced QString operator""_s() and the previous ""_qs is deprecated.

https://doc.qt.io/qt-6/qstring-obsolete.html -> (6.8)

IMO it should be possible to modify the current (function) helper to ensure compatibility with all Qt versions.

Above my pay grade.....lol

BTW I'm not sure why Qt renamed the literal operator and it doesn't seem like a productive move...

It does seem strange that they would rename/introduce it & then deprecate it again later.... for some other form...


Just noticed.......(macOS)

warning: 'location' is deprecated: Use path() [-Wdeprecated-declarations]
2023-06-17T18:46:02.7436330Z         m_qtTranslator.load((u"qt_" + localeStr), QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
warning: 'String' is deprecated: Use QMetaType::Type instead. [-Wdeprecated-declarations]
2023-06-17T18:36:22.1850420Z                     ? QVariant(QVariant::String) : m_resumeData.tags.join(u","_qs)));
warning: 'QVariant' is deprecated: Use the constructor taking a QMetaType instead. [-Wdeprecated-declarations]
2023-06-17T18:36:22.3401090Z                     ? QVariant(QVariant::String) : m_resumeData.tags.join(u","_qs)));
2023-06-17T18:36:22.3507460Z                       ^
2023-06-17T18:36:22.3610990Z /Users/runner/work/qBittorrent/Qt/6.6.0/macos/lib/QtCore.framework/Headers/qvariant.h:423:5: note: 'QVariant' has been explicitly marked deprecated here
2023-06-17T18:36:22.3712770Z     QT_DEPRECATED_VERSION_X_6_0("Use the constructor taking a QMetaType instead.")
xavier2k6 commented 1 year ago

Might be no harm to go through https://doc.qt.io/qt-6/obsoleteclasses.html

userdocs commented 1 year ago

Not sure why you had issues building on Linux with GUI=OFF but seems maybe an issue in the Qt build itself?

https://github.com/xavier2k6/qBittorrent/actions/runs/5299493406/jobs/9592487697

I tested it the other day with no build issues.

https://github.com/userdocs/qbittorrent-nox-static-test/actions/runs/5278349016

image

https://github.com/userdocs/qbittorrent-nox-static-test/releases/download/release-4.5.3_v2.0.9/x86_64-qbittorrent-nox

xavier2k6 commented 8 months ago

No longer relevant