Static plugins don't break QFactoryLoader::keys()

The = means that a single, static, compat plugin replaces the list of
keys (eg. from previously checked static plugins or from dynamic plugins).

Using += prevents this undesirable behaviour.

Change-Id: I3a40752c08dddbfe81444ca9c782b633e9742ab9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Lincoln Ramsay 2012-02-17 16:31:06 +10:00 committed by Qt by Nokia
parent d0759e348d
commit 147a38faa6

View File

@ -244,7 +244,7 @@ QStringList QFactoryLoader::keys() const
QObject *instance = staticPlugins.at(i).instance();
QFactoryInterface *factory = qobject_cast<QFactoryInterface*>(instance);
if (instance && factory && instance->qt_metacast(d->iid))
keys = factory->keys();
keys += factory->keys();
}
}
return keys;