diff --git a/src/config/clangtidypreferences.cpp b/src/config/clangtidypreferences.cpp index 8bb495b2ae..9e35ee3221 100644 --- a/src/config/clangtidypreferences.cpp +++ b/src/config/clangtidypreferences.cpp @@ -1,72 +1,69 @@ /* * This file is part of KDevelop * * Copyright 2016 Carlos Nihelton * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. */ #include "config/clangtidypreferences.h" #include "clangtidyconfig.h" #include "config/configgroup.h" #include "ui_clangtidypreferences.h" #include using KDevelop::IPlugin; using ClangTidy::ConfigGroup; using KDevelop::ConfigPage; ClangTidyPreferences::ClangTidyPreferences(IPlugin* plugin, QWidget* parent) : ConfigPage(plugin, ClangTidySettings::self(), parent) { - QVBoxLayout* layout = new QVBoxLayout(this); - QWidget* widget = new QWidget(this); ui = new Ui::ClangTidyPreferences(); - ui->setupUi(widget); - layout->addWidget(widget); + ui->setupUi(this); } ClangTidyPreferences::~ClangTidyPreferences() { delete ui; } ConfigPage::ConfigPageType ClangTidyPreferences::configPageType() const { return ConfigPage::AnalyzerConfigPage; } QString ClangTidyPreferences::name() const { return i18n("Clang-Tidy"); } QString ClangTidyPreferences::fullName() const { return i18n("Configure clang-tidy settings"); } QIcon ClangTidyPreferences::icon() const { return QIcon::fromTheme(QStringLiteral("dialog-ok")); } void ClangTidyPreferences::apply() { ConfigGroup configGroup = KSharedConfig::openConfig()->group("ClangTidy"); configGroup.writeEntry(ConfigGroup::ExecutablePath, ui->kcfg_clangtidyPath->text()); } diff --git a/src/config/clangtidypreferences.ui b/src/config/clangtidypreferences.ui index 4500a31ca3..cec7712c1a 100644 --- a/src/config/clangtidypreferences.ui +++ b/src/config/clangtidypreferences.ui @@ -1,75 +1,87 @@ ClangTidyPreferences 0 0 400 300 Clang-Tidy Settings - + + + 0 + + + 0 + + + 0 + + + 0 + Paths Clang-&tidy executable: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter kcfg_clangtidyPath Qt::Vertical 20 186 KUrlRequester QFrame
kurlrequester.h
1