diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2018-06-04 12:08:57 +0200 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2018-06-06 06:10:38 +0000 |
commit | 542c5b698cb9586aac48cc4dda66a6a2f98c905e (patch) | |
tree | edfdde1de98e132e6cb7bf4445638ed8f7ce8f3a /src/core/content_client_qt.cpp | |
parent | 6cd3360c4d5283893eeb1efe43e329073709b48c (diff) |
Use range-based for instead of Q_FOREACH
Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/content_client_qt.cpp')
-rw-r--r-- | src/core/content_client_qt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index 37b601bf8..584d6c0aa 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -165,7 +165,8 @@ void AddPepperFlashFromSystem(std::vector<content::PepperPluginInfo>* plugins) winDir = QString::fromLatin1("C:/Windows"); QDir pluginDir(winDir + "/System32/Macromed/Flash"); pluginDir.setFilter(QDir::Files); - Q_FOREACH (const QFileInfo &info, pluginDir.entryInfoList(QStringList("pepflashplayer*.dll"))) + const QFileInfoList infos = pluginDir.entryInfoList(QStringList("pepflashplayer*.dll")); + for (const QFileInfo &info : infos) pluginPaths << info.absoluteFilePath(); pluginPaths << ppapiPluginsPath() + QStringLiteral("/pepflashplayer.dll"); #endif @@ -248,7 +249,7 @@ void AddPepperWidevine(std::vector<content::PepperPluginInfo>* plugins) #endif } - Q_FOREACH (const QString &pluginPath, pluginPaths) { + for (const QString &pluginPath : qAsConst(pluginPaths)) { base::FilePath path = QtWebEngineCore::toFilePath(pluginPath); if (base::PathExists(path)) { content::PepperPluginInfo widevine_cdm; |