summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-05-12 15:51:01 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-05-15 17:07:45 +0000
commit842f25dd8dd0ee1f06252ce3d9f42c6f046b724c (patch)
tree7531f12618a08c7f3308987614c5545288f77475
parent82547509149fe96da6fc808b67df8ffc4d40dce7 (diff)
Find Google Chrome's flash plugin on newer macOS versions
Newer versions of Chrome will download the flash plugin to its own application folder instead of a system-wide folder for internet plugins. Task-number: QTBUG-60706 Change-Id: I61d569f7033b2c7bac84f479e3d196e83b07bc35 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--src/core/content_client_qt.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index b10a02fbd..e58fa93d7 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -161,7 +161,14 @@ void AddPepperFlashFromSystem(std::vector<content::PepperPluginInfo>* plugins)
pluginPaths << ppapiPluginsPath() + QStringLiteral("/pepflashplayer.dll");
#endif
#if defined(Q_OS_OSX)
- pluginPaths << "/Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin"; // Mac OS X
+ pluginPaths << "/Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin"; // System path
+ QDir potentialDir(QDir::homePath() + "/Library/Application Support/Google/Chrome/PepperFlash");
+ if (potentialDir.exists()) {
+ QFileInfoList versionDirs = potentialDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed);
+ for (int i = 0; i < versionDirs.size(); ++i) {
+ pluginPaths << versionDirs.at(i).absoluteFilePath() + "/PepperFlashPlayer.plugin";
+ }
+ }
pluginPaths << ppapiPluginsPath() + QStringLiteral("/PepperFlashPlayer.plugin");
#endif
#if defined(Q_OS_LINUX)