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:
@@ -132,6 +132,11 @@ void Project::set_filename(const QString &s)
|
||||
{
|
||||
filename_ = s;
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
// Prevents filenames
|
||||
filename_.replace('/', '\\');
|
||||
#endif
|
||||
|
||||
emit NameChanged();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user