mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-19 10:16:34 +01:00
Use faster QFileInfo::exists
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
abcd1c9415
commit
e72a661378
@ -296,7 +296,7 @@ void QzToolsTest::copyRecursivelyTest()
|
||||
const QString testDir = createPath("copyRecursivelyTest");
|
||||
createTestDirectoryStructure(testDir);
|
||||
|
||||
QVERIFY(!QFileInfo(testDir + QSL("-copy")).exists());
|
||||
QVERIFY(!QFileInfo::exists(testDir + QSL("-copy")));
|
||||
|
||||
// Copy to non-existent target
|
||||
QCOMPARE(QzTools::copyRecursively(testDir, testDir + QSL("-copy")), true);
|
||||
@ -331,7 +331,7 @@ void QzToolsTest::removeRecursivelyTest()
|
||||
|
||||
QCOMPARE(QzTools::copyRecursively(testDir, testDir + QSL("-copy")), true);
|
||||
QCOMPARE(QzTools::removeRecursively(testDir + QSL("-copy")), true);
|
||||
QCOMPARE(QFileInfo(testDir + QSL("-copy")).exists(), false);
|
||||
QCOMPARE(QFileInfo::exists(testDir + QSL("-copy")), false);
|
||||
|
||||
// Remove non-existent path returns success
|
||||
QCOMPARE(QzTools::removeRecursively(testDir + QSL("-copy")), true);
|
||||
|
@ -249,7 +249,7 @@ void TLDExtractor::loadData()
|
||||
for (const QString &path : std::as_const(m_dataSearchPaths)) {
|
||||
dataFileName = QFileInfo(path + QLatin1String("/effective_tld_names.dat")).absoluteFilePath();
|
||||
|
||||
if (QFileInfo(dataFileName).exists()) {
|
||||
if (QFileInfo::exists(dataFileName)) {
|
||||
parsedDataFileExist = true;
|
||||
break;
|
||||
}
|
||||
@ -352,7 +352,7 @@ bool TLDExtractor::test()
|
||||
for (const QString &path : std::as_const(m_dataSearchPaths)) {
|
||||
testDataFileName = QFileInfo(path + QLatin1String("/test_psl.txt")).absoluteFilePath();
|
||||
|
||||
if (QFileInfo(testDataFileName).exists()) {
|
||||
if (QFileInfo::exists(testDataFileName)) {
|
||||
testDataFileExist = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user