summaryrefslogtreecommitdiffstats
path: root/src/core/content_client_qt.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-01-19 12:10:58 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-01-19 09:42:47 +0000
commit3763ca87176c86091a75b3b66dd75a45fc5809c5 (patch)
tree42cc98e71b25bd9b714fc967564dc0250a1f49a4 /src/core/content_client_qt.cpp
parentcd1697f022063dafc59fb512b4a469fbe38729cc (diff)
Use QFileInfo::exist(f) instead of QFileInfo(f).exists()
and QFile::exist(f) instead of QFile(f).exists(). It's faster. Change-Id: I2d5ffb2e64a547d3c703ad048ef0c75a7ccfe0d3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/content_client_qt.cpp')
-rw-r--r--src/core/content_client_qt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index ccc97517e..c8b23efab 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -123,7 +123,7 @@ void AddPepperFlashFromSystem(std::vector<content::PepperPluginInfo>* plugins)
<< "/usr/lib64/chromium/PepperFlash/libpepflashplayer.so"; // OpenSuSE
#endif
for (auto it = pluginPaths.constBegin(); it != pluginPaths.constEnd(); ++it) {
- if (!QFile(*it).exists())
+ if (!QFile::exists(*it))
continue;
plugins->push_back(CreatePepperFlashInfo(QtWebEngineCore::toFilePath(*it), std::string()));
}
@@ -132,7 +132,7 @@ void AddPepperFlashFromSystem(std::vector<content::PepperPluginInfo>* plugins)
void AddPepperFlashFromCommandLine(std::vector<content::PepperPluginInfo>* plugins)
{
const base::CommandLine::StringType flash_path = base::CommandLine::ForCurrentProcess()->GetSwitchValueNative(switches::kPpapiFlashPath);
- if (flash_path.empty() || !QFile(QtWebEngineCore::toQt(flash_path)).exists())
+ if (flash_path.empty() || !QFile::exists(QtWebEngineCore::toQt(flash_path)))
return;
// Read pepper flash plugin version from command-line. (e.g. 16.0.0.235)