summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2016-01-08 10:41:02 +0100
committerKai Koehne <kai.koehne@theqtcompany.com>2016-01-08 15:01:50 +0000
commit687fe11d738238c17f9c6dbfd57d15ff2668272f (patch)
tree3a890cce3ffef92d6594151f1ff6fddf3fe21a16 /src
parent2c6c0f01758fb16ddd5baa8aa7caa1846de32ab0 (diff)
Simplify search for Flash plugin on Windows
Checking for C:\Windows\SysWOW64 is actually non needed, because 32 bit apps will automatically see this directory as "C:\Windows\System32" on 64 bit Windows. Change-Id: Ic2e847a287632955970893be91b00489dd7ab0a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/content_client_qt.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index 6a76ed6cf..4d6bdc14c 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -110,16 +110,10 @@ void AddPepperFlashFromSystem(std::vector<content::PepperPluginInfo>* plugins)
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