diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-01-17 15:27:31 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-01-24 14:41:48 +0000 |
commit | 0b8df41387005156ea73b029f4d9d77f91ce5eb5 (patch) | |
tree | 6b44cb326108dff1c0b37322741aaa3da646fb2b /src/plugins/cpptools/cpptools_utils.h | |
parent | 19eaf87ef95a510351557119a955223a4aeea7b3 (diff) | |
download | qt-creator-0b8df41387005156ea73b029f4d9d77f91ce5eb5.tar.gz |
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 <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpptools_utils.h')
-rw-r--r-- | src/plugins/cpptools/cpptools_utils.h | 47 |
1 files changed, 47 insertions, 0 deletions
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 |