Skip to content

Commit fabd536

Browse files
committed
fix(tvos): exclude unavailable UIKit document icon lookup
1 parent 9fda706 commit fabd536

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/src/gui/platform/darwin/qapplefileiconengine.mm
2+
+++ b/src/gui/platform/darwin/qapplefileiconengine.mm
3+
@@ -22,7 +22,7 @@
4+
{
5+
#if defined(Q_OS_MACOS)
6+
m_image = [[NSWorkspace sharedWorkspace] iconForFile:fileInfo().canonicalFilePath().toNSString()];
7+
-#elif defined(QT_PLATFORM_UIKIT)
8+
+#elif defined(QT_PLATFORM_UIKIT) && !defined(Q_OS_TVOS)
9+
const QUrl url = QUrl::fromLocalFile(fileInfo().canonicalFilePath());
10+
const auto controller = [UIDocumentInteractionController interactionControllerWithURL:url.toNSURL()];
11+
const auto allIcons = controller.icons;

0 commit comments

Comments
 (0)