Skip to content

Deprecated warnings found in CI - macOS logs. #15630

Open
@xavier2k6

Description

@xavier2k6

qBittorrent & operating system versions

qBittorrent: master branch
Operating system: macOS
Qt: 5.15.2/6.2.0
libtorrent-rasterbar: 1.2.14/2.0.4

What is the problem?

While looking through the CI - macOS logs in master, I came across these "deprecated" warnings:

#if defined(Q_OS_MACOS)
struct statfs64 buf {};
if (statfs64(file.toLocal8Bit().constData(), &buf) != 0)
return false;
#else
struct statfs buf {};
if (statfs(file.toLocal8Bit().constData(), &buf) != 0)
return false;
#endif

/src/base/utils/fs.cpp:352:9: warning: 'statfs64' is deprecated: first deprecated in macOS 10.6 [-Wdeprecated-declarations]
    if (statfs64(file.toLocal8Bit().constData(), &buf) != 0)

const CFStringRef defaultHandlerId = LSCopyDefaultHandlerForURLScheme(magnetUrlScheme);

/src/base/preferences.cpp:1127:42: warning: 'LSCopyDefaultHandlerForURLScheme' is deprecated: first deprecated in macOS 10.15 - Use LSCopyDefaultApplicationURLForURL() instead. [-Wdeprecated-declarations]
    const CFStringRef defaultHandlerId = LSCopyDefaultHandlerForURLScheme(magnetUrlScheme);

(GUI=OFF)

if (daemon(1, 0) == 0)

/src/app/main.cpp:283:17: warning: 'daemon' is deprecated: first deprecated in macOS 10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations]
            if (daemon(1, 0) == 0)

Steps to reproduce

No response

Additional context

Take a look at the latest CI - macOS run/logs section of Build qBittorrent (Qt5) / Build qBittorrent (Qt6)

https://github.com/qbittorrent/qBittorrent/actions/runs/1378766147

Log(s) & preferences file(s)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Code cleanupClean up the code while preserving the same outcomeOS: macOSIssues specific to macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions