feat: expose to local file

This commit is contained in:
Anthony Laibe 2021-09-15 14:14:42 +02:00 committed by Michał
parent cd82993bed
commit 79681fccdb
2 changed files with 7 additions and 0 deletions

View File

@ -1009,6 +1009,8 @@ 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);
#ifdef __cplusplus
}
#endif

View File

@ -1391,4 +1391,9 @@ void dos_statusosnotification_delete(DosStatusOSNotificationObject* vptr)
auto qobject = static_cast<QObject*>(vptr);
if(qobject)
qobject->deleteLater();
}
char* dos_to_local_file(const char* filePath)
{
return convert_to_cstring(QUrl(QString::fromUtf8(filePath)).toLocalFile());
}