Multiple plugins can have their module strings loaded at the same
logical address, so simple comparison of the string addresses fails
between multiple plugins.
Change-Id: If0bcbaaafa595e9581db1f3e480f7b1bffbae101
Reviewed-by: Martin Jones <martin.jones@nokia.com>
static const char *lastModule = 0;
static QHashedString lastModuleStr;
- if (lastModule != module) {
+ // Separate plugins may have different strings at the same address
+ QHashedCStringRef currentModule(module, ::strlen(module));
+ if ((lastModule != module) || (lastModuleStr.hash() != currentModule.hash())) {
lastModuleStr = QString::fromUtf8(module);
lastModuleStr.hash();
lastModule = module;