diff options
author | Marco Bubke <marco.bubke@qt.io> | 2019-05-07 16:51:22 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2019-06-13 16:51:48 +0000 |
commit | 4bae5de36b530bbef06ec7cb1fbfb7453fd59dc7 (patch) | |
tree | e8631b82915aef669fd63e6b0a72a1088185fa7e /src/plugins/clangpchmanager/preprocessormacrocollector.h | |
parent | f636f06b458782289340a61e42e6bbc1e523f937 (diff) | |
download | qt-creator-4bae5de36b530bbef06ec7cb1fbfb7453fd59dc7.tar.gz |
Enable macro editing for the Clang indexer
Refactor much of the code from Environment* classes to NameValue* classes
to share it with the preprocessor macro settings.
Change-Id: Ica4ee817aa338230c422b30d91240d266248d226
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/clangpchmanager/preprocessormacrocollector.h')
-rw-r--r-- | src/plugins/clangpchmanager/preprocessormacrocollector.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/plugins/clangpchmanager/preprocessormacrocollector.h b/src/plugins/clangpchmanager/preprocessormacrocollector.h new file mode 100644 index 0000000000..2de2553df3 --- /dev/null +++ b/src/plugins/clangpchmanager/preprocessormacrocollector.h @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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 <QString> +#include <QVector> + +#include <projectexplorer/projectmacro.h> + +#include <utility> + +namespace ClangPchManager { + +using PreprocessorMacro = std::pair<QString, QString>; +using PreprocessorMacros = QVector<PreprocessorMacro>; + +class PreprocessorMacroCollector +{ +public: + void add(const ProjectExplorer::Macros ¯os); + + const PreprocessorMacros ¯os() const; + +private: + PreprocessorMacros m_macros; +}; + +} // namespace ClangPchManager |