1
0
Fork 0

FlightGear path API tweaks

This commit is contained in:
James Turner 2016-07-15 10:15:55 +01:00
parent d800c49cb9
commit ecb8ec57c0
2 changed files with 4 additions and 6 deletions

View file

@ -87,12 +87,10 @@ win32MessageBox(const std::string& caption,
}
UINT mbType = MB_OK;
WCharVec wMsg(convertUtf8ToWString(fullMsg)),
std::wstring wMsg(convertUtf8ToWString(fullMsg)),
wCap(convertUtf8ToWString(caption));
wMsg.push_back(0);
wCap.push_back(0);
::MessageBoxExW(ownerWindow, wMsg.data(), wCap.data(),
::MessageBoxExW(ownerWindow, wMsg.c_str(), wCap.c_str(),
mbType, 0 /* system lang */);
return flightgear::MSG_BOX_OK;

View file

@ -107,7 +107,7 @@ SGPath SetupRootDialog::restoreUserSelectedRoot()
}
if (validatePath(path) && validateVersion(path)) {
return path.toStdString();
return SGPath::fromUtf8(path.toStdString());
} else {
// we have an existing path but it's invalid. Let's ask the
// user what they want
@ -147,7 +147,7 @@ bool SetupRootDialog::validatePath(QString path)
bool SetupRootDialog::validateVersion(QString path)
{
std::string ver = fgBasePackageVersion(SGPath(path.toStdString()));
std::string ver = fgBasePackageVersion(SGPath::fromUtf8(path.toStdString()));
return (ver == FLIGHTGEAR_VERSION);
}