Verified Commit 7dc7713e authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Use modernize-use-auto clang-tidy fixits for imported classes

parent 2a94fe45
Pipeline #69948 canceled with stage
......@@ -62,21 +62,21 @@ DialogPrivate::DialogPrivate(Dialog *parent)
KPageWidgetItem *DialogPrivate::createPageItem(KPageWidgetItem *parentItem, const QString &name, const QString &comment, const QString &iconName)
{
Q_Q(Dialog);
QWidget *page = new QWidget(q);
auto page = new QWidget(q);
QLabel *iconLabel = new QLabel(page);
QLabel *commentLabel = new QLabel(comment, page);
auto iconLabel = new QLabel(page);
auto commentLabel = new QLabel(comment, page);
commentLabel->setTextFormat(Qt::RichText);
QVBoxLayout *layout = new QVBoxLayout(page);
auto layout = new QVBoxLayout(page);
layout->addWidget(iconLabel);
layout->addWidget(commentLabel);
layout->addStretch();
KPageWidgetItem *item = new KPageWidgetItem(page, name);
auto item = new KPageWidgetItem(page, name);
item->setIcon(QIcon::fromTheme(iconName));
iconLabel->setPixmap(item->icon().pixmap(128, 128));
const KPageWidgetModel *model = qobject_cast<const KPageWidgetModel *>(q->pageWidget()->model());
const auto model = qobject_cast<const KPageWidgetModel *>(q->pageWidget()->model());
Q_ASSERT(model);
if (parentItem) {
......
......@@ -196,7 +196,7 @@ void KCMultiDialogPrivate::init()
q->setWindowTitle(i18n("Configure"));
q->setModal(false);
QDialogButtonBox *buttonBox = new QDialogButtonBox(q);
auto buttonBox = new QDialogButtonBox(q);
buttonBox->setStandardButtons(QDialogButtonBox::Help | QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Cancel | QDialogButtonBox::Apply
| QDialogButtonBox::Close | QDialogButtonBox::Ok | QDialogButtonBox::Reset);
KGuiItem::assign(buttonBox->button(QDialogButtonBox::Ok), KStandardGuiItem::ok());
......@@ -399,10 +399,10 @@ KPageWidgetItem *KCMultiDialog::addModule(const KPluginMetaData &metaData, KPage
moduleScroll->setFrameStyle(QFrame::NoFrame);
moduleScroll->viewport()->setAutoFillBackground(false);
KCModuleProxy *kcm = new KCModuleProxy(metaData, moduleScroll, QStringList());
auto kcm = new KCModuleProxy(metaData, moduleScroll, QStringList());
moduleScroll->setWidget(kcm);
KPageWidgetItem *item = new KPageWidgetItem(moduleScroll, metaData.name());
auto item = new KPageWidgetItem(moduleScroll, metaData.name());
KCMultiDialogPrivate::CreatedModule createdModule;
createdModule.kcm = kcm;
......@@ -421,7 +421,7 @@ KPageWidgetItem *KCMultiDialog::addModule(const KPluginMetaData &metaData, KPage
item->setIcon(QIcon::fromTheme(metaData.iconName()));
}
bool updateCurrentPage = false;
const KPageWidgetModel *model = qobject_cast<const KPageWidgetModel *>(pageWidget()->model());
const auto model = qobject_cast<const KPageWidgetModel *>(pageWidget()->model());
Q_ASSERT(model);
if (parent) {
addSubPage(parent, item);
......
Supports Markdown
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