Skip to content

Commit

Permalink
QMimeProvider: reduce scope of variable
Browse files Browse the repository at this point in the history
Change-Id: I0914530b76d1a97b4d9216bc670b5a846f1eda72
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
dfaure-kdab committed Sep 1, 2023
1 parent 1b39e61 commit b281c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/mimetypes/qmimeprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ void QMimeBinaryProvider::addFileNameMatches(const QString &fileName, QMimeGlobM
if (fileName.isEmpty())
return;
Q_ASSERT(m_cacheFile);
const QString lowerFileName = fileName.toLower();
int numMatches = 0;
// Check literals (e.g. "Makefile")
numMatches = matchGlobList(result, m_cacheFile.get(),
m_cacheFile->getUint32(PosLiteralListOffset), fileName);
// Check the very common *.txt cases with the suffix tree
if (numMatches == 0) {
const QString lowerFileName = fileName.toLower();
const int reverseSuffixTreeOffset = m_cacheFile->getUint32(PosReverseSuffixTreeOffset);
const int numRoots = m_cacheFile->getUint32(reverseSuffixTreeOffset);
const int firstRootOffset = m_cacheFile->getUint32(reverseSuffixTreeOffset + 4);
Expand Down

0 comments on commit b281c7a

Please sign in to comment.