Directory string in Windows
Hi.
Currently, when some directory is shown on Windows environment, it's written UNIX-line, with slashes instead of back-slashes.
e.g.,
Edit->Preferences...->Paths
Working Directory: U:/My Documents/score
The expected string is:
Working Directory: U:\My Documents\score
It should be quite simple to fix this, by using "QDir.toNativeSperators()".
I've tried to fix it myself, but my compilation failed [before loading this file :) ], so I couldn't check my fix...
The fix should be in:
mscore/mscore/preferences.cpp, lines #724, #1013
instead of
724 workingDirectory->setText(p->workingDirectory);
...
1013 if (!s.isNull())
1014 workingDirectory->setText(s);
1015 }
it should be
724 QDir dir;
725 workingDirectory->setText(dir.toNativeSperators(p->workingDirectory));
...
1014 if (!s.isNull())
1015 QDir dir;
1016 workingDirectory->setText(dir.toNativeSperators(s));
1017 }
Of course, this is just one place that should be modified; once the fix is approved, we should change all relevant code.
Thanks,
Zvika
Comments
Thanks for looking in to this.
Compilation on the trunk failed for me yesterday but the latest SVN compiles today. You might try again and see if it compiles for you now. If not, feel to post the last part of the log and I'll do my best to help.