diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-09-03 12:26:41 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-09-03 12:26:41 (GMT) |
commit | d869e2da86d46cff772252e053098555c3151eac (patch) | |
tree | 241f19e16685df8ee3c6c25fdd931b0738559ce7 /src | |
parent | 5738dcd705e7edde816940f9c0ab2c364c81ad20 (diff) | |
download | Qt-d869e2da86d46cff772252e053098555c3151eac.zip Qt-d869e2da86d46cff772252e053098555c3151eac.tar.gz Qt-d869e2da86d46cff772252e053098555c3151eac.tar.bz2 |
Compile fix WinCE
Task-number: QT-3825
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/plugin/qsystemlibrary.cpp | 13 | ||||
-rw-r--r-- | src/corelib/plugin/qsystemlibrary_p.h | 6 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp index 7e9fdde..f781770 100644 --- a/src/corelib/plugin/qsystemlibrary.cpp +++ b/src/corelib/plugin/qsystemlibrary.cpp @@ -36,6 +36,13 @@ in the documentation for LoadLibrary for Windows CE at MSDN. (http://msdn.microsoft.com/en-us/library/ms886736.aspx) */ +#if defined(Q_OS_WINCE) +HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory/*= true*/) +{ + return ::LoadLibrary(libraryName); +} +#else + #if !defined(QT_BOOTSTRAPPED) extern QString qAppFileName(); #endif @@ -55,9 +62,6 @@ static QString qSystemDirectory() HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory/*= true*/) { -#if defined(Q_OS_WINCE) - return ::LoadLibrary(lpFileName); -#else QStringList searchOrder; #if !defined(QT_BOOTSTRAPPED) @@ -85,6 +89,7 @@ HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirect return inst; } return 0; -#endif + } +#endif //Q_OS_WINCE diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h index 60c59e2..5d925ca 100644 --- a/src/corelib/plugin/qsystemlibrary_p.h +++ b/src/corelib/plugin/qsystemlibrary_p.h @@ -41,7 +41,11 @@ public: load(); if (!m_handle) return 0; - return (void*)GetProcAddress(m_handle, symbol); +#ifdef Q_OS_WINCE + return (void*)GetProcAddress(m_handle, (const wchar_t*)QString::fromLatin1(symbol).utf16()); +#else + return (void*)GetProcAddress(m_handle, symbol); +#endif } static void *resolve(const QString &libraryName, const char *symbol) |