Commit b65b4e40 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use auto vs auto * where it's possible

parent d8722e3f
Pipeline #49631 failed with stage
in 12 minutes and 34 seconds
......@@ -24,7 +24,7 @@ KCMAkregatorAdvancedConfig::KCMAkregatorAdvancedConfig(QWidget *parent, const QV
: KCModule(parent, args)
, m_widget(new SettingsAdvanced(this))
{
auto *layout = new QVBoxLayout(this);
auto layout = new QVBoxLayout(this);
layout->addWidget(m_widget);
KAboutData *about = new KAboutData(QStringLiteral("kcmakradvancedconfig"),
i18n("Advanced Feed Reader Settings"),
......
......@@ -25,7 +25,7 @@ KCMAkregatorAppearanceConfig::KCMAkregatorAppearanceConfig(QWidget *parent, cons
{
m_ui.setupUi(m_widget);
auto *layout = new QVBoxLayout(this);
auto layout = new QVBoxLayout(this);
layout->addWidget(m_widget);
connect(m_ui.kcfg_UseCustomColors, &QAbstractButton::toggled, m_ui.kcfg_ColorUnreadArticles, &QWidget::setEnabled);
......
......@@ -24,7 +24,7 @@ KCMAkregatorArchiveConfig::KCMAkregatorArchiveConfig(QWidget *parent, const QVar
{
Ui::SettingsArchive m_ui;
m_ui.setupUi(m_widget);
auto *layout = new QVBoxLayout(this);
auto layout = new QVBoxLayout(this);
layout->addWidget(m_widget);
connect(m_ui.rb_LimitArticleNumber, &QAbstractButton::toggled, m_ui.kcfg_MaxArticleNumber, &QWidget::setEnabled);
......
......@@ -27,7 +27,7 @@ KCMAkregatorBrowserConfig::KCMAkregatorBrowserConfig(QWidget *parent, const QVar
Ui::SettingsBrowser ui;
ui.setupUi(m_widget);
auto *layout = new QVBoxLayout(this);
auto layout = new QVBoxLayout(this);
layout->addWidget(m_widget);
connect(ui.kcfg_ExternalBrowserUseCustomCommand, &QAbstractButton::toggled, ui.kcfg_ExternalBrowserCustomCommand, &QWidget::setEnabled);
......
......@@ -27,7 +27,7 @@ KCMAkregatorGeneralConfig::KCMAkregatorGeneralConfig(QWidget *parent, const QVar
Ui::SettingsGeneral ui;
ui.setupUi(m_widget);
auto *layout = new QVBoxLayout(this);
auto layout = new QVBoxLayout(this);
layout->addWidget(m_widget);
ui.kcfg_AutoFetchInterval->setSuffix(ki18np(" minute", " minutes"));
......
......@@ -20,7 +20,7 @@ K_PLUGIN_FACTORY(KCMAkregatorPluginsConfigFactory, registerPlugin<KCMAkregatorPl
KCMAkregatorPluginsConfig::KCMAkregatorPluginsConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
auto *lay = new QHBoxLayout(this);
auto lay = new QHBoxLayout(this);
lay->setContentsMargins({});
KAboutData *about = new KAboutData(QStringLiteral("kcmakrpluginsconfig"),
......
......@@ -21,7 +21,7 @@ K_PLUGIN_FACTORY(KCMAkregatorUserFeedBackConfigFactory, registerPlugin<KCMAkrega
KCMAkregatorUserFeedBackConfig::KCMAkregatorUserFeedBackConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
auto *lay = new QHBoxLayout(this);
auto lay = new QHBoxLayout(this);
lay->setContentsMargins({});
KAboutData *about = new KAboutData(QStringLiteral("kcmaddressbookuserfeedbackconfig"),
......
......@@ -91,7 +91,7 @@ void AkregatorPlugin::addFeed()
void AkregatorPlugin::readProperties(const KConfigGroup &config)
{
if (part()) {
auto *myPart = static_cast<Akregator::Part *>(part());
auto myPart = static_cast<Akregator::Part *>(part());
myPart->readProperties(config);
}
}
......@@ -99,7 +99,7 @@ void AkregatorPlugin::readProperties(const KConfigGroup &config)
void AkregatorPlugin::saveProperties(KConfigGroup &config)
{
if (part()) {
auto *myPart = static_cast<Akregator::Part *>(part());
auto myPart = static_cast<Akregator::Part *>(part());
myPart->saveProperties(config);
}
}
......
......@@ -246,7 +246,7 @@ void ActionManagerImpl::initMainWidget(MainWidget *mainWidget)
// toolbar / View
const auto viewMode = static_cast<MainWidget::ViewMode>(Settings::viewMode());
auto *group = new QActionGroup(this);
auto group = new QActionGroup(this);
action = coll->addAction(QStringLiteral("normal_view"));
action->setCheckable(true);
action->setChecked(viewMode == MainWidget::NormalView);
......
......@@ -50,7 +50,7 @@ AddFeedDialog::AddFeedDialog(QWidget *parent, const QString &name)
{
setObjectName(name);
setWindowTitle(i18nc("@title:window", "Add Feed"));
auto *mainLayout = new QVBoxLayout(this);
auto mainLayout = new QVBoxLayout(this);
widget = new AddFeedWidget(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
......
......@@ -159,7 +159,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &)
QDir().mkpath(path);
m_standardFeedList = path + QStringLiteral("/feeds.opml");
auto *dummyFactory = new Backend::StorageFactoryDummyImpl();
auto dummyFactory = new Backend::StorageFactoryDummyImpl();
if (!Backend::StorageFactoryRegistry::self()->registerFactory(dummyFactory, dummyFactory->key())) {
// There was already a dummy factory registered.
delete dummyFactory;
......@@ -273,7 +273,7 @@ void Part::slotOnShutdown()
void Part::initializeTrayIcon()
{
auto *trayIcon = new TrayIcon(m_mainWidget->window());
auto trayIcon = new TrayIcon(m_mainWidget->window());
TrayIcon::setInstance(trayIcon);
m_actionManager->setTrayIcon(trayIcon);
......
......@@ -129,13 +129,13 @@ void ArticleListView::setArticleModel(ArticleModel *model)
m_proxy->setSourceModel(model);
m_proxy->setSortRole(ArticleModel::SortRole);
m_proxy->setFilters(m_matchers);
auto *const proxy2 = new FilterDeletedProxyModel(model);
auto const proxy2 = new FilterDeletedProxyModel(model);
proxy2->setSortRole(ArticleModel::SortRole);
proxy2->setSourceModel(m_proxy);
connect(model, &QAbstractItemModel::rowsInserted, m_proxy.data(), &QSortFilterProxyModel::invalidate);
auto *const columnsProxy = new FilterColumnsProxyModel(model);
auto const columnsProxy = new FilterColumnsProxyModel(model);
columnsProxy->setSortRole(ArticleModel::SortRole);
columnsProxy->setSourceModel(proxy2);
columnsProxy->setColumnEnabled(ArticleModel::ItemTitleColumn);
......@@ -400,7 +400,7 @@ void ArticleListView::mousePressEvent(QMouseEvent *ev)
void ArticleListView::contextMenuEvent(QContextMenuEvent *event)
{
QWidget *w = ActionManager::getInstance()->container(QStringLiteral("article_popup"));
auto *popup = qobject_cast<QMenu *>(w);
auto popup = qobject_cast<QMenu *>(w);
if (popup) {
popup->exec(event->globalPos());
}
......
......@@ -57,7 +57,7 @@ ArticleViewerWebEngineWidgetNg::ArticleViewerWebEngineWidgetNg(KActionCollection
void ArticleViewerWebEngineWidgetNg::initializeLayout(KActionCollection *ac)
{
auto *layout = new QVBoxLayout(this);
auto layout = new QVBoxLayout(this);
layout->setContentsMargins({});
mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this);
......@@ -161,7 +161,7 @@ void ArticleViewerWebEngineWidgetNg::slotOpenInBrowser()
{
const QUrl currentUrl(mArticleViewerNg->url());
if (currentUrl.isLocalFile()) {
auto *job = new WebEngineViewer::WebEngineExportHtmlPageJob;
auto job = new WebEngineViewer::WebEngineExportHtmlPageJob;
job->setEngineView(mArticleViewerNg);
connect(job, &WebEngineViewer::WebEngineExportHtmlPageJob::failed, this, &ArticleViewerWebEngineWidgetNg::slotExportHtmlPageFailed);
connect(job, &WebEngineViewer::WebEngineExportHtmlPageJob::success, this, &ArticleViewerWebEngineWidgetNg::slotExportHtmlPageSuccess);
......
......@@ -46,7 +46,7 @@ ArticleViewerWidget::ArticleViewerWidget(const QString &grantleeDirectory, KActi
, m_articleViewerWidgetNg(new Akregator::ArticleViewerWebEngineWidgetNg(ac, this))
, m_grantleeDirectory(grantleeDirectory)
{
auto *layout = new QGridLayout(this);
auto layout = new QGridLayout(this);
layout->setContentsMargins({});
layout->addWidget(m_articleViewerWidgetNg);
m_articleHtmlWriter = new Akregator::ArticleHtmlWebEngineWriter(m_articleViewerWidgetNg->articleViewerNg(), this);
......
......@@ -50,7 +50,7 @@ void CreateFolderCommand::Private::doCreate()
return;
}
auto *parentFolder = qobject_cast<Folder *>(m_selectedSubscription);
auto parentFolder = qobject_cast<Folder *>(m_selectedSubscription);
if (!parentFolder) {
parentFolder = m_selectedSubscription ? m_selectedSubscription->parent() : nullptr;
}
......@@ -60,7 +60,7 @@ void CreateFolderCommand::Private::doCreate()
TreeNode *const after = (m_selectedSubscription && m_selectedSubscription->isGroup()) ? m_selectedSubscription : nullptr;
auto *const newFolder = new Folder(name);
auto const newFolder = new Folder(name);
parentFolder->insertChild(newFolder, after);
m_subscriptionListView->ensureNodeVisible(newFolder);
q->done();
......
......@@ -90,7 +90,7 @@ public:
private:
static DeleteSubscriptionJob *reallyCreateJob(TreeNode *node)
{
auto *job = new DeleteSubscriptionJob;
auto job = new DeleteSubscriptionJob;
job->setSubscriptionId(node->id());
return job;
}
......
......@@ -48,7 +48,7 @@ ExpireItemsCommand::Private::Private(ExpireItemsCommand *qq)
void ExpireItemsCommand::Private::addDeleteJobForFeed(Feed *feed)
{
Q_ASSERT(feed);
auto *job = new ArticleDeleteJob(q);
auto job = new ArticleDeleteJob(q);
connect(job, &ArticleDeleteJob::finished, q, [this](KJob *job) {
jobFinished(job);
});
......
......@@ -15,9 +15,9 @@ using namespace Akregator;
CrashWidget::CrashWidget(QWidget *parent)
: QWidget(parent)
{
auto *vbox = new QVBoxLayout(this);
auto vbox = new QVBoxLayout(this);
auto *labelLayout = new QHBoxLayout;
auto labelLayout = new QHBoxLayout;
QLabel *label = new QLabel(i18n("Akregator did not close correctly. Would you like to restore the previous session?"), this);
label->setObjectName(QStringLiteral("restoresessionlabel"));
label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
......@@ -30,7 +30,7 @@ CrashWidget::CrashWidget(QWidget *parent)
labelLayout->addWidget(label);
labelLayout->addStretch(0);
auto *buttonLayout = new QHBoxLayout;
auto buttonLayout = new QHBoxLayout;
vbox->addLayout(buttonLayout);
buttonLayout->addStretch(0);
......
......@@ -359,7 +359,7 @@ void Akregator::Feed::loadFavicon(const QString &url, bool downloadFavicon)
if (u.isLocalFile()) {
setFaviconLocalPath(u.toLocalFile());
} else {
auto *job = new Akregator::DownloadFeedIconJob(this);
auto job = new Akregator::DownloadFeedIconJob(this);
job->setFeedIconUrl(u);
job->setDownloadFavicon(downloadFavicon);
connect(job, &DownloadFeedIconJob::result, this, [this](const QString &fileName) {
......@@ -585,7 +585,7 @@ QDomElement Akregator::Feed::toOPML(QDomElement parent, QDomDocument document) c
KJob *Akregator::Feed::createMarkAsReadJob()
{
auto *job = new ArticleModifyJob;
auto job = new ArticleModifyJob;
const auto arts = articles();
for (const Article &i : arts) {
const ArticleId aid = {xmlUrl(), i.guid()};
......
......@@ -587,7 +587,7 @@ void FeedListManagementImpl::removeFeed(const QString &url, const QString &catId
if (lastcatid == i->parent()->id()) {
if (i->xmlUrl().compare(url) == 0) {
qCDebug(AKREGATOR_LOG) << "id:" << i->id();
auto *job = new DeleteSubscriptionJob;
auto job = new DeleteSubscriptionJob;
job->setSubscriptionId(i->id());
job->start();
}
......
......@@ -60,7 +60,7 @@ FeedPropertiesDialog::FeedPropertiesDialog(QWidget *parent, const QString &name)
{
setObjectName(name);
setWindowTitle(i18nc("@title:window", "Feed Properties"));
auto *mainLayout = new QVBoxLayout(this);
auto mainLayout = new QVBoxLayout(this);
widget = new FeedPropertiesWidget(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
......
......@@ -302,7 +302,7 @@ void Folder::updateUnreadCount() const
KJob *Folder::createMarkAsReadJob()
{
auto *job = new CompositeJob;
auto job = new CompositeJob;
const auto f = feeds();
for (Feed *const i : f) {
job->addSubjob(i->createMarkAsReadJob());
......@@ -456,7 +456,7 @@ QList<TreeNode *> Folder::namedChildren(const QString &title)
if (child->title() == title) {
nodeList.append(child);
}
auto *const fld = qobject_cast<Folder *>(child);
auto const fld = qobject_cast<Folder *>(child);
if (fld) {
nodeList += fld->namedChildren(title);
}
......
......@@ -134,7 +134,7 @@ QString GrantleeViewFormatter::formatArticles(const QVector<Article> &article, A
QList<ArticleGrantleeObject *> lstObj;
lstObj.reserve(nbArticles);
for (int i = 0; i < nbArticles; ++i) {
auto *articleObj = new ArticleGrantleeObject(article.at(i), icon);
auto articleObj = new ArticleGrantleeObject(article.at(i), icon);
articlesList << QVariant::fromValue(static_cast<QObject *>(articleObj));
lstObj.append(articleObj);
}
......
......@@ -16,7 +16,7 @@ MainFrame::MainFrame(QWidget *parent, QWidget *visibleWidget)
: Frame(parent)
{
setRemovable(false);
auto *layout = new QGridLayout(this);
auto layout = new QGridLayout(this);
layout->setContentsMargins({});
layout->addWidget(visibleWidget, 0, 0);
}
......
......@@ -17,10 +17,10 @@ using namespace Akregator;
WebEngineFrame::WebEngineFrame(KActionCollection *ac, QWidget *parent)
: Frame(parent)
{
auto *layout = new QVBoxLayout(this);
auto layout = new QVBoxLayout(this);
layout->setContentsMargins({});
setRemovable(true);
auto *viewer = new Akregator::AkrWebEngineViewer(ac, this);
auto viewer = new Akregator::AkrWebEngineViewer(ac, this);
mArticleViewerWidgetNg = new Akregator::ArticleViewerWebEngineWidgetNg(viewer, ac, this);
connect(mArticleViewerWidgetNg->articleViewerNg(), &ArticleViewerWebEngine::titleChanged, this, &WebEngineFrame::slotTitleChanged);
......@@ -79,7 +79,7 @@ QUrl WebEngineFrame::url() const
void WebEngineFrame::loadUrl(const QUrl &url)
{
auto *job = new KIO::FavIconRequestJob(url);
auto job = new KIO::FavIconRequestJob(url);
connect(job, &KIO::FavIconRequestJob::result, this, [job, this](KJob *) {
if (!job->error()) {
Q_EMIT signalIconChanged(this, QIcon(job->iconFile()));
......
......@@ -25,7 +25,7 @@ bool DownloadFeedIconJob::start()
return false;
}
auto *job = new KIO::FavIconRequestJob(mFeedIconUrl);
auto job = new KIO::FavIconRequestJob(mFeedIconUrl);
if (!mDownloadFavicon) {
job->setIconUrl(mFeedIconUrl);
}
......
......@@ -87,7 +87,7 @@ int main(int argc, char **argv)
#ifdef WITH_KUSERFEEDBACK
if (cmdArgs->isSet(QStringLiteral("feedback"))) {
auto *userFeedBack = new Akregator::AkregatorUserFeedbackProvider(nullptr);
auto userFeedBack = new Akregator::AkregatorUserFeedbackProvider(nullptr);
QTextStream(stdout) << userFeedBack->describeDataSources() << '\n';
delete userFeedBack;
return 0;
......
......@@ -98,7 +98,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
connect(m_part, &Part::signalSettingsChanged, m_actionManager, &ActionManagerImpl::slotSettingsChanged);
auto *lt = new QVBoxLayout(this);
auto lt = new QVBoxLayout(this);
lt->setContentsMargins({});
m_horizontalSplitter = new QSplitter(Qt::Horizontal, this);
......@@ -152,7 +152,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
m_mainTab->setObjectName(QStringLiteral("Article Tab"));
m_mainTab->setWhatsThis(i18n("Articles list."));
auto *mainTabLayout = new QVBoxLayout(m_mainTab);
auto mainTabLayout = new QVBoxLayout(m_mainTab);
mainTabLayout->setContentsMargins({});
m_searchBar = new SearchBar(m_mainTab);
......@@ -165,7 +165,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
m_articleSplitter->setChildrenCollapsible(false);
m_articleWidget = new QWidget(m_articleSplitter);
auto *articleWidgetLayout = new QVBoxLayout;
auto articleWidgetLayout = new QVBoxLayout;
m_articleWidget->setLayout(articleWidgetLayout);
articleWidgetLayout->setContentsMargins({});
articleWidgetLayout->setSpacing(0);
......@@ -183,7 +183,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
connect(m_part, &Part::signalSettingsChanged, m_selectionController, &AbstractSelectionController::settingsChanged);
auto *expansionHandler = new FolderExpansionHandler(this);
auto expansionHandler = new FolderExpansionHandler(this);
connect(m_feedListView, &QTreeView::expanded, expansionHandler, &FolderExpansionHandler::itemExpanded);
connect(m_feedListView, &QTreeView::collapsed, expansionHandler, &FolderExpansionHandler::itemCollapsed);
......@@ -350,7 +350,7 @@ void MainWidget::connectFrame(Akregator::WebEngineFrame *frame)
void MainWidget::slotRequestNewFrame(int &frameId)
{
auto *frame = new WebEngineFrame(m_actionManager->actionCollection(), m_tabWidget);
auto frame = new WebEngineFrame(m_actionManager->actionCollection(), m_tabWidget);
connectFrame(frame);
Kernel::self()->frameManager()->slotAddFrame(frame);
......@@ -413,7 +413,7 @@ void MainWidget::sendArticle(const QByteArray &text, const QString &title, bool
void MainWidget::importFeedList(const QDomDocument &doc)
{
auto *cmd = new ImportFeedListCommand;
auto cmd = new ImportFeedListCommand;
cmd->setParentWidget(this);
cmd->setFeedListDocument(doc);
cmd->setTargetList(m_feedList);
......@@ -451,7 +451,7 @@ void MainWidget::deleteExpiredArticles(const QSharedPointer<FeedList> &list)
if (!list) {
return;
}
auto *cmd = new ExpireItemsCommand(this);
auto cmd = new ExpireItemsCommand(this);
cmd->setParentWidget(this);
cmd->setFeedList(list);
cmd->setFeeds(list->feedIds());
......@@ -485,7 +485,7 @@ void MainWidget::addFeedToGroup(const QString &url, const QString &groupName)
}
if (!group) {
auto *g = new Folder(groupName);
auto g = new Folder(groupName);
m_feedList->allFeedsFolder()->appendChild(g);
group = g;
}
......@@ -615,7 +615,7 @@ void MainWidget::slotMoveCurrentNodeRight()
TreeNode *prev = current->prevSibling();
if (prev && prev->isGroup()) {
auto *fg = static_cast<Folder *>(prev);
auto fg = static_cast<Folder *>(prev);
current->parent()->removeChild(current);
fg->appendChild(current);
m_feedListView->ensureNodeVisible(current);
......@@ -697,7 +697,7 @@ void MainWidget::addFeed(const QString &url, TreeNode *after, Folder *parent, bo
void MainWidget::slotFeedAddGroup()
{
auto *cmd = new CreateFolderCommand(this);
auto cmd = new CreateFolderCommand(this);
cmd->setParentWidget(this);
cmd->setSelectedSubscription(m_selectionController->selectedSubscription());
cmd->setRootFolder(m_feedList->allFeedsFolder());
......@@ -714,7 +714,7 @@ void MainWidget::slotFeedRemove()
return;
}
auto *cmd = new DeleteSubscriptionCommand(this);
auto cmd = new DeleteSubscriptionCommand(this);
cmd->setParentWidget(this);
cmd->setSubscription(m_feedList, selectedNode->id());
cmd->start();
......@@ -726,7 +726,7 @@ void MainWidget::slotFeedModify()
if (!node) {
return;
}
auto *cmd = new EditSubscriptionCommand(this);
auto cmd = new EditSubscriptionCommand(this);
cmd->setParentWidget(this);
cmd->setSubscription(m_feedList, node->id());
cmd->setSubscriptionListView(m_feedListView);
......@@ -849,7 +849,7 @@ void MainWidget::slotArticleSelected(const Akregator::Article &article)
QVector<Article> articles = m_selectionController->selectedArticles();
Q_EMIT signalArticlesSelected(articles);
auto *const maai = qobject_cast<KToggleAction *>(m_actionManager->action(QStringLiteral("article_set_status_important")));
auto const maai = qobject_cast<KToggleAction *>(m_actionManager->action(QStringLiteral("article_set_status_important")));
Q_ASSERT(maai);
maai->setChecked(article.keep());
......@@ -871,7 +871,7 @@ void MainWidget::slotArticleSelected(const Akregator::Article &article)
if (delay > 0) {
m_markReadTimer->start(delay * 1000);
} else {
auto *job = new Akregator::ArticleModifyJob;
auto job = new Akregator::ArticleModifyJob;
const Akregator::ArticleId aid = {article.feed()->xmlUrl(), article.guid()};
job->setStatus(aid, Akregator::Read);
job->start();
......@@ -1049,7 +1049,7 @@ void MainWidget::slotArticleDelete()
selected->setNotificationMode(false);
}
auto *job = new Akregator::ArticleDeleteJob;
auto job = new Akregator::ArticleDeleteJob;
for (const Akregator::Article &i : articles) {
Feed *const feed = i.feed();
if (!feed) {
......@@ -1088,7 +1088,7 @@ void MainWidget::slotArticleToggleKeepFlag(bool)
}
}
auto *job = new Akregator::ArticleModifyJob;
auto job = new Akregator::ArticleModifyJob;
for (const Akregator::Article &i : articles) {
const Akregator::ArticleId aid = {i.feed()->xmlUrl(), i.guid()};
job->setKeep(aid, !allFlagsSet);
......@@ -1101,7 +1101,7 @@ namespace
void setArticleStatus(const QString &feedUrl, const QString &articleId, int status)
{
if (!feedUrl.isEmpty() && !articleId.isEmpty()) {
auto *job = new Akregator::ArticleModifyJob;
auto job = new Akregator::ArticleModifyJob;
const Akregator::ArticleId aid = {feedUrl, articleId};
job->setStatus(aid, status);
job->start();
......@@ -1116,7 +1116,7 @@ void setSelectedArticleStatus(const Akregator::AbstractSelectionController *cont
return;
}
auto *job = new Akregator::ArticleModifyJob;
auto job = new Akregator::ArticleModifyJob;
for (const Akregator::Article &i : articles) {
const Akregator::ArticleId aid = {i.feed()->xmlUrl(), i.guid()};
job->setStatus(aid, status);
......@@ -1148,7 +1148,7 @@ void MainWidget::slotSetCurrentArticleReadDelayed()
return;
}
auto *const job = new Akregator::ArticleModifyJob;
auto const job = new Akregator::ArticleModifyJob;
const Akregator::ArticleId aid = {article.feed()->xmlUrl(), article.guid()};
job->setStatus(aid, Akregator::Read);
job->start();
......@@ -1171,7 +1171,7 @@ void MainWidget::readProperties(const KConfigGroup &config)
const QStringList childList = config.readEntry(QStringLiteral("Children"), QStringList());
int currentFrameId = -1;
for (const QString &framePrefix : childList) {
auto *const frame = new WebEngineFrame(m_actionManager->actionCollection(), m_tabWidget);
auto const frame = new WebEngineFrame(m_actionManager->actionCollection(), m_tabWidget);
frame->loadConfig(config, framePrefix + QLatin1Char('_'));
connectFrame(frame);
......@@ -1249,7 +1249,7 @@ void MainWidget::slotArticleAction(Akregator::ArticleViewerWebEngine::ArticleAct
{
switch (type) {
case ArticleViewerWebEngine::DeleteAction: {
auto *job = new Akregator::ArticleDeleteJob;
auto job = new Akregator::ArticleDeleteJob;
const Akregator::ArticleId aid = {feed, articleId};
job->appendArticleId(aid);
job->start();
......@@ -1263,7 +1263,7 @@ void MainWidget::slotArticleAction(Akregator::ArticleViewerWebEngine::ArticleAct
break;
case ArticleViewerWebEngine::MarkAsImportant: {
auto *job = new Akregator::ArticleModifyJob;
auto job = new Akregator::ArticleModifyJob;
const Akregator::Article article = m_feedList->findArticle(feed, articleId);
const Akregator::ArticleId aid = {feed, articleId};
job->setKeep(aid, !article.keep());
......
......@@ -100,7 +100,7 @@ bool MainWindow::loadPart()
void MainWindow::setupProgressWidgets()
{
auto *progressStatusBarWidget = new KPIM::ProgressStatusBarWidget(statusBar(), this);
auto progressStatusBarWidget = new KPIM::ProgressStatusBarWidget(statusBar(), this);
statusBar()->addPermanentWidget(progressStatusBarWidget->littleProgress(), 0);
}
......
......@@ -165,7 +165,7 @@ void SelectionController::setFeedList(const QSharedPointer<FeedList> &list)
}
m_feedList = list;
auto *m = qobject_cast<SubscriptionListModel *>(m_subscriptionModel->sourceModel());
auto m = qobject_cast<SubscriptionListModel *>(m_subscriptionModel->sourceModel());
std::unique_ptr<SubscriptionListModel> oldModel(m);
m_subscriptionModel->setSourceModel(new SubscriptionListModel(m_feedList, this));
......@@ -242,7 +242,7 @@ void SelectionController::subscriptionDataChanged(const QModelIndex &topLeft, co
}
// need access to setExpanded
auto *tv = qobject_cast<QTreeView *>(m_feedSelector);
auto tv = qobject_cast<QTreeView *>(m_feedSelector);
if (!tv) {
qCCritical(AKREGATOR_LOG) << "Unable to cast m_feedSelector to QTreeView";
return;
......@@ -302,7 +302,7 @@ void SelectionController::subscriptionContextMenuRequested(const QPoint &point)
}
QWidget *w = ActionManager::getInstance()->container(node->isGroup() ? QStringLiteral("feedgroup_popup") : QStringLiteral("feeds_popup"));
auto *popup = qobject_cast<QMenu *>(w);
auto popup = qobject_cast<QMenu *>(w);
if (popup) {
const QPoint globalPos = m_feedSelector->viewport()->mapToGlobal(point);
popup->exec(globalPos);
......
......@@ -75,7 +75,7 @@ void Akregator::SubscriptionListDelegate::initStyleOption(QStyleOptionViewItem *
return;
}
auto *view = static_cast<QTreeView *>(parent());
auto