diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-01-12 11:32:02 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-01-12 11:35:45 +0100 |
commit | a077399f4c17f57e911334867c918cc6ddeb15fc (patch) | |
tree | c8e4d326d7a074e9d16b68399ecc5f728f8533fe /src/core/content_client_qt.cpp | |
parent | 3d698f5de377bde2293e222536bc50171cfdf1b8 (diff) | |
parent | 12dd6ff845656eb625e2ee3d0e73392bc2c61983 (diff) |
Merge branch '5.6' into dev
Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
Diffstat (limited to 'src/core/content_client_qt.cpp')
-rw-r--r-- | src/core/content_client_qt.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index 59991d558..8d7ea397b 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -49,7 +49,6 @@ #include <QCoreApplication> #include <QFile> -#include <QStringBuilder> #if defined(ENABLE_PLUGINS) #include "content/public/common/pepper_plugin_info.h" @@ -105,20 +104,14 @@ content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path, cons void AddPepperFlashFromSystem(std::vector<content::PepperPluginInfo>* plugins) { QStringList pluginPaths; -#if defined(Q_OS_WIN) && defined(Q_PROCESSOR_X86_32) +#if defined(Q_OS_WIN) QString winDir = QDir::fromNativeSeparators(qgetenv("WINDIR")); if (winDir.isEmpty()) winDir = QString::fromLatin1("C:/Windows"); - - const QStringList pluginDirs = { winDir + "/SysWOW64/Macromed/Flash", - winDir + "/System32/Macromed/Flash" }; - const QStringList nameFilters("pepflashplayer*.dll"); - Q_FOREACH (const QString &dirPath, pluginDirs) { - QDir pluginDir(dirPath); - pluginDir.setFilter(QDir::Files); - Q_FOREACH (const QFileInfo &info, pluginDir.entryInfoList(nameFilters)) - pluginPaths << info.absoluteFilePath(); - } + QDir pluginDir(winDir + "/System32/Macromed/Flash"); + pluginDir.setFilter(QDir::Files); + Q_FOREACH (const QFileInfo &info, pluginDir.entryInfoList(QStringList("pepflashplayer*.dll"))) + pluginPaths << info.absoluteFilePath(); #endif #if defined(Q_OS_OSX) pluginPaths << "/Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin"; // Mac OS X @@ -132,7 +125,6 @@ void AddPepperFlashFromSystem(std::vector<content::PepperPluginInfo>* plugins) if (!QFile(*it).exists()) continue; plugins->push_back(CreatePepperFlashInfo(QtWebEngineCore::toFilePath(*it), std::string())); - return; } } @@ -159,7 +151,6 @@ void ContentClientQt::AddPepperPlugins(std::vector<content::PepperPluginInfo>* p #endif #include <QCoreApplication> -#include <QStringBuilder> namespace QtWebEngineCore { |