forked from qt-creator/qt-creator
		
	Merge remote-tracking branch 'origin/4.6'
Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp Change-Id: I2445882a270731b866b04f28ff87d161224c539a
This commit is contained in:
		
							
								
								
									
										41
									
								
								src/plugins/cpptools/clangbasechecks.ui
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								src/plugins/cpptools/clangbasechecks.ui
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>CppTools::ClangBaseChecks</class>
 | 
			
		||||
 <widget class="QWidget" name="CppTools::ClangBaseChecks">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>665</width>
 | 
			
		||||
    <height>300</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>Form</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <layout class="QVBoxLayout" name="verticalLayout">
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="QLabel" name="label">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>For appropriate options, consult the GCC or Clang manual pages or the <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">GCC online documentation</a>.</string>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="openExternalLinks">
 | 
			
		||||
      <bool>true</bool>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="CppTools::WrappableLineEdit" name="diagnosticOptionsTextEdit"/>
 | 
			
		||||
   </item>
 | 
			
		||||
  </layout>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <customwidgets>
 | 
			
		||||
  <customwidget>
 | 
			
		||||
   <class>CppTools::WrappableLineEdit</class>
 | 
			
		||||
   <extends>QLineEdit</extends>
 | 
			
		||||
   <header location="global">cpptools/wrappablelineedit.h</header>
 | 
			
		||||
  </customwidget>
 | 
			
		||||
 </customwidgets>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@@ -25,6 +25,7 @@
 | 
			
		||||
 | 
			
		||||
#include "clangdiagnosticconfigswidget.h"
 | 
			
		||||
#include "ui_clangdiagnosticconfigswidget.h"
 | 
			
		||||
#include "ui_clangbasechecks.h"
 | 
			
		||||
#include "ui_clazychecks.h"
 | 
			
		||||
#include "ui_tidychecks.h"
 | 
			
		||||
 | 
			
		||||
@@ -47,7 +48,7 @@ ClangDiagnosticConfigsWidget::ClangDiagnosticConfigsWidget(
 | 
			
		||||
    , m_diagnosticConfigsModel(diagnosticConfigsModel)
 | 
			
		||||
{
 | 
			
		||||
    m_ui->setupUi(this);
 | 
			
		||||
    setupPluginsWidgets();
 | 
			
		||||
    setupTabs();
 | 
			
		||||
 | 
			
		||||
    connectConfigChooserCurrentIndex();
 | 
			
		||||
    connect(m_ui->copyButton, &QPushButton::clicked,
 | 
			
		||||
@@ -99,7 +100,7 @@ void ClangDiagnosticConfigsWidget::onCopyButtonClicked()
 | 
			
		||||
        emit customConfigsChanged(customConfigs());
 | 
			
		||||
 | 
			
		||||
        syncConfigChooserToModel(customConfig.id());
 | 
			
		||||
        m_ui->diagnosticOptionsTextEdit->setFocus();
 | 
			
		||||
        m_clangBaseChecks->diagnosticOptionsTextEdit->setFocus();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -123,6 +124,28 @@ void ClangDiagnosticConfigsWidget::onClangTidyItemChanged(QListWidgetItem *item)
 | 
			
		||||
    updateConfig(config);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ClangDiagnosticConfigsWidget::onClazyRadioButtonChanged(bool checked)
 | 
			
		||||
{
 | 
			
		||||
    if (!checked)
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    QString checks;
 | 
			
		||||
    if (m_clazyChecks->clazyRadioDisabled->isChecked())
 | 
			
		||||
        checks = QString();
 | 
			
		||||
    else if (m_clazyChecks->clazyRadioLevel0->isChecked())
 | 
			
		||||
        checks = "level0";
 | 
			
		||||
    else if (m_clazyChecks->clazyRadioLevel1->isChecked())
 | 
			
		||||
        checks = "level1";
 | 
			
		||||
    else if (m_clazyChecks->clazyRadioLevel2->isChecked())
 | 
			
		||||
        checks = "level2";
 | 
			
		||||
    else if (m_clazyChecks->clazyRadioLevel3->isChecked())
 | 
			
		||||
        checks = "level3";
 | 
			
		||||
 | 
			
		||||
    ClangDiagnosticConfig config = currentConfig();
 | 
			
		||||
    config.setClazyChecks(checks);
 | 
			
		||||
    updateConfig(config);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool isAcceptedWarningOption(const QString &option)
 | 
			
		||||
{
 | 
			
		||||
    return option == "-w"
 | 
			
		||||
@@ -162,7 +185,8 @@ static QStringList normalizeDiagnosticInputOptions(const QString &options)
 | 
			
		||||
void ClangDiagnosticConfigsWidget::onDiagnosticOptionsEdited()
 | 
			
		||||
{
 | 
			
		||||
    // Clean up input
 | 
			
		||||
    const QString diagnosticOptions = m_ui->diagnosticOptionsTextEdit->document()->toPlainText();
 | 
			
		||||
    const QString diagnosticOptions = m_clangBaseChecks->diagnosticOptionsTextEdit->document()
 | 
			
		||||
                                          ->toPlainText();
 | 
			
		||||
    const QStringList normalizedOptions = normalizeDiagnosticInputOptions(diagnosticOptions);
 | 
			
		||||
 | 
			
		||||
    // Validate
 | 
			
		||||
@@ -231,7 +255,7 @@ void ClangDiagnosticConfigsWidget::syncOtherWidgetsToComboBox()
 | 
			
		||||
            ? m_notAcceptedOptions.value(config.id())
 | 
			
		||||
            : config.clangOptions().join(QLatin1Char(' '));
 | 
			
		||||
    setDiagnosticOptions(options);
 | 
			
		||||
    m_ui->diagnosticOptionsTextEdit->setReadOnly(config.isReadOnly());
 | 
			
		||||
    m_clangBaseChecks->diagnosticOptionsTextEdit->setReadOnly(config.isReadOnly());
 | 
			
		||||
 | 
			
		||||
    syncClangTidyWidgets(config);
 | 
			
		||||
    syncClazyWidgets(config);
 | 
			
		||||
@@ -265,31 +289,23 @@ void ClangDiagnosticConfigsWidget::syncClangTidyWidgets(const ClangDiagnosticCon
 | 
			
		||||
void ClangDiagnosticConfigsWidget::syncClazyWidgets(const ClangDiagnosticConfig &config)
 | 
			
		||||
{
 | 
			
		||||
    const QString clazyChecks = config.clazyChecks();
 | 
			
		||||
 | 
			
		||||
    QRadioButton *button = m_clazyChecks->clazyRadioDisabled;
 | 
			
		||||
    if (clazyChecks.isEmpty())
 | 
			
		||||
        m_clazyChecks->clazyLevel->setCurrentIndex(0);
 | 
			
		||||
    else
 | 
			
		||||
        m_clazyChecks->clazyLevel->setCurrentText(clazyChecks);
 | 
			
		||||
        button = m_clazyChecks->clazyRadioDisabled;
 | 
			
		||||
    else if (clazyChecks == "level0")
 | 
			
		||||
        button = m_clazyChecks->clazyRadioLevel0;
 | 
			
		||||
    else if (clazyChecks == "level1")
 | 
			
		||||
        button = m_clazyChecks->clazyRadioLevel1;
 | 
			
		||||
    else if (clazyChecks == "level2")
 | 
			
		||||
        button = m_clazyChecks->clazyRadioLevel2;
 | 
			
		||||
    else if (clazyChecks == "level3")
 | 
			
		||||
        button = m_clazyChecks->clazyRadioLevel3;
 | 
			
		||||
 | 
			
		||||
    button->setChecked(true);
 | 
			
		||||
    m_clazyChecksWidget->setEnabled(!config.isReadOnly());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ClangDiagnosticConfigsWidget::setClazyLevelDescription(int index)
 | 
			
		||||
{
 | 
			
		||||
    // Levels descriptions are taken from https://github.com/KDE/clazy
 | 
			
		||||
    static const QString levelDescriptions[] {
 | 
			
		||||
        QString(),
 | 
			
		||||
        tr("Very stable checks, 99.99% safe, no false-positives."),
 | 
			
		||||
        tr("Similar to level 0, but sometimes (rarely) there might be\n"
 | 
			
		||||
           "some false-positives."),
 | 
			
		||||
        tr("Sometimes has false-positives (20-30%)."),
 | 
			
		||||
        tr("Not always correct, possibly very noisy, might require\n"
 | 
			
		||||
           "a knowledgeable developer to review, might have a very big\n"
 | 
			
		||||
           "rate of false-positives, might have bugs.")
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    QTC_ASSERT(m_clazyChecks, return);
 | 
			
		||||
    m_clazyChecks->levelDescription->setText(levelDescriptions[static_cast<unsigned>(index)]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ClangDiagnosticConfigsWidget::updateConfig(const ClangDiagnosticConfig &config)
 | 
			
		||||
{
 | 
			
		||||
    m_diagnosticConfigsModel.appendOrUpdate(config);
 | 
			
		||||
@@ -308,10 +324,10 @@ const ClangDiagnosticConfig &ClangDiagnosticConfigsWidget::currentConfig() const
 | 
			
		||||
 | 
			
		||||
void ClangDiagnosticConfigsWidget::setDiagnosticOptions(const QString &options)
 | 
			
		||||
{
 | 
			
		||||
    if (options != m_ui->diagnosticOptionsTextEdit->document()->toPlainText()) {
 | 
			
		||||
    if (options != m_clangBaseChecks->diagnosticOptionsTextEdit->document()->toPlainText()) {
 | 
			
		||||
        disconnectDiagnosticOptionsChanged();
 | 
			
		||||
 | 
			
		||||
        m_ui->diagnosticOptionsTextEdit->document()->setPlainText(options);
 | 
			
		||||
        m_clangBaseChecks->diagnosticOptionsTextEdit->document()->setPlainText(options);
 | 
			
		||||
        const QString errorMessage
 | 
			
		||||
                = validateDiagnosticOptions(normalizeDiagnosticInputOptions(options));
 | 
			
		||||
        updateValidityWidgets(errorMessage);
 | 
			
		||||
@@ -351,6 +367,14 @@ void ClangDiagnosticConfigsWidget::disconnectClangTidyItemChanged()
 | 
			
		||||
               this, &ClangDiagnosticConfigsWidget::onClangTidyItemChanged);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ClangDiagnosticConfigsWidget::connectClazyRadioButtonClicked(QRadioButton *button)
 | 
			
		||||
{
 | 
			
		||||
    connect(button,
 | 
			
		||||
            &QRadioButton::clicked,
 | 
			
		||||
            this,
 | 
			
		||||
            &ClangDiagnosticConfigsWidget::onClazyRadioButtonChanged);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ClangDiagnosticConfigsWidget::connectConfigChooserCurrentIndex()
 | 
			
		||||
{
 | 
			
		||||
    connect(m_ui->configChooserComboBox,
 | 
			
		||||
@@ -369,14 +393,18 @@ void ClangDiagnosticConfigsWidget::disconnectConfigChooserCurrentIndex()
 | 
			
		||||
 | 
			
		||||
void ClangDiagnosticConfigsWidget::connectDiagnosticOptionsChanged()
 | 
			
		||||
{
 | 
			
		||||
    connect(m_ui->diagnosticOptionsTextEdit->document(), &QTextDocument::contentsChanged,
 | 
			
		||||
               this, &ClangDiagnosticConfigsWidget::onDiagnosticOptionsEdited);
 | 
			
		||||
    connect(m_clangBaseChecks->diagnosticOptionsTextEdit->document(),
 | 
			
		||||
            &QTextDocument::contentsChanged,
 | 
			
		||||
            this,
 | 
			
		||||
            &ClangDiagnosticConfigsWidget::onDiagnosticOptionsEdited);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ClangDiagnosticConfigsWidget::disconnectDiagnosticOptionsChanged()
 | 
			
		||||
{
 | 
			
		||||
    disconnect(m_ui->diagnosticOptionsTextEdit->document(), &QTextDocument::contentsChanged,
 | 
			
		||||
               this, &ClangDiagnosticConfigsWidget::onDiagnosticOptionsEdited);
 | 
			
		||||
    disconnect(m_clangBaseChecks->diagnosticOptionsTextEdit->document(),
 | 
			
		||||
               &QTextDocument::contentsChanged,
 | 
			
		||||
               this,
 | 
			
		||||
               &ClangDiagnosticConfigsWidget::onDiagnosticOptionsEdited);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Core::Id ClangDiagnosticConfigsWidget::currentConfigId() const
 | 
			
		||||
@@ -401,31 +429,31 @@ void ClangDiagnosticConfigsWidget::refresh(
 | 
			
		||||
    syncWidgetsToModel(configToSelect);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ClangDiagnosticConfigsWidget::setupPluginsWidgets()
 | 
			
		||||
void ClangDiagnosticConfigsWidget::setupTabs()
 | 
			
		||||
{
 | 
			
		||||
    m_clangBaseChecks.reset(new CppTools::Ui::ClangBaseChecks);
 | 
			
		||||
    m_clangBaseChecksWidget = new QWidget();
 | 
			
		||||
    m_clangBaseChecks->setupUi(m_clangBaseChecksWidget);
 | 
			
		||||
 | 
			
		||||
    m_clazyChecks.reset(new CppTools::Ui::ClazyChecks);
 | 
			
		||||
    m_clazyChecksWidget = new QWidget();
 | 
			
		||||
    m_clazyChecks->setupUi(m_clazyChecksWidget);
 | 
			
		||||
    connect(m_clazyChecks->clazyLevel,
 | 
			
		||||
            static_cast<void (QComboBox::*)(int index)>(&QComboBox::currentIndexChanged),
 | 
			
		||||
            [this](int index) {
 | 
			
		||||
        setClazyLevelDescription(index);
 | 
			
		||||
        ClangDiagnosticConfig config = currentConfig();
 | 
			
		||||
        if (index == 0)
 | 
			
		||||
            config.setClazyChecks(QString());
 | 
			
		||||
        else
 | 
			
		||||
            config.setClazyChecks(m_clazyChecks->clazyLevel->itemText(index));
 | 
			
		||||
        updateConfig(config);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    connectClazyRadioButtonClicked(m_clazyChecks->clazyRadioDisabled);
 | 
			
		||||
    connectClazyRadioButtonClicked(m_clazyChecks->clazyRadioLevel0);
 | 
			
		||||
    connectClazyRadioButtonClicked(m_clazyChecks->clazyRadioLevel1);
 | 
			
		||||
    connectClazyRadioButtonClicked(m_clazyChecks->clazyRadioLevel2);
 | 
			
		||||
    connectClazyRadioButtonClicked(m_clazyChecks->clazyRadioLevel3);
 | 
			
		||||
 | 
			
		||||
    m_tidyChecks.reset(new CppTools::Ui::TidyChecks);
 | 
			
		||||
    m_tidyChecksWidget = new QWidget();
 | 
			
		||||
    m_tidyChecks->setupUi(m_tidyChecksWidget);
 | 
			
		||||
    connectClangTidyItemChanged();
 | 
			
		||||
 | 
			
		||||
    m_ui->pluginChecksTabs->addTab(m_tidyChecksWidget, tr("Clang-Tidy"));
 | 
			
		||||
    m_ui->pluginChecksTabs->addTab(m_clazyChecksWidget, tr("Clazy"));
 | 
			
		||||
    m_ui->pluginChecksTabs->setCurrentIndex(0);
 | 
			
		||||
    m_ui->tabWidget->addTab(m_clangBaseChecksWidget, tr("Clang"));
 | 
			
		||||
    m_ui->tabWidget->addTab(m_tidyChecksWidget, tr("Clang-Tidy"));
 | 
			
		||||
    m_ui->tabWidget->addTab(m_clazyChecksWidget, tr("Clazy"));
 | 
			
		||||
    m_ui->tabWidget->setCurrentIndex(0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
} // CppTools namespace
 | 
			
		||||
 
 | 
			
		||||
@@ -35,12 +35,16 @@
 | 
			
		||||
 | 
			
		||||
#include <memory>
 | 
			
		||||
 | 
			
		||||
QT_FORWARD_DECLARE_CLASS(QListWidgetItem)
 | 
			
		||||
QT_BEGIN_NAMESPACE
 | 
			
		||||
class QListWidgetItem;
 | 
			
		||||
class QRadioButton;
 | 
			
		||||
QT_END_NAMESPACE
 | 
			
		||||
 | 
			
		||||
namespace CppTools {
 | 
			
		||||
 | 
			
		||||
namespace Ui {
 | 
			
		||||
class ClangDiagnosticConfigsWidget;
 | 
			
		||||
class ClangBaseChecks;
 | 
			
		||||
class ClazyChecks;
 | 
			
		||||
class TidyChecks;
 | 
			
		||||
}
 | 
			
		||||
@@ -67,12 +71,13 @@ signals:
 | 
			
		||||
    void customConfigsChanged(const CppTools::ClangDiagnosticConfigs &customConfigs);
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    void setupPluginsWidgets();
 | 
			
		||||
    void setupTabs();
 | 
			
		||||
 | 
			
		||||
    void onCurrentConfigChanged(int);
 | 
			
		||||
    void onCopyButtonClicked();
 | 
			
		||||
    void onRemoveButtonClicked();
 | 
			
		||||
    void onClangTidyItemChanged(QListWidgetItem *item);
 | 
			
		||||
    void onClazyRadioButtonChanged(bool checked);
 | 
			
		||||
 | 
			
		||||
    void onDiagnosticOptionsEdited();
 | 
			
		||||
 | 
			
		||||
@@ -82,7 +87,6 @@ private:
 | 
			
		||||
    void syncClangTidyWidgets(const ClangDiagnosticConfig &config);
 | 
			
		||||
    void syncClazyWidgets(const ClangDiagnosticConfig &config);
 | 
			
		||||
 | 
			
		||||
    void setClazyLevelDescription(int index);
 | 
			
		||||
    void updateConfig(const CppTools::ClangDiagnosticConfig &config);
 | 
			
		||||
 | 
			
		||||
    bool isConfigChooserEmpty() const;
 | 
			
		||||
@@ -94,6 +98,8 @@ private:
 | 
			
		||||
    void connectClangTidyItemChanged();
 | 
			
		||||
    void disconnectClangTidyItemChanged();
 | 
			
		||||
 | 
			
		||||
    void connectClazyRadioButtonClicked(QRadioButton *button);
 | 
			
		||||
 | 
			
		||||
    void connectConfigChooserCurrentIndex();
 | 
			
		||||
    void disconnectConfigChooserCurrentIndex();
 | 
			
		||||
    void connectDiagnosticOptionsChanged();
 | 
			
		||||
@@ -104,6 +110,9 @@ private:
 | 
			
		||||
    ClangDiagnosticConfigsModel m_diagnosticConfigsModel;
 | 
			
		||||
    QHash<Core::Id, QString> m_notAcceptedOptions;
 | 
			
		||||
 | 
			
		||||
    std::unique_ptr<CppTools::Ui::ClangBaseChecks> m_clangBaseChecks;
 | 
			
		||||
    QWidget *m_clangBaseChecksWidget = nullptr;
 | 
			
		||||
 | 
			
		||||
    std::unique_ptr<CppTools::Ui::ClazyChecks> m_clazyChecks;
 | 
			
		||||
    QWidget *m_clazyChecksWidget = nullptr;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -13,16 +13,9 @@
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>Form</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <layout class="QVBoxLayout" name="verticalLayout">
 | 
			
		||||
  <layout class="QVBoxLayout" name="verticalLayout_2">
 | 
			
		||||
   <item>
 | 
			
		||||
    <layout class="QHBoxLayout" name="horizontalLayout">
 | 
			
		||||
     <item>
 | 
			
		||||
      <widget class="QLabel" name="label_2">
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>Configuration to use:</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </widget>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
      <widget class="QComboBox" name="configChooserComboBox">
 | 
			
		||||
       <property name="sizePolicy">
 | 
			
		||||
@@ -50,66 +43,49 @@
 | 
			
		||||
    </layout>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <layout class="QHBoxLayout" name="horizontalLayout_2">
 | 
			
		||||
    <layout class="QVBoxLayout" name="verticalLayout">
 | 
			
		||||
     <item>
 | 
			
		||||
      <widget class="QLabel" name="validationResultIcon">
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>ValidationIcon</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </widget>
 | 
			
		||||
      <layout class="QHBoxLayout" name="horizontalLayout_2">
 | 
			
		||||
       <item>
 | 
			
		||||
        <widget class="QLabel" name="validationResultIcon">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>ValidationIcon</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item>
 | 
			
		||||
        <widget class="QLabel" name="validationResultLabel">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>ValidationText</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item>
 | 
			
		||||
        <spacer name="horizontalSpacer">
 | 
			
		||||
         <property name="orientation">
 | 
			
		||||
          <enum>Qt::Horizontal</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="sizeHint" stdset="0">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>40</width>
 | 
			
		||||
           <height>20</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
      <widget class="QLabel" name="validationResultLabel">
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>ValidationText</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </widget>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
      <spacer name="horizontalSpacer">
 | 
			
		||||
       <property name="orientation">
 | 
			
		||||
        <enum>Qt::Horizontal</enum>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="sizeHint" stdset="0">
 | 
			
		||||
        <size>
 | 
			
		||||
         <width>40</width>
 | 
			
		||||
         <height>20</height>
 | 
			
		||||
        </size>
 | 
			
		||||
       </property>
 | 
			
		||||
      </spacer>
 | 
			
		||||
      <widget class="QTabWidget" name="tabWidget"/>
 | 
			
		||||
     </item>
 | 
			
		||||
    </layout>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="CppTools::WrappableLineEdit" name="diagnosticOptionsTextEdit"/>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="QLabel" name="label">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>For appropriate options, consult the GCC or Clang manual pages or the <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">GCC online documentation</a>.</string>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="openExternalLinks">
 | 
			
		||||
      <bool>true</bool>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="QTabWidget" name="pluginChecksTabs"/>
 | 
			
		||||
   </item>
 | 
			
		||||
  </layout>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <customwidgets>
 | 
			
		||||
  <customwidget>
 | 
			
		||||
   <class>CppTools::WrappableLineEdit</class>
 | 
			
		||||
   <extends>QLineEdit</extends>
 | 
			
		||||
   <header location="global">cpptools/wrappablelineedit.h</header>
 | 
			
		||||
  </customwidget>
 | 
			
		||||
 </customwidgets>
 | 
			
		||||
 <tabstops>
 | 
			
		||||
  <tabstop>configChooserComboBox</tabstop>
 | 
			
		||||
  <tabstop>copyButton</tabstop>
 | 
			
		||||
  <tabstop>removeButton</tabstop>
 | 
			
		||||
  <tabstop>diagnosticOptionsTextEdit</tabstop>
 | 
			
		||||
 </tabstops>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections/>
 | 
			
		||||
 
 | 
			
		||||
@@ -6,8 +6,8 @@
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>503</width>
 | 
			
		||||
    <height>73</height>
 | 
			
		||||
    <width>609</width>
 | 
			
		||||
    <height>220</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="sizePolicy">
 | 
			
		||||
@@ -19,92 +19,73 @@
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>Form</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <layout class="QHBoxLayout" name="horizontalLayout">
 | 
			
		||||
   <property name="spacing">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="leftMargin">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="topMargin">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="rightMargin">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="bottomMargin">
 | 
			
		||||
    <number>0</number>
 | 
			
		||||
   </property>
 | 
			
		||||
  <layout class="QVBoxLayout" name="verticalLayout">
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="QComboBox" name="clazyLevel">
 | 
			
		||||
     <property name="sizePolicy">
 | 
			
		||||
      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
 | 
			
		||||
       <horstretch>0</horstretch>
 | 
			
		||||
       <verstretch>0</verstretch>
 | 
			
		||||
      </sizepolicy>
 | 
			
		||||
    <widget class="QLabel" name="label">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Each level adds checks to the previous level. For more information, see <a href="https://github.com/KDE/clazy">clazy's homepage</a>.</string>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="currentIndex">
 | 
			
		||||
      <number>0</number>
 | 
			
		||||
     <property name="openExternalLinks">
 | 
			
		||||
      <bool>true</bool>
 | 
			
		||||
     </property>
 | 
			
		||||
     <item>
 | 
			
		||||
      <property name="text">
 | 
			
		||||
       <string>Disable</string>
 | 
			
		||||
      </property>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
      <property name="text">
 | 
			
		||||
       <string>level0</string>
 | 
			
		||||
      </property>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
      <property name="text">
 | 
			
		||||
       <string>level1</string>
 | 
			
		||||
      </property>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
      <property name="text">
 | 
			
		||||
       <string>level2</string>
 | 
			
		||||
      </property>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
      <property name="text">
 | 
			
		||||
       <string>level3</string>
 | 
			
		||||
      </property>
 | 
			
		||||
     </item>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <layout class="QVBoxLayout" name="verticalLayout_2">
 | 
			
		||||
     <property name="leftMargin">
 | 
			
		||||
      <number>10</number>
 | 
			
		||||
    <widget class="QRadioButton" name="clazyRadioDisabled">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Disabled</string>
 | 
			
		||||
     </property>
 | 
			
		||||
     <item>
 | 
			
		||||
      <widget class="QLabel" name="levelDescription">
 | 
			
		||||
       <property name="sizePolicy">
 | 
			
		||||
        <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
 | 
			
		||||
         <horstretch>0</horstretch>
 | 
			
		||||
         <verstretch>0</verstretch>
 | 
			
		||||
        </sizepolicy>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string/>
 | 
			
		||||
       </property>
 | 
			
		||||
      </widget>
 | 
			
		||||
     </item>
 | 
			
		||||
    </layout>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <spacer name="horizontalSpacer">
 | 
			
		||||
     <property name="orientation">
 | 
			
		||||
      <enum>Qt::Horizontal</enum>
 | 
			
		||||
    <widget class="QRadioButton" name="clazyRadioLevel0">
 | 
			
		||||
     <property name="toolTip">
 | 
			
		||||
      <string/>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="sizeType">
 | 
			
		||||
      <enum>QSizePolicy::Expanding</enum>
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Level 0: No false positives</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="QRadioButton" name="clazyRadioLevel1">
 | 
			
		||||
     <property name="toolTip">
 | 
			
		||||
      <string/>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Level 1: Very few false positives</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="QRadioButton" name="clazyRadioLevel2">
 | 
			
		||||
     <property name="toolTip">
 | 
			
		||||
      <string/>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Level 2: More false positives</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <widget class="QRadioButton" name="clazyRadioLevel3">
 | 
			
		||||
     <property name="toolTip">
 | 
			
		||||
      <string>Not always correct, possibly very noisy, might require a knowledgeable developer to review, might have a very big rate of false-positives, might have bugs.</string>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Level 3: Experimental checks</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <spacer name="verticalSpacer">
 | 
			
		||||
     <property name="orientation">
 | 
			
		||||
      <enum>Qt::Vertical</enum>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="sizeHint" stdset="0">
 | 
			
		||||
      <size>
 | 
			
		||||
       <width>10</width>
 | 
			
		||||
       <height>20</height>
 | 
			
		||||
       <width>20</width>
 | 
			
		||||
       <height>34</height>
 | 
			
		||||
      </size>
 | 
			
		||||
     </property>
 | 
			
		||||
    </spacer>
 | 
			
		||||
 
 | 
			
		||||
@@ -106,7 +106,7 @@
 | 
			
		||||
      </sizepolicy>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="title">
 | 
			
		||||
      <string>Clang Code Model Warnings</string>
 | 
			
		||||
      <string>Clang Diagnostics</string>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="checkable">
 | 
			
		||||
      <bool>false</bool>
 | 
			
		||||
@@ -114,19 +114,6 @@
 | 
			
		||||
     <layout class="QVBoxLayout" name="verticalLayout_3"/>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <spacer name="verticalSpacer">
 | 
			
		||||
     <property name="orientation">
 | 
			
		||||
      <enum>Qt::Vertical</enum>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="sizeHint" stdset="0">
 | 
			
		||||
      <size>
 | 
			
		||||
       <width>20</width>
 | 
			
		||||
       <height>151</height>
 | 
			
		||||
      </size>
 | 
			
		||||
     </property>
 | 
			
		||||
    </spacer>
 | 
			
		||||
   </item>
 | 
			
		||||
  </layout>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 
 | 
			
		||||
@@ -191,6 +191,7 @@ FORMS += \
 | 
			
		||||
    cppcodemodelsettingspage.ui \
 | 
			
		||||
    cppcodestylesettingspage.ui \
 | 
			
		||||
    cppfilesettingspage.ui \
 | 
			
		||||
    clangbasechecks.ui \
 | 
			
		||||
    clazychecks.ui \
 | 
			
		||||
    tidychecks.ui
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -43,6 +43,7 @@ Project {
 | 
			
		||||
            "builtinindexingsupport.h",
 | 
			
		||||
            "builtincursorinfo.cpp",
 | 
			
		||||
            "builtincursorinfo.h",
 | 
			
		||||
            "clangbasechecks.ui",
 | 
			
		||||
            "clangdiagnosticconfig.cpp",
 | 
			
		||||
            "clangdiagnosticconfig.h",
 | 
			
		||||
            "clangdiagnosticconfigsmodel.cpp",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user