Deprecated warnings found in CI - macOS logs. #12515

Open
opened 2026-02-21 22:49:52 -05:00 by deekerman · 24 comments
Owner

Originally created by @xavier2k6 on GitHub (Oct 25, 2021).

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:

github.com/qbittorrent/qBittorrent@559a979536/src/base/utils/fs.cpp (L350-L358)

/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)

github.com/qbittorrent/qBittorrent@559a979536/src/base/preferences.cpp (L1127)

/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)

github.com/qbittorrent/qBittorrent@559a979536/src/app/main.cpp (L283)

/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

Originally created by @xavier2k6 on GitHub (Oct 25, 2021). ### 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: https://github.com/qbittorrent/qBittorrent/blob/559a979536713dbe3a5b474e2f62aaee58917c83/src/base/utils/fs.cpp#L350-L358 ``` /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) ``` ____ https://github.com/qbittorrent/qBittorrent/blob/559a979536713dbe3a5b474e2f62aaee58917c83/src/base/preferences.cpp#L1127 ``` /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) https://github.com/qbittorrent/qBittorrent/blob/559a979536713dbe3a5b474e2f62aaee58917c83/src/app/main.cpp#L283 ``` /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_
Author
Owner

@xavier2k6 commented on GitHub (Oct 25, 2021):

I ignored the other warnings as I know they're being deprecated, we're moving over to Qt6.

@xavier2k6 commented on GitHub (Oct 25, 2021): I ignored the other warnings as I know they're being deprecated, we're moving over to `Qt6`.
Author
Owner

@xavier2k6 commented on GitHub (Nov 4, 2021):

@Chocobo1 statfs64 deprecation was taken care of by PR https://github.com/qbittorrent/qBittorrent/pull/15661, Could you look into the LSCopyDefaultHandlerForURLScheme & daemon deprecation warnings too please.

@xavier2k6 commented on GitHub (Nov 4, 2021): @Chocobo1 `statfs64` deprecation was taken care of by PR https://github.com/qbittorrent/qBittorrent/pull/15661, Could you look into the `LSCopyDefaultHandlerForURLScheme` & `daemon` deprecation warnings too please.
Author
Owner

@Chocobo1 commented on GitHub (Nov 5, 2021):

Could you look into the LSCopyDefaultHandlerForURLScheme & daemon deprecation warnings too please.

Sorry, I don't have access to a mac and therefore can't test (nor code) this case.

@Chocobo1 commented on GitHub (Nov 5, 2021): >Could you look into the LSCopyDefaultHandlerForURLScheme & daemon deprecation warnings too please. Sorry, I don't have access to a mac and therefore can't test (nor code) this case.
Author
Owner

@xavier2k6 commented on GitHub (Nov 9, 2021):

@Kolcha Can you help with the LSCopyDefaultHandlerForURLScheme & daemon deprecation warnings?

@xavier2k6 commented on GitHub (Nov 9, 2021): @Kolcha Can you help with the `LSCopyDefaultHandlerForURLScheme` & `daemon` deprecation warnings?
Author
Owner

@Kolcha commented on GitHub (Nov 10, 2021):

sorry, I'm not macOS developer at all, and don't know how safely replace these deprecated stuff. I'll look into it this weekend, but can't promise anything

@Kolcha commented on GitHub (Nov 10, 2021): sorry, I'm not macOS developer at all, and don't know how safely replace these deprecated stuff. I'll look into it this weekend, but can't promise anything
Author
Owner

@Kolcha commented on GitHub (Nov 19, 2021):

@xavier2k6 , sorry, I can't fix remaining warnings, at least for now. maybe I'll return later. but again, I don't have Apple devices anymore, except MacBook Pro from office.

@Kolcha commented on GitHub (Nov 19, 2021): @xavier2k6 , sorry, I can't fix remaining warnings, at least for now. maybe I'll return later. but again, I don't have Apple devices anymore, except MacBook Pro from office.
Author
Owner

@xavier2k6 commented on GitHub (Nov 22, 2021):

@sledgehammer999 something to be looked at prior to 4.4.0 release.

@xavier2k6 commented on GitHub (Nov 22, 2021): @sledgehammer999 something to be looked at prior to 4.4.0 release.
Author
Owner

@xavier2k6 commented on GitHub (Dec 11, 2021):

There are now more deprecations that need to be handled.

@xavier2k6 commented on GitHub (Dec 11, 2021): There are now more deprecations that need to be handled.
Author
Owner

@xavier2k6 commented on GitHub (Jan 3, 2022):

@sledgehammer999 It's probably too late to address these now with v4.4 about to be GA, should I add it to 4.4.1 milestone?

@xavier2k6 commented on GitHub (Jan 3, 2022): @sledgehammer999 It's probably too late to address these now with v4.4 about to be GA, should I add it to 4.4.1 milestone?
Author
Owner

@xavier2k6 commented on GitHub (Mar 17, 2022):

@sledgehammer999 Going to add this to 4.4.2 milestone to keep track of/reminder.

@xavier2k6 commented on GitHub (Mar 17, 2022): @sledgehammer999 Going to add this to `4.4.2 milestone` to keep track of/reminder.
Author
Owner

@xavier2k6 commented on GitHub (Apr 11, 2022):

Deprecations as of macos-12 (monterey)

https://github.com/xavier2k6/qBittorrent/actions/workflows/ci_macos.yaml?query=branch%3ACI_macOS-12_test

@xavier2k6 commented on GitHub (Apr 11, 2022): Deprecations as of macos-12 (monterey) https://github.com/xavier2k6/qBittorrent/actions/workflows/ci_macos.yaml?query=branch%3ACI_macOS-12_test
Author
Owner

@xavier2k6 commented on GitHub (Feb 8, 2023):

Our CI - macOS is now currently running under 12.6.3 - so deprecations etc. can be seen there now.

@sledgehammer999 @thalieht @glassez

The macOS version is not well supported, because we don't have active macOS developers/contributors.
The project is in need of macOS developers. If you are a macOS developer willing to help, just go to our bug tracker for a list of macOS related issues. Or try to fix bugs that you yourself have discovered and annoy you.

This is what's currently displayed on the main website for macOS & I'd like to suggest two things for consideration.

  1. Add macOS Issues Tracker link
  2. Ping users who've previously contributed via PR's
@xavier2k6 commented on GitHub (Feb 8, 2023): Our CI - macOS is now currently running under `12.6.3` - so deprecations etc. can be seen there now. @sledgehammer999 @thalieht @glassez >**The macOS version is not well supported**, because we don't have active macOS developers/contributors. The project is in need of macOS developers. If you are a macOS developer willing to help, just go to our bug tracker for a list of macOS related issues. Or try to fix bugs that you yourself have discovered and annoy you. This is what's currently displayed on the main website for `macOS` & I'd like to suggest two things for consideration. 1. Add [macOS Issues Tracker link](https://github.com/qbittorrent/qBittorrent/issues?q=is%3Aissue+is%3Aopen+label%3A%22OS%3A+macOS%22+-label%3A%22OS%3A+Linux%22+-label%3A%22OS%3A+Windows%22+-label%3A%22Feature+request%22) 2. Ping users who've [previously contributed via PR's](https://github.com/qbittorrent/qBittorrent/pulls?q=is%3Apr+is%3Amerged+label%3A%22OS%3A+macOS%22+-label%3A%22OS%3A+Linux%22+-label%3A%22OS%3A+Windows%22+)
Author
Owner

@glassez commented on GitHub (Feb 10, 2023):

I believe we should completely stop publishing macOS builds so as not to annoy users.

@glassez commented on GitHub (Feb 10, 2023): I believe we should completely stop publishing macOS builds so as not to annoy users.
Author
Owner

@xavier2k6 commented on GitHub (Apr 28, 2023):

I believe we should completely stop publishing macOS builds so as not to annoy users.

I agree

macOS 13 test/beta runner-image is available now for GHA CI so I will be creating a branch on my repo to test building/deprecations etc.

Edit: GHA CI: Test with macOS 13 Runner Image
https://github.com/xavier2k6/qBittorrent/actions/runs/5137434599

Deprecations:

warning: 'kUTTagClassFilenameExtension' is deprecated: first deprecated in macOS 12.0 - Use UTTagClassFilenameExtension instead. [-Wdeprecated-declarations]
warning: 'UTTypeCreatePreferredIdentifierForTag' is deprecated: first deprecated in macOS 12.0 - Use the UTType class instead. [-Wdeprecated-declarations]
warning: 'LSCopyDefaultHandlerForURLScheme' is deprecated: first deprecated in macOS 10.15 - Use -[NSWorkspace URLForApplicationToOpenURL:] instead. [-Wdeprecated-declarations]
warning: 'iconForFileType:' is deprecated: first deprecated in macOS 12.0 - Use -[NSWorkspace iconForContentType:] instead. [-Wdeprecated-declarations]
warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
warning: 'NSUserNotificationDefaultSoundName' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
@xavier2k6 commented on GitHub (Apr 28, 2023): > I believe we should completely stop publishing macOS builds so as not to annoy users. I agree macOS 13 `test/beta` runner-image is available now for GHA CI so I will be creating a branch on my repo to test building/deprecations etc. Edit: `GHA CI: Test with macOS 13 Runner Image` https://github.com/xavier2k6/qBittorrent/actions/runs/5137434599 Deprecations: ``` warning: 'kUTTagClassFilenameExtension' is deprecated: first deprecated in macOS 12.0 - Use UTTagClassFilenameExtension instead. [-Wdeprecated-declarations] warning: 'UTTypeCreatePreferredIdentifierForTag' is deprecated: first deprecated in macOS 12.0 - Use the UTType class instead. [-Wdeprecated-declarations] warning: 'LSCopyDefaultHandlerForURLScheme' is deprecated: first deprecated in macOS 10.15 - Use -[NSWorkspace URLForApplicationToOpenURL:] instead. [-Wdeprecated-declarations] warning: 'iconForFileType:' is deprecated: first deprecated in macOS 12.0 - Use -[NSWorkspace iconForContentType:] instead. [-Wdeprecated-declarations] warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations] warning: 'NSUserNotificationDefaultSoundName' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations] warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations] ```
Author
Owner

@xavier2k6 commented on GitHub (Jun 12, 2023):

@dmitry1100 @vit9696 @briankendall @MaddTheSane Ping! - In reference to https://github.com/qbittorrent/qBittorrent/issues/15630#issuecomment-1422957536

You've previously submitted PR's for macOS & would appreciate it if any of you could help providing PR's to handle below:

  1. Deprecations as outlined in https://github.com/qbittorrent/qBittorrent/issues/15630#issuecomment-1528003962
  2. "Open Issues" under the macOS Issues Tracker link
@xavier2k6 commented on GitHub (Jun 12, 2023): @dmitry1100 @vit9696 @briankendall @MaddTheSane Ping! - In reference to https://github.com/qbittorrent/qBittorrent/issues/15630#issuecomment-1422957536 You've previously submitted PR's for `macOS` & would appreciate it if any of you could help providing PR's to handle below: 1. `Deprecations` as outlined in https://github.com/qbittorrent/qBittorrent/issues/15630#issuecomment-1528003962 2. "Open Issues" under the [macOS Issues Tracker link](https://github.com/qbittorrent/qBittorrent/issues?q=is%3Aissue+is%3Aopen+label%3A%22OS%3A+macOS%22+-label%3A%22OS%3A+Linux%22+-label%3A%22OS%3A+Windows%22+-label%3A%22Feature+request%22)
Author
Owner

@vit9696 commented on GitHub (Jun 12, 2023):

Why deprecations are a problem? Builds for macOS work more or less fine for me.

@vit9696 commented on GitHub (Jun 12, 2023): Why deprecations are a problem? Builds for macOS work more or less fine for me.
Author
Owner

@glassez commented on GitHub (Jun 12, 2023):

Why deprecations are a problem? Builds for macOS work more or less fine for me.

Because after a while it will stop working. Marking some features as deprecated is a way to give developers time to switch to using new features before old ones are completely deleted.

@glassez commented on GitHub (Jun 12, 2023): > Why deprecations are a problem? Builds for macOS work more or less fine for me. Because after a while it will stop working. Marking some features as deprecated is a way to give developers time to switch to using new features before old ones are completely deleted.
Author
Owner

@xavier2k6 commented on GitHub (Sep 24, 2023):

Latest run with macOS 13 runner image:
https://github.com/xavier2k6/qBittorrent/actions/runs/6289363171

@DouiKo Could you take a look through the logs & see if you can make any progress with the deprecations please.

@xavier2k6 commented on GitHub (Sep 24, 2023): Latest run with `macOS 13` runner image: https://github.com/xavier2k6/qBittorrent/actions/runs/6289363171 @DouiKo Could you take a look through the logs & see if you can make any progress with the deprecations please.
Author
Owner

@DouiKo commented on GitHub (Sep 25, 2023):

@xavier2k6 I will do my best to do what I can. Should I replace these functions as prompted by the warning and then check for any issues?

@DouiKo commented on GitHub (Sep 25, 2023): @xavier2k6 I will do my best to do what I can. Should I replace these functions as prompted by the warning and then check for any issues?
Author
Owner

@xavier2k6 commented on GitHub (Sep 25, 2023):

Should I replace these functions as prompted by the warning and then check for any issues?

Please, anything that you can do to help benefit our macOS userbase.

Only 1 team member has access/uses macOS & that's running Catalina (IIRC)....so we are barely able to support it as is.

With Qt 6.5+ now only supporting macOS 11+............etc.

I will have another issue for you to look into/see if you can implement it......at a later stage, will ping you when I create the associated ticket.....can't do it now....time.

@xavier2k6 commented on GitHub (Sep 25, 2023): >Should I replace these functions as prompted by the warning and then check for any issues? Please, anything that you can do to help benefit our macOS userbase. Only 1 team member has access/uses macOS & that's running Catalina (IIRC)....so we are barely able to support it as is. With Qt 6.5+ now only supporting macOS 11+............etc. I will have another issue for you to look into/see if you can implement it......at a later stage, will ping you when I create the associated ticket.....can't do it now....time.
Author
Owner

@xavier2k6 commented on GitHub (Oct 14, 2023):

@ackerthehacker2 Any help/fixes you could provide with regards to macOS deprecations/open issues would be much appreciated too.

@xavier2k6 commented on GitHub (Oct 14, 2023): @ackerthehacker2 Any help/fixes you could provide with regards to macOS deprecations/open issues would be much appreciated too.
Author
Owner

@101Dude commented on GitHub (Sep 17, 2024):

Adding this here in case it's useful.

While building I see these warnings. I understand they are not build errors. macOS 10.15 and macOS 11 are 4 year old OSs.

/Users/frankenstein/Build/qbt/src/qBittorrent-release-4.6.7/src/base/utils/os.cpp:96:44: warning: 'LSCopyDefaultHandlerForURLScheme' is deprecated: first deprecated in macOS 10.15 - Use -[NSWorkspace URLForApplicationToOpenURL:] instead. [-Wdeprecated-declarations]
   96 |     const CFStringRef defaultHandlerId = ::LSCopyDefaultHandlerForURLScheme(magnetUrlScheme);
      |                                            ^
...
/Users/john/Build/qbt/src/qBittorrent-release-4.6.7/src/gui/macutilities.mm:91:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
   91 |             NSUserNotification *notification = [[NSUserNotification alloc] init];
      |                                                  ^
/Users/john/Build/qbt/src/qBittorrent-release-4.6.7/src/gui/macutilities.mm:94:38: warning: 'NSUserNotificationDefaultSoundName' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
   94 |             notification.soundName = NSUserNotificationDefaultSoundName;
      |                                      ^
/Users/frankenstein/Build/qbt/src/qBittorrent-release-4.6.7/src/gui/macutilities.mm:96:15: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
   96 |             [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
      |               ^

Originally posted by @101Dude in https://github.com/qbittorrent/qBittorrent/discussions/21353

@101Dude commented on GitHub (Sep 17, 2024): Adding this here in case it's useful. While building I see these warnings. I understand they are not build errors. macOS 10.15 and macOS 11 are 4 year old OSs. ``` /Users/frankenstein/Build/qbt/src/qBittorrent-release-4.6.7/src/base/utils/os.cpp:96:44: warning: 'LSCopyDefaultHandlerForURLScheme' is deprecated: first deprecated in macOS 10.15 - Use -[NSWorkspace URLForApplicationToOpenURL:] instead. [-Wdeprecated-declarations] 96 | const CFStringRef defaultHandlerId = ::LSCopyDefaultHandlerForURLScheme(magnetUrlScheme); | ^ ... /Users/john/Build/qbt/src/qBittorrent-release-4.6.7/src/gui/macutilities.mm:91:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations] 91 | NSUserNotification *notification = [[NSUserNotification alloc] init]; | ^ /Users/john/Build/qbt/src/qBittorrent-release-4.6.7/src/gui/macutilities.mm:94:38: warning: 'NSUserNotificationDefaultSoundName' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations] 94 | notification.soundName = NSUserNotificationDefaultSoundName; | ^ /Users/frankenstein/Build/qbt/src/qBittorrent-release-4.6.7/src/gui/macutilities.mm:96:15: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations] 96 | [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification]; | ^ ``` _Originally posted by @101Dude in https://github.com/qbittorrent/qBittorrent/discussions/21353_
Author
Owner

@xavier2k6 commented on GitHub (Jul 3, 2025):

@Ryu481 Could you look through latest CI logs & handle/migrate away from these deprecations?

@xavier2k6 commented on GitHub (Jul 3, 2025): @Ryu481 Could you look through latest CI logs & handle/migrate away from these deprecations?
Author
Owner

@xavier2k6 commented on GitHub (Sep 22, 2025):

looks like there's more upcoming deprecations while using Qt 6.10...

@xavier2k6 commented on GitHub (Sep 22, 2025): looks like there's more upcoming deprecations while using Qt 6.10...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#12515
No description provided.