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.
This commit is contained in:
itsmattkc
2020-06-15 18:20:49 +10:00
parent 95dbeac8a5
commit 45917cfd29
+5
View File
@@ -132,6 +132,11 @@ void Project::set_filename(const QString &s)
{
filename_ = s;
#ifdef Q_OS_WINDOWS
// Prevents filenames
filename_.replace('/', '\\');
#endif
emit NameChanged();
}