#ifdef __APPLE__
#include "macos_urlhelper.h"
#include <Foundation/Foundation.h>

QUrl fromNSUrl(const QUrl &url) {
    NSURL *nsUrl = url.toNSURL();
    NSString *path = nsUrl.path;
    QString qtString = QString::fromNSString(path);
    return QUrl::fromLocalFile(qtString);
}
#endif
