Commit c0b13863 authored by hjk's avatar hjk
Browse files

Fixes: use less static variables in patchedpluginloader.cpp

Details: confused designer plugins
parent 9a70ea18
......@@ -114,8 +114,6 @@ public:
QObject *instance();
static QObjectList staticInstances();
bool load();
bool unload();
bool isLoaded() const;
......@@ -831,9 +829,6 @@ QString PatchedPluginLoader::errorString() const
return (!d || d->errorString.isEmpty()) ? QLibrary::tr("Unknown error") : d->errorString;
}
typedef QList<QtPluginInstanceFunction> StaticInstanceFunctionList;
Q_GLOBAL_STATIC(StaticInstanceFunctionList, staticInstanceFunctionList)
void PatchedPluginLoader::setLoadHints(QLibrary::LoadHints loadHints)
{
if (!d) {
......@@ -853,24 +848,6 @@ QLibrary::LoadHints PatchedPluginLoader::loadHints() const
return d->loadHints;
}
void qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunction function)
{
staticInstanceFunctionList()->append(function);
}
QObjectList PatchedPluginLoader::staticInstances()
{
QObjectList instances;
StaticInstanceFunctionList *functions = staticInstanceFunctionList();
if (functions) {
for (int i = 0; i < functions->count(); ++i)
instances.append((*functions)[i]());
}
return instances;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment