diff options
author | miniak <milan.burda@gmail.com> | 2009-07-01 09:50:07 (GMT) |
---|---|---|
committer | Marius Storm-Olsen <marius@trolltech.com> | 2009-07-01 09:51:18 (GMT) |
commit | 22ab94871c4a924e37eca720a1620da2e1a7259d (patch) | |
tree | 2a8a065b1fb7db76e2651a0340071dc8d8b666a8 /src/activeqt/control/qaxserver.cpp | |
parent | 5db6c3b72d3c28f55f14883767d29db3441b1b66 (diff) | |
download | Qt-22ab94871c4a924e37eca720a1620da2e1a7259d.zip Qt-22ab94871c4a924e37eca720a1620da2e1a7259d.tar.gz Qt-22ab94871c4a924e37eca720a1620da2e1a7259d.tar.bz2 |
src/activeqt: Remove QT_WA and non-Unicode code paths, dropping Win9x and NT support
Also, buffer sizes passed to Registry APIs were incorrect.
Merge-request: 604
Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 'src/activeqt/control/qaxserver.cpp')
-rw-r--r-- | src/activeqt/control/qaxserver.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp index a9b3271..e6b0c17 100644 --- a/src/activeqt/control/qaxserver.cpp +++ b/src/activeqt/control/qaxserver.cpp @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE bool qAxIsServer = false; HANDLE qAxInstance = 0; ITypeLib *qAxTypeLibrary = 0; -char qAxModuleFilename[MAX_PATH]; +wchar_t qAxModuleFilename[MAX_PATH]; bool qAxOutProcServer = false; // The QAxFactory instance @@ -116,19 +116,19 @@ QString qAxInit() InitializeCriticalSection(&qAxModuleSection); - libFile = QString::fromLocal8Bit(qAxModuleFilename); + libFile = QString::fromWCharArray(qAxModuleFilename); libFile = libFile.toLower(); - if (LoadTypeLibEx((TCHAR*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK) + if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK) return libFile; int lastDot = libFile.lastIndexOf(QLatin1Char('.')); libFile = libFile.left(lastDot) + QLatin1String(".tlb"); - if (LoadTypeLibEx((TCHAR*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK) + if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK) return libFile; lastDot = libFile.lastIndexOf(QLatin1Char('.')); libFile = libFile.left(lastDot) + QLatin1String(".olb"); - if (LoadTypeLibEx((TCHAR*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK) + if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK) return libFile; libFile = QString(); @@ -207,7 +207,7 @@ QString qax_clean_type(const QString &type, const QMetaObject *mo) HRESULT UpdateRegistry(BOOL bRegister) { qAxIsServer = false; - QString file = QString::fromLocal8Bit(qAxModuleFilename); + QString file = QString::fromWCharArray(qAxModuleFilename); QString path = file.left(file.lastIndexOf(QLatin1Char('\\'))+1); QString module = file.right(file.length() - path.length()); module = module.left(module.lastIndexOf(QLatin1Char('.'))); @@ -229,7 +229,7 @@ HRESULT UpdateRegistry(BOOL bRegister) typeLibVersion = QString::number((uint)major) + QLatin1Char('.') + QString::number((uint)minor); if (bRegister) - RegisterTypeLib(qAxTypeLibrary, (TCHAR*)libFile.utf16(), 0); + RegisterTypeLib(qAxTypeLibrary, (wchar_t*)libFile.utf16(), 0); else UnRegisterTypeLib(libAttr->guid, libAttr->wMajorVerNum, libAttr->wMinorVerNum, libAttr->lcid, libAttr->syskind); @@ -1071,7 +1071,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) QFile file(outfile); file.remove(); - QString filebase = QString::fromLocal8Bit(qAxModuleFilename); + QString filebase = QString::fromWCharArray(qAxModuleFilename); filebase = filebase.left(filebase.lastIndexOf(QLatin1Char('.'))); QString appID = qAxFactory()->appID().toString().toUpper(); @@ -1107,7 +1107,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) out << "/****************************************************************************" << endl; out << "** Interface definition generated for ActiveQt project" << endl; out << "**" << endl; - out << "** '" << qAxModuleFilename << '\'' << endl; + out << "** '" << QString::fromWCharArray(qAxModuleFilename) << '\'' << endl; out << "**" << endl; out << "** Created: " << QDateTime::currentDateTime().toString() << endl; out << "**" << endl; |