Use std::filesystem::path and u8string to ensure UTF-8 is used for paths on Windows

This commit is contained in:
Yousef Khadadeh 2025-11-21 08:35:47 +03:00
parent 5f4bc6e1cb
commit 6839e529c1
10 changed files with 59 additions and 60 deletions

View file

@ -41,7 +41,7 @@ class DrawingProgram {
bool prevent_undo_or_redo();
void add_file_to_canvas_by_path(const std::string& filePath, Vector2f dropPos, bool addInSameThread);
void add_file_to_canvas_by_path(const std::filesystem::path& filePath, Vector2f dropPos, bool addInSameThread);
void add_file_to_canvas_by_data(const std::string& fileName, std::string_view fileBuffer, Vector2f dropPos);
void parallel_loop_all_components(std::function<void(const std::shared_ptr<CollabList<std::shared_ptr<DrawComponent>, ServerClientID>::ObjectInfo>&)> func);
@ -82,7 +82,7 @@ class DrawingProgram {
std::atomic<bool> addFileInNextFrame = false;
std::pair<std::string, Vector2f> addFileInfo;
void add_file_to_canvas_by_path_execute(const std::string& filePath, Vector2f dropPos);
void add_file_to_canvas_by_path_execute(const std::filesystem::path& filePath, Vector2f dropPos);
void drag_drop_update();