Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/dfm-search/dfm-search-lib/utils/searchutility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ QStringList defaultContentSearchExtensions()

QStringList defaultIndexedDirectory()
{
const QStringList &dirs = getResolvedIndexedDirectories();
static const QStringList dirs = getResolvedIndexedDirectories();

if (dirs.isEmpty()) {
return QStringList();
Expand Down Expand Up @@ -615,7 +615,7 @@ bool isPathInContentIndexDirectory(const QString &path)
if (!isContentIndexAvailable())
return false;

static const QStringList &kDirs = DFMSEARCH::Global::defaultIndexedDirectory();
static const QStringList kDirs = DFMSEARCH::Global::defaultIndexedDirectory();
return isPathInAnyDirectory(path, kDirs);
}

Expand Down Expand Up @@ -673,7 +673,7 @@ bool isPathInOcrTextIndexDirectory(const QString &path)
if (!isOcrTextIndexAvailable())
return false;

static const QStringList &kDirs = DFMSEARCH::Global::defaultIndexedDirectory();
static const QStringList kDirs = DFMSEARCH::Global::defaultIndexedDirectory();
return isPathInAnyDirectory(path, kDirs);
}

Expand Down Expand Up @@ -714,11 +714,11 @@ bool isPathInFileNameIndexDirectory(const QString &path)
if (!isFileNameIndexDirectoryAvailable())
return false;

static const QStringList &kBlackPaths = defaultBlacklistPaths();
static const QStringList kBlackPaths = defaultBlacklistPaths();
if (BlacklistMatcher::isPathBlacklisted(path, kBlackPaths))
return false;

static const QStringList &kIndexedDirs = DFMSEARCH::Global::defaultIndexedDirectory();
static const QStringList kIndexedDirs = DFMSEARCH::Global::defaultIndexedDirectory();
return isPathInAnyDirectory(path, kIndexedDirs);
}

Expand Down
Loading