Commit 86ff5a00 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use auto directly

parent dd4909a8
Pipeline #45597 passed with stage
in 9 minutes and 53 seconds
...@@ -34,7 +34,7 @@ ConfigureCustomSettingWidget::ConfigureCustomSettingWidget(QWidget *parent) ...@@ -34,7 +34,7 @@ ConfigureCustomSettingWidget::ConfigureCustomSettingWidget(QWidget *parent)
{ {
auto vbox = new QVBoxLayout(this); auto vbox = new QVBoxLayout(this);
QLabel *lab = new QLabel(i18n("Category:"), this); auto lab = new QLabel(i18n("Category:"), this);
lab->setObjectName(QStringLiteral("category_label")); lab->setObjectName(QStringLiteral("category_label"));
mCategoryLineEdit = new KLineEdit(this); mCategoryLineEdit = new KLineEdit(this);
mCategoryLineEdit->setTrapReturnKey(true); mCategoryLineEdit->setTrapReturnKey(true);
......
...@@ -36,7 +36,7 @@ CustomDebugSettingsPage::CustomDebugSettingsPage(QWidget *parent) ...@@ -36,7 +36,7 @@ CustomDebugSettingsPage::CustomDebugSettingsPage(QWidget *parent)
{ {
auto mainLayout = new QVBoxLayout(this); auto mainLayout = new QVBoxLayout(this);
QLabel *lab = new QLabel(i18n("Rules:"), this); auto lab = new QLabel(i18n("Rules:"), this);
lab->setObjectName(QStringLiteral("custom_label")); lab->setObjectName(QStringLiteral("custom_label"));
mainLayout->addWidget(lab); mainLayout->addWidget(lab);
......
...@@ -28,7 +28,7 @@ EnvironmentSettingsRulesPage::EnvironmentSettingsRulesPage(QWidget *parent) ...@@ -28,7 +28,7 @@ EnvironmentSettingsRulesPage::EnvironmentSettingsRulesPage(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
auto mainLayout = new QVBoxLayout(this); auto mainLayout = new QVBoxLayout(this);
QLabel *lab = new QLabel(i18n("Rules:"), this); auto lab = new QLabel(i18n("Rules:"), this);
lab->setObjectName(QStringLiteral("label")); lab->setObjectName(QStringLiteral("label"));
mRichTextEdit = new EnvironmentPlainTextEdit(this); mRichTextEdit = new EnvironmentPlainTextEdit(this);
mRichTextEdit->setReadOnly(true); mRichTextEdit->setReadOnly(true);
......
...@@ -101,7 +101,7 @@ void GroupManagementWidget::init() ...@@ -101,7 +101,7 @@ void GroupManagementWidget::init()
return; return;
} }
for (const QString &file : groups) { for (const QString &file : groups) {
QListWidgetItem *item = new QListWidgetItem(file, mListWidget); auto item = new QListWidgetItem(file, mListWidget);
const QString fullPath = groupPath + QLatin1Char('/') + file; const QString fullPath = groupPath + QLatin1Char('/') + file;
item->setData(FullPathRole, fullPath); item->setData(FullPathRole, fullPath);
} }
......
...@@ -76,7 +76,7 @@ KDebugSettingsDialog::KDebugSettingsDialog(QWidget *parent) ...@@ -76,7 +76,7 @@ KDebugSettingsDialog::KDebugSettingsDialog(QWidget *parent)
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Apply, this); auto buttonBox = new QDialogButtonBox(QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Apply, this);
buttonBox->setObjectName(QStringLiteral("buttonbox")); buttonBox->setObjectName(QStringLiteral("buttonbox"));
SaveToolButton *saveAs = new SaveToolButton(this); auto saveAs = new SaveToolButton(this);
saveAs->setText(i18n("Save As...")); saveAs->setText(i18n("Save As..."));
saveAs->setObjectName(QStringLiteral("saveas_button")); saveAs->setObjectName(QStringLiteral("saveas_button"));
buttonBox->addButton(saveAs, QDialogButtonBox::ActionRole); buttonBox->addButton(saveAs, QDialogButtonBox::ActionRole);
...@@ -91,7 +91,7 @@ KDebugSettingsDialog::KDebugSettingsDialog(QWidget *parent) ...@@ -91,7 +91,7 @@ KDebugSettingsDialog::KDebugSettingsDialog(QWidget *parent)
connect(mLoadToolButton, &LoadToolButton::manageGroupRequested, this, &KDebugSettingsDialog::slotManageGroup); connect(mLoadToolButton, &LoadToolButton::manageGroupRequested, this, &KDebugSettingsDialog::slotManageGroup);
connect(this, &KDebugSettingsDialog::updateLoadGroupMenu, mLoadToolButton, &LoadToolButton::updateLoadGroupMenu); connect(this, &KDebugSettingsDialog::updateLoadGroupMenu, mLoadToolButton, &LoadToolButton::updateLoadGroupMenu);
QPushButton *insertCategories = new QPushButton(i18n("Insert..."), this); auto insertCategories = new QPushButton(i18n("Insert..."), this);
insertCategories->setObjectName(QStringLiteral("insert_button")); insertCategories->setObjectName(QStringLiteral("insert_button"));
buttonBox->addButton(insertCategories, QDialogButtonBox::ActionRole); buttonBox->addButton(insertCategories, QDialogButtonBox::ActionRole);
connect(insertCategories, &QPushButton::clicked, this, &KDebugSettingsDialog::slotInsertCategories); connect(insertCategories, &QPushButton::clicked, this, &KDebugSettingsDialog::slotInsertCategories);
......
...@@ -28,7 +28,7 @@ LoadToolButton::LoadToolButton(QWidget *parent) ...@@ -28,7 +28,7 @@ LoadToolButton::LoadToolButton(QWidget *parent)
{ {
setPopupMode(QToolButton::InstantPopup); setPopupMode(QToolButton::InstantPopup);
setText(i18n("Load...")); setText(i18n("Load..."));
QMenu *mainMenu = new QMenu(this); auto mainMenu = new QMenu(this);
setMenu(mainMenu); setMenu(mainMenu);
QAction *act = mainMenu->addAction(i18n("Load From File...")); QAction *act = mainMenu->addAction(i18n("Load From File..."));
......
...@@ -27,7 +27,7 @@ SaveToolButton::SaveToolButton(QWidget *parent) ...@@ -27,7 +27,7 @@ SaveToolButton::SaveToolButton(QWidget *parent)
{ {
setText(i18n("Save As...")); setText(i18n("Save As..."));
setPopupMode(QToolButton::InstantPopup); setPopupMode(QToolButton::InstantPopup);
QMenu *mainMenu = new QMenu(this); auto mainMenu = new QMenu(this);
setMenu(mainMenu); setMenu(mainMenu);
QAction *act = mainMenu->addAction(i18n("Save As File...")); QAction *act = mainMenu->addAction(i18n("Save As File..."));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment