feat: expose from local file

And revise some naming re: "to local file".
This commit is contained in:
Michael Bradley, Jr 2021-09-15 13:57:54 -05:00 committed by Michał
parent 79681fccdb
commit e7ba842662
2 changed files with 16 additions and 9 deletions

View File

@ -1009,7 +1009,9 @@ DOS_API void dos_statusosnotification_show_notification(DosStatusOSNotificationO
const char* title, const char* message, const char* identifier);
DOS_API void dos_statusosnotification_delete(DosStatusOSNotificationObject* vptr);
DOS_API char *dos_to_local_file(const char* filePath);
DOS_API char *dos_to_local_file(const char* fileUrl);
DOS_API char *dos_from_local_file(const char* filePath);
#ifdef __cplusplus
}

View File

@ -1393,7 +1393,12 @@ void dos_statusosnotification_delete(DosStatusOSNotificationObject* vptr)
qobject->deleteLater();
}
char* dos_to_local_file(const char* filePath)
char* dos_to_local_file(const char* fileUrl)
{
return convert_to_cstring(QUrl(QString::fromUtf8(filePath)).toLocalFile());
return convert_to_cstring(QUrl(QString::fromUtf8(fileUrl)).toLocalFile());
}
char* dos_from_local_file(const char* filePath)
{
return convert_to_cstring(QUrl::fromLocalFile(QString::fromUtf8(filePath)).toString());
}