summaryrefslogtreecommitdiffstats
path: root/src/s60main/newallocator_hook.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-12-22 10:18:39 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-12-22 10:18:39 (GMT)
commit07bc01460e72f08550f09de66e0e716471cf61bd (patch)
treebfdc7b7efced4e3e2801f343beb9978c24d217e9 /src/s60main/newallocator_hook.cpp
parent27c18a5cd8dbe2d22c8717044922ad5437e6fff4 (diff)
downloadQt-07bc01460e72f08550f09de66e0e716471cf61bd.zip
Qt-07bc01460e72f08550f09de66e0e716471cf61bd.tar.gz
Qt-07bc01460e72f08550f09de66e0e716471cf61bd.tar.bz2
Fix libinfixed usage in Symbian when def files are used
There was a hardcoded lookup on "qtcore.dll" in s60main, which caused loading of wrong dll. Task-number: QTBUG-16221 Reviewed-by: Janne Koskinen
Diffstat (limited to 'src/s60main/newallocator_hook.cpp')
-rw-r--r--src/s60main/newallocator_hook.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/s60main/newallocator_hook.cpp b/src/s60main/newallocator_hook.cpp
index 9ea2ef0..3e259c2 100644
--- a/src/s60main/newallocator_hook.cpp
+++ b/src/s60main/newallocator_hook.cpp
@@ -69,6 +69,16 @@ TInt UserHeap::SetupThreadHeap(TBool aNotFirst, SStdEpocThreadCreateInfo& aInfo)
// So the function is found and called dynamically, by library lookup. If it is not found, we
// use the OS allocator creation functions instead.
+#if defined(QT_LIBINFIX)
+# define QT_LSTRING2(x) L##x
+# define QT_LSTRING(x) QT_LSTRING2(x)
+# define QT_LIBINFIX_UNICODE QT_LSTRING(QT_LIBINFIX)
+#else
+# define QT_LIBINFIX_UNICODE L""
+#endif
+
+_LIT(QtCoreLibName, "qtcore" QT_LIBINFIX_UNICODE L".dll");
+
struct SThreadCreateInfo
{
TAny* iHandle;
@@ -106,7 +116,7 @@ TInt UserHeap::SetupThreadHeap(TBool aNotFirst, SStdEpocThreadCreateInfo& aInfo)
#ifndef __WINS__
// attempt to create the fast allocator through a known export ordinal in qtcore.dll
RLibrary qtcore;
- if (qtcore.Load(_L("qtcore.dll")) == KErrNone)
+ if (qtcore.Load(QtCoreLibName) == KErrNone)
{
const int qt_symbian_SetupThreadHeap_eabi_ordinal = 3713;
TLibraryFunction libFunc = qtcore.Lookup(qt_symbian_SetupThreadHeap_eabi_ordinal);