From 45917cfd29bf4d81ab158bf8ee077343a26e9abe Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Mon, 15 Jun 2020 18:20:49 +1000 Subject: [PATCH] project: use backslashes on windows Backslashes are the normal directory delimiter for Windows so Windows users will likely be more comfortable with this. Also prevents issues where a filename may appear twice in the "open recent" list for both slash directions. --- app/project/project.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/project/project.cpp b/app/project/project.cpp index cfaabb663..014489dd6 100644 --- a/app/project/project.cpp +++ b/app/project/project.cpp @@ -132,6 +132,11 @@ void Project::set_filename(const QString &s) { filename_ = s; +#ifdef Q_OS_WINDOWS + // Prevents filenames + filename_.replace('/', '\\'); +#endif + emit NameChanged(); }