Skip to content

Migrate away from deprecated iconForFileType #22992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ryu481
Copy link
Contributor

@Ryu481 Ryu481 commented Jul 14, 2025

Currently iconForFileType is used on MacOS to display the file icons in the content tab. However this is marked as deprecated and should be replaced with iconForContentType

/Users/runner/work/qBittorrent/qBittorrent/src/gui/macutilities.mm:48:61: warning: 'iconForFileType:' is deprecated: first deprecated in macOS 12.0 - Use -[NSWorkspace iconForContentType:] instead. [-Wdeprecated-declarations]
            NSImage *image = [[NSWorkspace sharedWorkspace] iconForFileType:ext.toNSString()];

Icon is still shown after the change:

Content Tab

Related #15630

@thalieht thalieht added the OS: macOS Issues specific to macOS label Jul 15, 2025
@glassez glassez added this to the 5.2 milestone Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: macOS Issues specific to macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants