From f071ee419d007ef672e60a2939340036cae8d26b Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 2 Mar 2026 21:03:25 -0500 Subject: [PATCH] BMimeType: Use the new _DEPRECATED to mark SetType deprecated. This is the first use of this new macro. --- headers/os/storage/MimeType.h | 2 +- src/kits/tracker/WidgetAttributeText.cpp | 2 +- src/kits/tracker/infowindow/GeneralInfoView.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/headers/os/storage/MimeType.h b/headers/os/storage/MimeType.h index ccd98fd26c..216e4dcf43 100644 --- a/headers/os/storage/MimeType.h +++ b/headers/os/storage/MimeType.h @@ -149,7 +149,7 @@ public: static status_t StopWatching(BMessenger target); /* Deprecated. Use SetTo() instead. */ - status_t SetType(const char* mimeType); + status_t SetType(const char* mimeType) _DEPRECATED; private: BMimeType(const char* mimeType, const char* mimePath); diff --git a/src/kits/tracker/WidgetAttributeText.cpp b/src/kits/tracker/WidgetAttributeText.cpp index a6c194f167..443092a752 100644 --- a/src/kits/tracker/WidgetAttributeText.cpp +++ b/src/kits/tracker/WidgetAttributeText.cpp @@ -705,7 +705,7 @@ KindAttributeText::ReadValue(BString* outString) char desc[B_MIME_TYPE_LENGTH]; // get the mime type - if (mime.SetType(fModel->MimeType()) != B_OK) + if (mime.SetTo(fModel->MimeType()) != B_OK) *outString = B_TRANSLATE("Unknown"); else if (mime.GetShortDescription(desc) == B_OK) { // get the short mime type description diff --git a/src/kits/tracker/infowindow/GeneralInfoView.cpp b/src/kits/tracker/infowindow/GeneralInfoView.cpp index c693806b4e..b371bf0ce8 100644 --- a/src/kits/tracker/infowindow/GeneralInfoView.cpp +++ b/src/kits/tracker/infowindow/GeneralInfoView.cpp @@ -372,7 +372,7 @@ GeneralInfoView::InitStrings(const Model* model) fFileSystemStr = B_TRANSLATE("(unknown)"); } - if (mime.SetType(model->MimeType()) == B_OK + if (mime.SetTo(model->MimeType()) == B_OK && mime.GetShortDescription(kind) == B_OK) fKindStr = kind;