forked from qt-creator/qt-creator
Add a new group box "Executables" for this. Hide the UI for clazy-standalone unless QTC_USE_CLAZY_STANDALONE_PATH is set as there is no released version with the needed -export-fixes option. Rename the previous group box from "General" to "Run Options". Change-Id: Ia9daf66c40d3a7eea98b31d9c086886d29466490 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
89 lines
2.8 KiB
C++
89 lines
2.8 KiB
C++
/****************************************************************************
|
|
**
|
|
** 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 <coreplugin/id.h>
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
namespace ClangTools {
|
|
namespace Internal {
|
|
|
|
// TODO: Remove need for "saved* members
|
|
class ClangToolsSettings : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
static ClangToolsSettings *instance();
|
|
|
|
void writeSettings();
|
|
|
|
int savedSimultaneousProcesses() const;
|
|
bool savedBuildBeforeAnalysis() const;
|
|
Core::Id savedDiagnosticConfigId() const;
|
|
QString savedClangTidyExecutable() const;
|
|
QString savedClazyStandaloneExecutable() const;
|
|
|
|
int simultaneousProcesses() const;
|
|
void setSimultaneousProcesses(int processes);
|
|
|
|
bool buildBeforeAnalysis() const;
|
|
void setBuildBeforeAnalysis(bool build);
|
|
|
|
Core::Id diagnosticConfigId() const;
|
|
void setDiagnosticConfigId(Core::Id id);
|
|
|
|
QString clangTidyExecutable() const;
|
|
void setClangTidyExecutable(const QString &path);
|
|
|
|
QString clazyStandaloneExecutable() const;
|
|
void setClazyStandaloneExecutable(const QString &path);
|
|
|
|
signals:
|
|
void buildBeforeAnalysisChanged(bool checked) const;
|
|
|
|
private:
|
|
ClangToolsSettings();
|
|
void readSettings();
|
|
|
|
void updateSavedBuildBeforeAnalysiIfRequired();
|
|
|
|
int m_simultaneousProcesses = -1;
|
|
int m_savedSimultaneousProcesses = -1;
|
|
bool m_buildBeforeAnalysis = false;
|
|
bool m_savedBuildBeforeAnalysis= false;
|
|
QString m_clangTidyExecutable;
|
|
QString m_savedClangTidyExecutable;
|
|
QString m_clazyStandaloneExecutable;
|
|
QString m_savedClazyStandaloneExecutable;
|
|
Core::Id m_diagnosticConfigId;
|
|
Core::Id m_savedDiagnosticConfigId;
|
|
};
|
|
|
|
} // namespace Internal
|
|
} // namespace ClangTools
|