Files
qt-creator/src/plugins/cmakeprojectmanager/fileapidataextractor.h
Jarek Kobus ee48dba19e FileApiReader: Make shutdown faster
Check more often for canceled future.

Make more functions static.

Fixes: QTCREATORBUG-27729
Change-Id: I8dd787acea6343008c7515fb6a4fdfde50b37aee
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-06 15:37:12 +00:00

59 lines
1.5 KiB
C++

// 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 "cmakebuildtarget.h"
#include "cmakeprojectnodes.h"
#include "3rdparty/cmake/cmListFileCache.h"
#include <projectexplorer/rawprojectpart.h>
#include <utils/filepath.h>
#include <QList>
#include <QSet>
#include <QString>
#include <memory>
#include <optional>
namespace CMakeProjectManager::Internal {
class FileApiData;
class CMakeFileInfo
{
public:
bool operator==(const CMakeFileInfo& other) const { return path == other.path; }
friend size_t qHash(const CMakeFileInfo &info, uint seed = 0) { return qHash(info.path, seed); }
bool operator<(const CMakeFileInfo &other) const { return path < other.path; }
Utils::FilePath path;
bool isCMake = false;
bool isCMakeListsDotTxt = false;
bool isExternal = false;
bool isGenerated = false;
cmListFile cmakeListFile;
};
class FileApiQtcData
{
public:
QString errorMessage;
CMakeConfig cache;
QSet<CMakeFileInfo> cmakeFiles;
QList<CMakeBuildTarget> buildTargets;
ProjectExplorer::RawProjectParts projectParts;
std::unique_ptr<CMakeProjectNode> rootProjectNode;
QString ctestPath;
bool isMultiConfig = false;
bool usesAllCapsTargets = false;
};
FileApiQtcData extractData(const QFuture<void> &cancelFuture, FileApiData &input,
const Utils::FilePath &sourceDir, const Utils::FilePath &buildDir);
} // CMakeProjectManager::Internal