From 0b8df41387005156ea73b029f4d9d77f91ce5eb5 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Tue, 17 Jan 2017 15:27:31 +0100 Subject: CppTools: Provide hints about chosen project part for editor document Parse issues can have multiple reasons (invalid kit, not a project file, actual parse issue) and we should be able to tell them apart. With this change, we can distinguish between the fallback project part and a ambiguous project part. Follow up changes will use this to display more accurate diagnostics. Change-Id: Icc8767607cc17dc14d6227b07f34e81ba5525a96 Reviewed-by: David Schulz --- src/plugins/cpptools/cpptools_utils.h | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/plugins/cpptools/cpptools_utils.h (limited to 'src/plugins/cpptools/cpptools_utils.h') diff --git a/src/plugins/cpptools/cpptools_utils.h b/src/plugins/cpptools/cpptools_utils.h new file mode 100644 index 0000000000..a90805a7ab --- /dev/null +++ b/src/plugins/cpptools/cpptools_utils.h @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#pragma once + +#include "projectpart.h" + +namespace CppTools { + +enum class Language { C, Cxx }; + +class ProjectPartInfo { +public: + enum Hint { + NoHint, + IsFallbackMatch, + IsAmbiguousMatch + }; + +public: + ProjectPart::Ptr projectPart; + Hint hint; +}; + +} // namespace CppTools -- cgit v1.2.1