From 97b448b152f0148adb2426c2a4e1f83dd150db3c Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Tue, 26 Jan 2016 12:06:40 +0300 Subject: Use QFile::exists(f) instead of QFile(f).exists(). It's faster. Change-Id: Ie57619b4e0c53975aa955c83c833c34e1446e4c8 Reviewed-by: Oswald Buddenhagen --- .../platforminputcontexts/compose/generator/qtablegenerator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforminputcontexts/compose/generator') diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp index 4126456f90..44f1d7e6ba 100644 --- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp @@ -273,7 +273,7 @@ QString TableGenerator::findComposeFile() // check if user’s home directory has a file named .XCompose if (cleanState()) { QString path = qgetenv("HOME") + QStringLiteral("/.XCompose"); - if (QFile(path).exists()) + if (QFile::exists(path)) return path; } @@ -286,7 +286,7 @@ QString TableGenerator::findComposeFile() m_state = UnsupportedLocale; else { QString path = QDir(systemComposeDir()).filePath(table); - if (QFile(path).exists()) + if (QFile::exists(path)) return path; } } @@ -308,7 +308,7 @@ bool TableGenerator::findSystemComposeDir() bool found = false; for (int i = 0; i < m_possibleLocations.size(); ++i) { QString path = m_possibleLocations.at(i); - if (QFile(path + QLatin1String("/compose.dir")).exists()) { + if (QFile::exists(path + QLatin1String("/compose.dir"))) { m_systemComposeDir = path; found = true; break; -- cgit v1.2.3