aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/currentprojectfilter.h
blob: 6c500707907f9cc778507a2b0764d59a67ec8f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <coreplugin/locator/ilocatorfilter.h>

namespace ProjectExplorer { class Project; }

namespace ProjectExplorer::Internal {

class CurrentProjectFilter : public Core::ILocatorFilter
{
public:
    CurrentProjectFilter();

private:
    Core::LocatorMatcherTasks matchers() final { return {m_cache.matcher()}; }
    void currentProjectChanged();
    void invalidate() { m_cache.invalidate(); }

    Core::LocatorFileCache m_cache;
    Project *m_project = nullptr;
};

} // namespace ProjectExplorer::Internal