forked from qt-creator/qt-creator
ClangFormat: Get rid of ui files
- new clangformatchecks files are generated based on utils/layoutbuilder Change-Id: Ie376755abc632083898e44ea57d2ff8600e47f34 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -9,21 +9,21 @@
|
||||
#include "clangformatsettings.h"
|
||||
#include "clangformatutils.h"
|
||||
|
||||
// the file was generated by scripts/generateClangFormatChecksUI.py
|
||||
#include "ui_clangformatchecks.h"
|
||||
// the file was generated by scripts/generateClangFormatChecksLayout.py
|
||||
#include "clangformatchecks.h"
|
||||
|
||||
#include <clang/Format/Format.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <cppeditor/cpphighlighter.h>
|
||||
#include <cppeditor/cppcodestylepreferences.h>
|
||||
#include <cppeditor/cppcodestylesettings.h>
|
||||
#include <cppeditor/cppcodestylesnippets.h>
|
||||
#include <cppeditor/cpphighlighter.h>
|
||||
#include <cppeditor/cpptoolssettings.h>
|
||||
#include <cppeditor/cppcodestylepreferences.h>
|
||||
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/editorconfiguration.h>
|
||||
#include <projectexplorer/project.h>
|
||||
|
||||
#include <texteditor/displaysettings.h>
|
||||
#include <texteditor/icodestylepreferences.h>
|
||||
@@ -34,9 +34,13 @@
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QSharedPointer>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWeakPointer>
|
||||
#include <QWidget>
|
||||
|
||||
#include <sstream>
|
||||
@@ -60,16 +64,14 @@ ClangFormatConfigWidget::ClangFormatConfigWidget(TextEditor::ICodeStylePreferenc
|
||||
QWidget *parent)
|
||||
: CppCodeStyleWidget(parent)
|
||||
, m_project(project)
|
||||
, m_checks(std::make_unique<Ui::ClangFormatChecksWidget>())
|
||||
{
|
||||
m_config = std::make_unique<ClangFormatFile>(filePathToCurrentSettings(codeStyle->currentPreferences()));
|
||||
|
||||
resize(489, 305);
|
||||
m_fallbackConfig = new QLabel(tr("Clang-Format Style"));
|
||||
m_checksScrollArea = new QScrollArea();
|
||||
m_checksWidget = new QWidget;
|
||||
m_checksWidget = new ClangFormatChecks();
|
||||
|
||||
m_checks->setupUi(m_checksWidget);
|
||||
m_checksScrollArea->setWidget(m_checksWidget);
|
||||
m_checksScrollArea->setMaximumWidth(600);
|
||||
m_checksWidget->setEnabled(!codeStyle->isReadOnly());
|
||||
@@ -94,7 +96,7 @@ ClangFormatConfigWidget::ClangFormatConfigWidget(TextEditor::ICodeStylePreferenc
|
||||
|
||||
Column {
|
||||
m_fallbackConfig,
|
||||
Row { m_checksScrollArea, m_preview }
|
||||
Row { m_checksScrollArea, m_preview },
|
||||
}.attachTo(this);
|
||||
|
||||
connect(codeStyle, &TextEditor::ICodeStylePreferences::currentPreferencesChanged,
|
||||
|
||||
Reference in New Issue
Block a user