forked from qt-creator/qt-creator
Fixes: pluginmanager: fork QPluginLoader and QLibraryPrivate
Details: saves 20% startup time. patch for Qt 4.6 at http://codepaster-nokia.troll.no/?id=11918.
This commit is contained in:
1171
src/libs/extensionsystem/patchedpluginloader.cpp
Normal file
1171
src/libs/extensionsystem/patchedpluginloader.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,6 @@
|
||||
#include "iplugin.h"
|
||||
|
||||
#include <QtCore/QMetaProperty>
|
||||
#include <QtCore/QPluginLoader>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QTextStream>
|
||||
#include <QtCore/QWriteLocker>
|
||||
|
@@ -42,10 +42,23 @@
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QXmlStreamReader>
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/QPluginLoader>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtDebug>
|
||||
|
||||
#define USE_UNPATCHED_QPLUGINLOADER 1
|
||||
|
||||
#if USE_UNPATCHED_QPLUGINLOADER
|
||||
|
||||
#include <QtCore/QPluginLoader>
|
||||
typedef QT_PREPEND_NAMESPACE(QPluginLoader) PluginLoader;
|
||||
|
||||
#else
|
||||
|
||||
#include "patchedpluginloader.cpp"
|
||||
typedef PatchedPluginLoader PluginLoader;
|
||||
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\class ExtensionSystem::PluginDependency
|
||||
\brief Struct that contains the name and required compatible version number of a plugin's dependency.
|
||||
@@ -770,7 +783,7 @@ bool PluginSpecPrivate::loadLibrary()
|
||||
|
||||
#endif
|
||||
|
||||
QPluginLoader loader(libName);
|
||||
PluginLoader loader(libName);
|
||||
if (!loader.load()) {
|
||||
hasError = true;
|
||||
errorString = loader.errorString();
|
||||
|
Reference in New Issue
Block a user