diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-10-21 11:35:15 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2014-12-03 16:14:52 +0100 |
commit | 1aef709674f43ebdc5b5bd4171fabd579412add4 (patch) | |
tree | 5c4faede869a44e79414a73a237f822e1f2e9c2f /Source | |
parent | 9f20b7108e66a3455dc9f86ab7cc6c732f1d5caf (diff) |
Use deepbind when loading plugins.
This patch adds the deepbind option when loading plugins. This allows
us to load plugins linked against different library versions, especially
plugins linked against Qt 4. It is not recursive though, and plugins
loading subplugins must still be blacklisted.
Change-Id: Id4f86dc01c1712a08eb4828a852f8a0733eaf899
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/plugins/qt/PluginPackageQt.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp index a674ad39d..b86ab9f66 100644 --- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp +++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp @@ -42,7 +42,11 @@ bool PluginPackage::fetchInfo() if (isPluginBlacklisted()) return false; m_module = new QLibrary((QString)m_path); +#if QT_VERSION >= QT_VERSION_CHECK(5,5,0) + m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint | QLibrary::DeepBindHint); +#else m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint); +#endif if (!m_module->load()) { LOG(Plugins, "%s not loaded (%s)", m_path.utf8().data(), m_module->errorString().toLatin1().constData()); @@ -144,7 +148,8 @@ static void initializeGtk(QLibrary* module = 0) bool PluginPackage::isPluginBlacklisted() { - // TODO: enumerate all plugins that are incompatible with Qt5. + // These plugins are incompatible because they themselves use dlopen on + // subplugins linked against Qt 4 but without using DEEPBIND. const QLatin1String pluginBlacklist[] = { QLatin1String("skypebuttons"), QLatin1String("libkpartsplugin") @@ -170,7 +175,11 @@ bool PluginPackage::load() if (!m_module) { m_module = new QLibrary((QString)m_path); +#if QT_VERSION >= QT_VERSION_CHECK(5,5,0) + m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint | QLibrary::DeepBindHint); +#else m_module->setLoadHints(QLibrary::ResolveAllSymbolsHint); +#endif if (!m_module->load()) { LOG(Plugins, "%s not loaded (%s)", m_path.utf8().data(), m_module->errorString().toLatin1().constData()); |