From f6e1aaae1a1c86f2754c22797832b5642f136d66 Mon Sep 17 00:00:00 2001 From: Artur Rojek Date: Tue, 15 Jan 2019 13:24:59 +0100 Subject: [PATCH] Use case-insensitive compare when searching for game data by the wizard. Until now, the wizard was only comparing against an exact file name match while searching for game data, eg. "data*.cab". This patch makes it possible to locate game data regardless of case sensitivity, eg. "Data*.cab". --- apps/wizard/unshield/unshieldworker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/wizard/unshield/unshieldworker.cpp b/apps/wizard/unshield/unshieldworker.cpp index 9cdb4cd786..7aa84d3b15 100644 --- a/apps/wizard/unshield/unshieldworker.cpp +++ b/apps/wizard/unshield/unshieldworker.cpp @@ -856,7 +856,7 @@ QStringList Wizard::UnshieldWorker::findFiles(const QString &fileName, const QSt if (info.isDir()) { if (directories) { - if (info.fileName() == fileName) { + if (!info.fileName().compare(fileName, Qt::CaseInsensitive)) { result.append(info.absoluteFilePath()); } else { if (recursive) @@ -872,11 +872,11 @@ QStringList Wizard::UnshieldWorker::findFiles(const QString &fileName, const QSt switch (flags) { case Qt::MatchExactly: - if (info.fileName() == fileName) + if (!info.fileName().compare(fileName, Qt::CaseInsensitive)) result.append(info.absoluteFilePath()); break; case Qt::MatchEndsWith: - if (info.fileName().endsWith(fileName)) + if (info.fileName().endsWith(fileName), Qt::CaseInsensitive) result.append(info.absoluteFilePath()); break; }