MSVC: Fix compilation with new mkspecs.

See Qt Merge-request: 727, change a9c8decc741d8c2b340f38d7a854ef206672ab3e,
which makes wchar_t a native type. QString::toUtf16() no longer is
a WCHAR.
This commit is contained in:
Friedemann Kleint
2010-07-13 14:58:53 +02:00
parent 946ab0fd8b
commit a9cf11c57f
3 changed files with 8 additions and 8 deletions

View File

@@ -296,7 +296,7 @@ bool CoreEngine::init(const QString &dllEnginePath, QString *errorMessage)
*errorMessage = msgComFailed("GetImagePathWide", hr);
return false;
}
m_baseImagePath = QString::fromUtf16(buf);
m_baseImagePath = QString::fromWCharArray(buf);
hr = lib.debugCreate( __uuidof(IDebugRegisters2), reinterpret_cast<void**>(&m_cif.debugRegisters));
if (FAILED(hr)) {
@@ -447,7 +447,7 @@ bool CoreEngine::startDebuggerWithExecutable(const QString &workingDirectory,
PCWSTR workingDirC = 0;
const QString workingDirN = workingDirectory.isEmpty() ? QString() : QDir::toNativeSeparators(workingDirectory);
if (!workingDirN.isEmpty())
workingDirC = workingDirN.utf16();
workingDirC = (PCWSTR)workingDirN.utf16();
hr = m_cif.debugClient->CreateProcess2Wide(NULL,
reinterpret_cast<PWSTR>(const_cast<ushort *>(cmd.utf16())),
&dbgopts, sizeof(dbgopts),
@@ -820,7 +820,7 @@ quint64 CoreEngine::getSourceLineAddress(const QString &file,
{
ULONG64 rc = 0;
const HRESULT hr = m_cif.debugSymbols->GetOffsetByLineWide(line,
const_cast<ushort*>(file.utf16()),
(wchar_t*)(file.utf16()),
&rc);
if (FAILED(hr)) {
*errorMessage = QString::fromLatin1("Unable to determine address of %1:%2 : %3").