summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-02-11 07:43:56 +0100
committerLaurent Montel <[email protected]>2018-02-11 07:43:56 +0100
commitef009f5f4b51290b2b3af63a587c4eaf841bb799 (patch)
treecb31790ff8a53d613b010f05410d80caf5ad7d65
parent920bc5d66a7ee3b51270b05a2a3256026e3d95ba (diff)
Fix warning
-rw-r--r--src/actions/actionmanager.cpp2
-rw-r--r--src/actions/actionmanagerimpl.cpp20
-rw-r--r--src/addfeeddialog.cpp2
-rw-r--r--src/addfeeddialog.h2
-rw-r--r--src/akregator_part.h2
-rw-r--r--src/article.cpp10
-rw-r--r--src/articlelistview.h2
-rw-r--r--src/articlematcher.h2
-rw-r--r--src/articlemodel.h2
-rw-r--r--src/articleviewer-ng/webengine/articleviewerwebenginepage.h2
-rw-r--r--src/articleviewerwidget.cpp4
-rw-r--r--src/articleviewerwidget.h2
-rw-r--r--src/command/createfeedcommand.cpp8
-rw-r--r--src/command/createfeedcommand.h2
-rw-r--r--src/command/createfoldercommand.cpp3
-rw-r--r--src/command/createfoldercommand.h2
-rw-r--r--src/command/deletesubscriptioncommand.cpp4
-rw-r--r--src/command/deletesubscriptioncommand.h2
-rw-r--r--src/command/editsubscriptioncommand.cpp2
-rw-r--r--src/command/editsubscriptioncommand.h2
-rw-r--r--src/command/expireitemscommand.h2
-rw-r--r--src/command/importfeedlistcommand.h2
-rw-r--r--src/command/loadfeedlistcommand.h2
-rw-r--r--src/dummystorage/storagedummyimpl.cpp4
-rw-r--r--src/feed/feed.cpp10
-rw-r--r--src/feed/feedlist.cpp14
-rw-r--r--src/feed/feedpropertiesdialog.h2
-rw-r--r--src/fetchqueue.cpp2
-rw-r--r--src/folder.cpp12
-rw-r--r--src/folder.h2
-rw-r--r--src/formatter/defaultcombinedviewformatter.h2
-rw-r--r--src/formatter/defaultnormalviewformatter.h2
-rw-r--r--src/frame/frame.cpp8
-rw-r--r--src/frame/mainframe.h2
-rw-r--r--src/frame/webengine/akrwebengineviewer.h2
-rw-r--r--src/frame/webengine/webengineframe.h2
-rw-r--r--src/job/downloadarticlejob.cpp4
-rw-r--r--src/kernel.cpp6
-rw-r--r--src/main.cpp4
-rw-r--r--src/mainwindow.h2
-rw-r--r--src/notificationmanager.cpp6
-rw-r--r--src/pluginmanager.cpp6
-rw-r--r--src/progressmanager.cpp16
-rw-r--r--src/selectioncontroller.cpp8
-rw-r--r--src/selectioncontroller.h2
-rw-r--r--src/subscription/subscriptionlistdelegate.cpp2
-rw-r--r--src/subscription/subscriptionlistdelegate.h2
-rw-r--r--src/subscription/subscriptionlistmodel.cpp4
-rw-r--r--src/subscription/subscriptionlistview.h2
-rw-r--r--src/tabwidget.cpp2
-rw-r--r--src/tabwidget.h2
-rw-r--r--src/treenode.cpp6
-rw-r--r--src/urlhandler/webengine/urlhandlerwebengine.h6
53 files changed, 112 insertions, 115 deletions
diff --git a/src/actions/actionmanager.cpp b/src/actions/actionmanager.cpp
index 9c10032..3a36659 100644
--- a/src/actions/actionmanager.cpp
+++ b/src/actions/actionmanager.cpp
@@ -25,7 +25,7 @@
#include "actionmanager.h"
using namespace Akregator;
-ActionManager *ActionManager::m_self = 0;
+ActionManager *ActionManager::m_self = nullptr;
ActionManager *ActionManager::getInstance()
{
diff --git a/src/actions/actionmanagerimpl.cpp b/src/actions/actionmanagerimpl.cpp
index 44d56fe..d02a038 100644
--- a/src/actions/actionmanagerimpl.cpp
+++ b/src/actions/actionmanagerimpl.cpp
@@ -143,7 +143,7 @@ void ActionManagerImpl::slotSettingsChanged()
void ActionManagerImpl::slotNodeSelected(TreeNode *node)
{
- if (node != 0) {
+ if (node) {
d->nodeSelectVisitor->visit(node);
}
}
@@ -154,12 +154,12 @@ ActionManagerImpl::ActionManagerImpl(Part *part, QObject *parent)
{
d->nodeSelectVisitor = new NodeSelectVisitor(this);
d->part = part;
- d->subscriptionListView = 0;
- d->articleList = 0;
- d->trayIcon = 0;
- d->mainWidget = 0;
- d->tabWidget = 0;
- d->tagMenu = 0;
+ d->subscriptionListView = nullptr;
+ d->articleList = nullptr;
+ d->trayIcon = nullptr;
+ d->mainWidget = nullptr;
+ d->tabWidget = nullptr;
+ d->tagMenu = nullptr;
d->actionCollection = part->actionCollection();
d->shareServiceManager = new PimCommon::ShareServiceUrlManager(this);
initPart();
@@ -169,13 +169,13 @@ ActionManagerImpl::~ActionManagerImpl()
{
delete d->nodeSelectVisitor;
delete d;
- d = 0;
+ d = nullptr;
}
void ActionManagerImpl::setTrayIcon(TrayIcon *trayIcon)
{
- if (trayIcon == 0) {
- d->trayIcon = 0;
+ if (trayIcon == nullptr) {
+ d->trayIcon = nullptr;
return;
}
if (d->trayIcon) {
diff --git a/src/addfeeddialog.cpp b/src/addfeeddialog.cpp
index 0181bf6..13903b4 100644
--- a/src/addfeeddialog.cpp
+++ b/src/addfeeddialog.cpp
@@ -64,7 +64,7 @@ Feed *AddFeedDialog::feed() const
AddFeedDialog::AddFeedDialog(QWidget *parent, const QString &name)
: QDialog(parent)
- , m_feed(0)
+ , m_feed(nullptr)
{
setObjectName(name);
setWindowTitle(i18n("Add Feed"));
diff --git a/src/addfeeddialog.h b/src/addfeeddialog.h
index 4550460..44b5a52 100644
--- a/src/addfeeddialog.h
+++ b/src/addfeeddialog.h
@@ -47,7 +47,7 @@ class AddFeedDialog : public QDialog
Q_OBJECT
public:
explicit AddFeedDialog(QWidget *parent = nullptr, const QString &name = QString());
- ~AddFeedDialog();
+ ~AddFeedDialog() override;
QSize sizeHint() const override;
diff --git a/src/akregator_part.h b/src/akregator_part.h
index 5d83d3c..17d5917 100644
--- a/src/akregator_part.h
+++ b/src/akregator_part.h
@@ -81,7 +81,7 @@ public:
Part(QWidget *parentWidget, QObject *parent, const QVariantList &);
/** Destructor. */
- ~Part();
+ ~Part() override;
/**
Opens feedlist
diff --git a/src/article.cpp b/src/article.cpp
index 0677b74..6b808db 100644
--- a/src/article.cpp
+++ b/src/article.cpp
@@ -156,8 +156,8 @@ private:
}
Article::Private::Private()
- : feed(0)
- , archive(0)
+ : feed(nullptr)
+ , archive(nullptr)
, status(0)
, hash(0)
, pubDate(QDateTime::fromTime_t(1))
@@ -265,13 +265,13 @@ Article::Article(const ItemPtr &article, Feed *feed) : d(new Private(article, fe
{
}
-Article::Article(const ItemPtr &article, Backend::FeedStorage *archive) : d(new Private(article, 0, archive))
+Article::Article(const ItemPtr &article, Backend::FeedStorage *archive) : d(new Private(article, nullptr, archive))
{
}
bool Article::isNull() const
{
- return d->archive == 0; // TODO: use proper null state
+ return d->archive == nullptr; // TODO: use proper null state
}
void Article::offsetPubDate(int secs)
@@ -310,7 +310,7 @@ Article::~Article()
{
if (d->deref()) {
delete d;
- d = 0;
+ d = nullptr;
}
}
diff --git a/src/articlelistview.h b/src/articlelistview.h
index 943d25d..88d903f 100644
--- a/src/articlelistview.h
+++ b/src/articlelistview.h
@@ -83,7 +83,7 @@ class AKREGATORPART_EXPORT ArticleListView : public QTreeView, public ArticleLis
public:
explicit ArticleListView(QWidget *parent = nullptr);
- ~ArticleListView();
+ ~ArticleListView() override;
//impl ArticleLister
void setArticleModel(Akregator::ArticleModel *model) override;
diff --git a/src/articlematcher.h b/src/articlematcher.h
index 63abc99..3aefadf 100644
--- a/src/articlematcher.h
+++ b/src/articlematcher.h
@@ -79,7 +79,7 @@ public:
ArticleMatcher();
ArticleMatcher(const QVector<Criterion> &criteria, Association assoc);
- ~ArticleMatcher();
+ ~ArticleMatcher() override;
bool matches(const Article &article) const override;
bool operator==(const AbstractMatcher &other) const override;
diff --git a/src/articlemodel.h b/src/articlemodel.h
index 2cdf7e7..6b00167 100644
--- a/src/articlemodel.h
+++ b/src/articlemodel.h
@@ -67,7 +67,7 @@ public:
};
explicit ArticleModel(const QVector<Article> &articles, QObject *parent = nullptr);
- ~ArticleModel();
+ ~ArticleModel() override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
diff --git a/src/articleviewer-ng/webengine/articleviewerwebenginepage.h b/src/articleviewer-ng/webengine/articleviewerwebenginepage.h
index b82f8cb..66cd648 100644
--- a/src/articleviewer-ng/webengine/articleviewerwebenginepage.h
+++ b/src/articleviewer-ng/webengine/articleviewerwebenginepage.h
@@ -27,7 +27,7 @@ class ArticleViewerWebEnginePage : public WebEngineViewer::WebEnginePage
Q_OBJECT
public:
explicit ArticleViewerWebEnginePage(QWebEngineProfile *profile, QObject *parent = nullptr);
- ~ArticleViewerWebEnginePage();
+ ~ArticleViewerWebEnginePage() override;
Q_SIGNALS:
void urlClicked(const QUrl &url);
diff --git a/src/articleviewerwidget.cpp b/src/articleviewerwidget.cpp
index ff2f720..f3d6123 100644
--- a/src/articleviewerwidget.cpp
+++ b/src/articleviewerwidget.cpp
@@ -197,7 +197,7 @@ void ArticleViewerWidget::showArticle(const Akregator::Article &article)
m_viewMode = NormalView;
disconnectFromNode(m_node);
m_article = article;
- m_node = 0;
+ m_node = nullptr;
m_link = article.link();
if (article.feed()->loadLinkedWebsite()) {
openUrl(article.link());
@@ -301,7 +301,7 @@ void ArticleViewerWidget::slotArticlesRemoved(TreeNode * /*node*/, const QVector
void ArticleViewerWidget::slotClear()
{
disconnectFromNode(m_node);
- m_node = 0;
+ m_node = nullptr;
m_article = Article();
m_articles.clear();
diff --git a/src/articleviewerwidget.h b/src/articleviewerwidget.h
index 4da4778..c564eec 100644
--- a/src/articleviewerwidget.h
+++ b/src/articleviewerwidget.h
@@ -55,7 +55,7 @@ class AKREGATOR_EXPORT ArticleViewerWidget : public QWidget
Q_OBJECT
public:
explicit ArticleViewerWidget(const QString &grantleeDirectory, KActionCollection *ac, QWidget *parent);
- ~ArticleViewerWidget();
+ ~ArticleViewerWidget() override;
/** Repaints the view. */
void reload();
diff --git a/src/command/createfeedcommand.cpp b/src/command/createfeedcommand.cpp
index b10969c..44b9c55 100644
--- a/src/command/createfeedcommand.cpp
+++ b/src/command/createfeedcommand.cpp
@@ -61,10 +61,10 @@ public:
CreateFeedCommand::Private::Private(CreateFeedCommand *qq)
: q(qq)
- , m_rootFolder(0)
- , m_subscriptionListView(0)
- , m_parentFolder(0)
- , m_after(0)
+ , m_rootFolder(nullptr)
+ , m_subscriptionListView(nullptr)
+ , m_parentFolder(nullptr)
+ , m_after(nullptr)
, m_autoexec(false)
{
}
diff --git a/src/command/createfeedcommand.h b/src/command/createfeedcommand.h
index 8962d3d..01c8416 100644
--- a/src/command/createfeedcommand.h
+++ b/src/command/createfeedcommand.h
@@ -38,7 +38,7 @@ class CreateFeedCommand : public Command
Q_OBJECT
public:
explicit CreateFeedCommand(MainWidget *parent = nullptr);
- ~CreateFeedCommand();
+ ~CreateFeedCommand() override;
void setSubscriptionListView(SubscriptionListView *view);
void setRootFolder(Folder *rootFolder);
diff --git a/src/command/createfoldercommand.cpp b/src/command/createfoldercommand.cpp
index ef388b5..c6fc05f 100644
--- a/src/command/createfoldercommand.cpp
+++ b/src/command/createfoldercommand.cpp
@@ -51,9 +51,6 @@ public:
CreateFolderCommand::Private::Private(CreateFolderCommand *qq)
: q(qq)
- , m_selectedSubscription(0)
- , m_rootFolder(0)
- , m_subscriptionListView(0)
{
}
diff --git a/src/command/createfoldercommand.h b/src/command/createfoldercommand.h
index 8560b4d..0affd7b 100644
--- a/src/command/createfoldercommand.h
+++ b/src/command/createfoldercommand.h
@@ -37,7 +37,7 @@ class CreateFolderCommand : public Command
Q_OBJECT
public:
explicit CreateFolderCommand(QObject *parent = nullptr);
- ~CreateFolderCommand();
+ ~CreateFolderCommand() override;
void setSubscriptionListView(SubscriptionListView *view);
void setSelectedSubscription(TreeNode *selected);
diff --git a/src/command/deletesubscriptioncommand.cpp b/src/command/deletesubscriptioncommand.cpp
index 1545f74..c0ad33f 100644
--- a/src/command/deletesubscriptioncommand.cpp
+++ b/src/command/deletesubscriptioncommand.cpp
@@ -43,7 +43,7 @@ class DeleteNodeVisitor : public TreeNodeVisitor
{
public:
explicit DeleteNodeVisitor(QWidget *parent) : m_widget(parent)
- , m_job(0)
+ , m_job(nullptr)
{
}
@@ -92,7 +92,7 @@ public:
DeleteSubscriptionJob *createJob(TreeNode *node)
{
- m_job = 0;
+ m_job = nullptr;
if (node) {
visit(node);
}
diff --git a/src/command/deletesubscriptioncommand.h b/src/command/deletesubscriptioncommand.h
index a395ccf..8d48995 100644
--- a/src/command/deletesubscriptioncommand.h
+++ b/src/command/deletesubscriptioncommand.h
@@ -37,7 +37,7 @@ class DeleteSubscriptionCommand : public Command
Q_OBJECT
public:
explicit DeleteSubscriptionCommand(QObject *parent = nullptr);
- ~DeleteSubscriptionCommand();
+ ~DeleteSubscriptionCommand() override;
void setSubscription(const QWeakPointer<FeedList> &feedList, int subId);
diff --git a/src/command/editsubscriptioncommand.cpp b/src/command/editsubscriptioncommand.cpp
index 64944a8..3ec4833 100644
--- a/src/command/editsubscriptioncommand.cpp
+++ b/src/command/editsubscriptioncommand.cpp
@@ -91,7 +91,7 @@ public:
EditSubscriptionCommand::Private::Private(EditSubscriptionCommand *qq) : q(qq)
, m_list()
, m_subscriptionId(-1)
- , m_subscriptionListView(0)
+ , m_subscriptionListView(nullptr)
{
}
diff --git a/src/command/editsubscriptioncommand.h b/src/command/editsubscriptioncommand.h
index 7e57d66..81b7231 100644
--- a/src/command/editsubscriptioncommand.h
+++ b/src/command/editsubscriptioncommand.h
@@ -38,7 +38,7 @@ class EditSubscriptionCommand : public Command
Q_OBJECT
public:
explicit EditSubscriptionCommand(QObject *parent = nullptr);
- ~EditSubscriptionCommand();
+ ~EditSubscriptionCommand() override;
void setSubscription(const QSharedPointer<FeedList> &feedList, int subId);
int subscriptionId() const;
diff --git a/src/command/expireitemscommand.h b/src/command/expireitemscommand.h
index 612e223..653b779 100644
--- a/src/command/expireitemscommand.h
+++ b/src/command/expireitemscommand.h
@@ -39,7 +39,7 @@ class ExpireItemsCommand : public Command
Q_OBJECT
public:
explicit ExpireItemsCommand(QObject *parent = nullptr);
- ~ExpireItemsCommand();
+ ~ExpireItemsCommand() override;
void setFeedList(const QWeakPointer<FeedList> &feedList);
QWeakPointer<FeedList> feedList() const;
diff --git a/src/command/importfeedlistcommand.h b/src/command/importfeedlistcommand.h
index c16c93b..05fd631 100644
--- a/src/command/importfeedlistcommand.h
+++ b/src/command/importfeedlistcommand.h
@@ -39,7 +39,7 @@ class ImportFeedListCommand : public Command
Q_OBJECT
public:
explicit ImportFeedListCommand(QObject *parent = nullptr);
- ~ImportFeedListCommand();
+ ~ImportFeedListCommand() override;
void setTargetList(const QWeakPointer<FeedList> &feedList);
diff --git a/src/command/loadfeedlistcommand.h b/src/command/loadfeedlistcommand.h
index e041077..20fb556 100644
--- a/src/command/loadfeedlistcommand.h
+++ b/src/command/loadfeedlistcommand.h
@@ -43,7 +43,7 @@ class LoadFeedListCommand : public Command
Q_OBJECT
public:
explicit LoadFeedListCommand(QObject *parent = nullptr);
- ~LoadFeedListCommand();
+ ~LoadFeedListCommand() override;
void setFileName(const QString &fileName);
void setDefaultFeedList(const QDomDocument &doc);
diff --git a/src/dummystorage/storagedummyimpl.cpp b/src/dummystorage/storagedummyimpl.cpp
index b7a1539..7089177 100644
--- a/src/dummystorage/storagedummyimpl.cpp
+++ b/src/dummystorage/storagedummyimpl.cpp
@@ -48,7 +48,7 @@ public:
entry.unread = unread;
entry.totalCount = totalCount;
entry.lastFetch = lastFetch;
- entry.feedStorage = 0;
+ entry.feedStorage = nullptr;
feeds[url] = entry;
}
@@ -64,7 +64,7 @@ StorageDummyImpl::StorageDummyImpl() : d(new StorageDummyImplPrivate)
StorageDummyImpl::~StorageDummyImpl()
{
delete d;
- d = 0;
+ d = nullptr;
}
void StorageDummyImpl::initialize(const QStringList &)
diff --git a/src/feed/feed.cpp b/src/feed/feed.cpp
index 310a66d..62edfba 100644
--- a/src/feed/feed.cpp
+++ b/src/feed/feed.cpp
@@ -314,9 +314,9 @@ Akregator::Feed::Private::Private(Backend::Storage *storage_, Akregator::Feed *q
, fetchErrorCode(Syndication::Success)
, fetchTries(0)
, followDiscovery(false)
- , loader(0)
+ , loader(nullptr)
, articlesLoaded(false)
- , archive(0)
+ , archive(nullptr)
, totalCount(-1)
{
Q_ASSERT(q);
@@ -333,7 +333,7 @@ Akregator::Feed::~Feed()
slotAbortFetch();
emitSignalDestroyed();
delete d;
- d = 0;
+ d = nullptr;
}
void Akregator::Feed::loadFavicon(const QUrl &url)
@@ -393,7 +393,7 @@ bool Akregator::Feed::markImmediatelyAsRead() const
bool Akregator::Feed::isFetching() const
{
- return d->loader != 0;
+ return d->loader != nullptr;
}
void Akregator::Feed::setMarkImmediatelyAsRead(bool enabled)
@@ -692,7 +692,7 @@ void Akregator::Feed::slotImageFetched(const QPixmap &image)
void Akregator::Feed::fetchCompleted(Syndication::Loader *l, Syndication::FeedPtr doc, Syndication::ErrorCode status)
{
// Note that loader instances delete themselves
- d->loader = 0;
+ d->loader = nullptr;
// fetching wasn't successful:
if (status != Syndication::Success) {
diff --git a/src/feed/feedlist.cpp b/src/feed/feedlist.cpp
index 3801fb6..ab87ad8 100644
--- a/src/feed/feedlist.cpp
+++ b/src/feed/feedlist.cpp
@@ -166,7 +166,7 @@ private:
FeedList::Private::Private(Backend::Storage *st, FeedList *qq)
: q(qq)
, storage(st)
- , rootNode(0)
+ , rootNode(nullptr)
, addNodeVisitor(new AddNodeVisitor(q))
, removeNodeVisitor(new RemoveNodeVisitor(q))
, unreadCache(-1)
@@ -175,7 +175,7 @@ FeedList::Private::Private(Backend::Storage *st, FeedList *qq)
}
FeedList::FeedList(Backend::Storage *storage)
- : QObject(0)
+ : QObject(nullptr)
, d(new Private(storage, this))
{
Folder *rootNode = new Folder(i18n("All Feeds"));
@@ -310,7 +310,7 @@ bool FeedList::readFromOpml(const QDomDocument &doc)
FeedList::~FeedList()
{
Q_EMIT signalDestroyed(this);
- setRootNode(0);
+ setRootNode(nullptr);
delete d->addNodeVisitor;
delete d->removeNodeVisitor;
delete d;
@@ -322,7 +322,7 @@ const Feed *FeedList::findByURL(const QString &feedURL) const
return nullptr;
}
const QList<Feed *> &v = d->urlMap[feedURL];
- return !v.isEmpty() ? v.front() : 0;
+ return !v.isEmpty() ? v.front() : nullptr;
}
Feed *FeedList::findByURL(const QString &feedURL)
@@ -331,7 +331,7 @@ Feed *FeedList::findByURL(const QString &feedURL)
return nullptr;
}
const QList<Feed *> &v = d->urlMap[feedURL];
- return !v.isEmpty() ? v.front() : 0;
+ return !v.isEmpty() ? v.front() : nullptr;
}
const Article FeedList::findArticle(const QString &feedURL, const QString &guid) const
@@ -417,7 +417,7 @@ Folder *FeedList::allFeedsFolder()
bool FeedList::isEmpty() const
{
- return d->rootNode->firstChild() == 0;
+ return d->rootNode->firstChild() == nullptr;
}
void FeedList::rootNodeChanged()
@@ -504,7 +504,7 @@ void FeedList::addToFetchQueue(FetchQueue *qu, bool intervalOnly)
KJob *FeedList::createMarkAsReadJob()
{
- return d->rootNode ? d->rootNode->createMarkAsReadJob() : 0;
+ return d->rootNode ? d->rootNode->createMarkAsReadJob() : nullptr;
}
FeedListManagementImpl::FeedListManagementImpl(const QSharedPointer<FeedList> &list) : m_feedList(list)
diff --git a/src/feed/feedpropertiesdialog.h b/src/feed/feedpropertiesdialog.h
index 69bef88..ba7705d 100644
--- a/src/feed/feedpropertiesdialog.h
+++ b/src/feed/feedpropertiesdialog.h
@@ -58,7 +58,7 @@ class FeedPropertiesDialog : public QDialog
Q_OBJECT
public:
explicit FeedPropertiesDialog(QWidget *parent = nullptr, const QString &name = QString());
- ~FeedPropertiesDialog();
+ ~FeedPropertiesDialog() override;
void setFeed(Feed *feed);
diff --git a/src/fetchqueue.cpp b/src/fetchqueue.cpp
index 952cf5f..0a3dd1c 100644
--- a/src/fetchqueue.cpp
+++ b/src/fetchqueue.cpp
@@ -51,7 +51,7 @@ FetchQueue::~FetchQueue()
{
slotAbort();
delete d;
- d = 0;
+ d = nullptr;
}
void FetchQueue::slotAbort()
diff --git a/src/folder.cpp b/src/folder.cpp
index 2b15aa8..5dd57ef 100644
--- a/src/folder.cpp
+++ b/src/folder.cpp
@@ -114,7 +114,7 @@ Folder::Folder(const QString &title) : TreeNode()
Folder::~Folder()
{
delete d;
- d = 0;
+ d = nullptr;
}
QVector<Article> Folder::articles()
@@ -284,7 +284,7 @@ void Folder::removeChild(TreeNode *node)
}
Q_EMIT signalAboutToRemoveChild(node);
- node->setParent(0);
+ node->setParent(nullptr);
d->children.removeOne(node);
disconnectFromNode(node);
updateUnreadCount();
@@ -296,22 +296,22 @@ void Folder::removeChild(TreeNode *node)
TreeNode *Folder::firstChild()
{
- return d->children.isEmpty() ? 0 : children().first();
+ return d->children.isEmpty() ? nullptr : children().first();
}
const TreeNode *Folder::firstChild() const
{
- return d->children.isEmpty() ? 0 : children().first();
+ return d->children.isEmpty() ? nullptr : children().first();
}
TreeNode *Folder::lastChild()
{
- return d->children.isEmpty() ? 0 : children().last();
+ return d->children.isEmpty() ? nullptr : children().last();
}
const TreeNode *Folder::lastChild() const
{
- return d->children.isEmpty() ? 0 : children().last();
+ return d->children.isEmpty() ? nullptr : children().last();
}
bool Folder::isOpen() const
diff --git a/src/folder.h b/src/folder.h
index 5a1159a..2e6a48a 100644
--- a/src/folder.h
+++ b/src/folder.h
@@ -55,7 +55,7 @@ public:
*/
explicit Folder(const QString &title = QString());
- ~Folder();
+ ~Folder() override;
bool accept(TreeNodeVisitor *visitor) override;
diff --git a/src/formatter/defaultcombinedviewformatter.h b/src/formatter/defaultcombinedviewformatter.h
index 9f1a568..1d38b59 100644
--- a/src/formatter/defaultcombinedviewformatter.h
+++ b/src/formatter/defaultcombinedviewformatter.h
@@ -29,7 +29,7 @@ class AKREGATOR_EXPORT DefaultCombinedViewFormatter : public ArticleFormatter
{
public:
explicit DefaultCombinedViewFormatter(const QString &grantleeDirectory, const QUrl &imageDir, QPaintDevice *device = nullptr);
- ~DefaultCombinedViewFormatter();
+ ~DefaultCombinedViewFormatter() override;
QString formatArticles(const QVector<Article> &articles, IconOption option) const override;
diff --git a/src/formatter/defaultnormalviewformatter.h b/src/formatter/defaultnormalviewformatter.h
index 77770bd..893763a 100644
--- a/src/formatter/defaultnormalviewformatter.h
+++ b/src/formatter/defaultnormalviewformatter.h
@@ -31,7 +31,7 @@ class AKREGATOR_EXPORT DefaultNormalViewFormatter : public ArticleFormatter
public:
explicit DefaultNormalViewFormatter(const QString &grantleeDirectory, const QUrl &imageDir, QPaintDevice *device = nullptr);
- ~DefaultNormalViewFormatter();
+ ~DefaultNormalViewFormatter() override;
QString formatArticles(const QVector<Article> &article, IconOption option) const override;
diff --git a/src/frame/frame.cpp b/src/frame/frame.cpp
index 3b23107..42ab2e6 100644
--- a/src/frame/frame.cpp
+++ b/src/frame/frame.cpp
@@ -38,7 +38,7 @@ Frame::Frame(QWidget *parent)
m_title = i18n("Untitled");
m_state = Idle;
m_progress = -1;
- m_progressItem = 0;
+ m_progressItem = nullptr;
m_isRemovable = true;
m_loading = false;
m_id = m_idCounter++;
@@ -76,7 +76,7 @@ void Frame::slotSetStatusText(const QString &s)
void Frame::slotSetProgress(int a)
{
if (m_progressItem) {
- m_progressItem->setProgress((int)a);
+ m_progressItem->setProgress(static_cast<int>(a));
}
m_progress = a;
Q_EMIT signalLoadingProgress(this, a);
@@ -179,7 +179,7 @@ void Frame::slotSetCanceled(const QString &s)
if (m_progressItem) {
m_progressItem->setStatus(i18n("Loading canceled"));
m_progressItem->setComplete();
- m_progressItem = 0;
+ m_progressItem = nullptr;
}
m_state = Canceled;
Q_EMIT signalCanceled(this, s);
@@ -191,7 +191,7 @@ void Frame::slotSetCompleted()
if (m_progressItem) {
m_progressItem->setStatus(i18n("Loading completed"));
m_progressItem->setComplete();
- m_progressItem = 0;
+ m_progressItem = nullptr;
}
m_state = Completed;
Q_EMIT signalCompleted(this);
diff --git a/src/frame/mainframe.h b/src/frame/mainframe.h
index 60c3a0c..f67938b 100644
--- a/src/frame/mainframe.h
+++ b/src/frame/mainframe.h
@@ -31,7 +31,7 @@ class AKREGATOR_EXPORT MainFrame : public Frame
public:
explicit MainFrame(QWidget *parent, QWidget *widget);
- virtual ~MainFrame();
+ ~MainFrame() override;
QUrl url() const override;
diff --git a/src/frame/webengine/akrwebengineviewer.h b/src/frame/webengine/akrwebengineviewer.h
index 552f677..4c6af75 100644
--- a/src/frame/webengine/akrwebengineviewer.h
+++ b/src/frame/webengine/akrwebengineviewer.h
@@ -29,7 +29,7 @@ class AkrWebEngineViewer : public ArticleViewerWebEngine
Q_OBJECT
public:
explicit AkrWebEngineViewer(KActionCollection *ac, QWidget *parent = nullptr);
- ~AkrWebEngineViewer();
+ ~AkrWebEngineViewer() override;
protected:
void displayContextMenu(const QPoint &pos) override;
diff --git a/src/frame/webengine/webengineframe.h b/src/frame/webengine/webengineframe.h
index 4f6086d..eb55b7e 100644
--- a/src/frame/webengine/webengineframe.h
+++ b/src/frame/webengine/webengineframe.h
@@ -30,7 +30,7 @@ class AKREGATORPART_EXPORT WebEngineFrame : public Frame
Q_OBJECT
public:
explicit WebEngineFrame(KActionCollection *ac, QWidget *parent = nullptr);
- ~WebEngineFrame();
+ ~WebEngineFrame() override;
QUrl url() const override;
bool openUrl(const OpenUrlRequest &request) override;
diff --git a/src/job/downloadarticlejob.cpp b/src/job/downloadarticlejob.cpp
index f2e0ff1..9a3e9f5 100644
--- a/src/job/downloadarticlejob.cpp
+++ b/src/job/downloadarticlejob.cpp
@@ -33,7 +33,7 @@ DownloadArticleJob::~DownloadArticleJob()
{
if (mAttachmentTemporaryFile) {
mAttachmentTemporaryFile->removeTempFiles();
- mAttachmentTemporaryFile = 0;
+ mAttachmentTemporaryFile = nullptr;
}
}
@@ -42,7 +42,7 @@ void DownloadArticleJob::forceCleanupTemporaryFile()
if (mAttachmentTemporaryFile) {
mAttachmentTemporaryFile->forceCleanTempFiles();
delete mAttachmentTemporaryFile;
- mAttachmentTemporaryFile = 0;
+ mAttachmentTemporaryFile = nullptr;
}
}
diff --git a/src/kernel.cpp b/src/kernel.cpp
index 6bacb69..2ec453f 100644
--- a/src/kernel.cpp
+++ b/src/kernel.cpp
@@ -30,7 +30,7 @@
using namespace Akregator;
-Kernel *Kernel::m_self = 0;
+Kernel *Kernel::m_self = nullptr;
Kernel *Kernel::self()
{
@@ -55,7 +55,7 @@ Kernel::Kernel() : d(new KernelPrivate)
{
d->fetchQueue = new FetchQueue();
d->frameManager = new FrameManager();
- d->storage = 0;
+ d->storage = nullptr;
}
Kernel::~Kernel()
@@ -63,7 +63,7 @@ Kernel::~Kernel()
delete d->fetchQueue;
delete d->frameManager;
delete d;
- d = 0;
+ d = nullptr;
}
Backend::Storage *Kernel::storage()
diff --git a/src/main.cpp b/src/main.cpp
index feb44bc..6b94546 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -40,11 +40,11 @@ class Application : public KontactInterface::PimUniqueApplication
public:
Application(int &argc, char **argv[])
: KontactInterface::PimUniqueApplication(argc, argv)
- , mMainWindow(0)
+ , mMainWindow(nullptr)
{
}
- ~Application()
+ ~Application() override
{
}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index dd4d290..fb87580 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -60,7 +60,7 @@ class MainWindow : public KParts::MainWindow
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
- ~MainWindow();
+ ~MainWindow() override;
/**
* Creates the progress widget in the status bar and the ProgressDialog
diff --git a/src/notificationmanager.cpp b/src/notificationmanager.cpp
index eacd1d2..ce5a879 100644
--- a/src/notificationmanager.cpp
+++ b/src/notificationmanager.cpp
@@ -39,12 +39,12 @@ NotificationManager::NotificationManager() : QObject()
m_running = false;
m_addedInLastInterval = false;
m_maxArticles = 20;
- m_widget = NULL;
+ m_widget = nullptr;
}
NotificationManager::~NotificationManager()
{
- m_self = 0;
+ m_self = nullptr;
}
void NotificationManager::setWidget(QWidget *widget, const QString &componentName)
@@ -133,7 +133,7 @@ void NotificationManager::slotIntervalCheck()
}
}
-NotificationManager *NotificationManager::m_self = 0;
+NotificationManager *NotificationManager::m_self = nullptr;
NotificationManager *NotificationManager::self()
{
diff --git a/src/pluginmanager.cpp b/src/pluginmanager.cpp
index dfee7fc..ec58f23 100644
--- a/src/pluginmanager.cpp
+++ b/src/pluginmanager.cpp
@@ -125,7 +125,7 @@ PluginManager::getService(const Plugin *plugin)
{
if (!plugin) {
qCWarning(AKREGATOR_LOG) << "pointer == NULL";
- return KService::Ptr(0);
+ return KService::Ptr(nullptr);
}
//search plugin in store
@@ -133,7 +133,7 @@ PluginManager::getService(const Plugin *plugin)
if (iter == m_store.end()) {
qCWarning(AKREGATOR_LOG) << "Plugin not found in store.";
- return KService::Ptr(0);
+ return KService::Ptr(nullptr);
}
return (*iter).service;
@@ -163,7 +163,7 @@ PluginManager::showAbout(const QString &constraint)
str += QStringLiteral("</table></body></html>");
- KMessageBox::information(0, str, i18n("Plugin Information"));
+ KMessageBox::information(nullptr, str, i18n("Plugin Information"));
}
void
diff --git a/src/progressmanager.cpp b/src/progressmanager.cpp
index 2b184e2..f345e9a 100644
--- a/src/progressmanager.cpp
+++ b/src/progressmanager.cpp
@@ -63,7 +63,7 @@ ProgressManager::ProgressManager() : d(new ProgressManagerPrivate)
ProgressManager::~ProgressManager()
{
delete d;
- d = 0;
+ d = nullptr;
}
void ProgressManager::setFeedList(const QSharedPointer<FeedList> &feedList)
@@ -136,7 +136,7 @@ public:
ProgressItemHandler::ProgressItemHandler(Feed *feed) : d(new ProgressItemHandlerPrivate)
{
d->feed = feed;
- d->progressItem = 0;
+ d->progressItem = nullptr;
connect(feed, &Feed::fetchStarted, this, &ProgressItemHandler::slotFetchStarted);
connect(feed, &Feed::fetched, this, &ProgressItemHandler::slotFetchCompleted);
@@ -148,18 +148,18 @@ ProgressItemHandler::~ProgressItemHandler()
{
if (d->progressItem) {
d->progressItem->setComplete();
- d->progressItem = 0;
+ d->progressItem = nullptr;
}
delete d;
- d = 0;
+ d = nullptr;
}
void ProgressItemHandler::slotFetchStarted()
{
if (d->progressItem) {
d->progressItem->setComplete();
- d->progressItem = 0;
+ d->progressItem = nullptr;
}
d->progressItem = KPIM::ProgressManager::createProgressItem(KPIM::ProgressManager::getUniqueID(), d->feed->title(), QString(), true);
@@ -172,7 +172,7 @@ void ProgressItemHandler::slotFetchCompleted()
if (d->progressItem) {
d->progressItem->setStatus(i18n("Fetch completed"));
d->progressItem->setComplete();
- d->progressItem = 0;
+ d->progressItem = nullptr;
}
}
@@ -181,7 +181,7 @@ void ProgressItemHandler::slotFetchError()
if (d->progressItem) {
d->progressItem->setStatus(i18n("Fetch error"));
d->progressItem->setComplete();
- d->progressItem = 0;
+ d->progressItem = nullptr;
}
}
@@ -190,6 +190,6 @@ void ProgressItemHandler::slotFetchAborted()
if (d->progressItem) {
d->progressItem->setStatus(i18n("Fetch aborted"));
d->progressItem->setComplete();
- d->progressItem = 0;
+ d->progressItem = nullptr;
}
}
diff --git a/src/selectioncontroller.cpp b/src/selectioncontroller.cpp
index d9df9f7..94edb4e 100644
--- a/src/selectioncontroller.cpp
+++ b/src/selectioncontroller.cpp
@@ -81,11 +81,11 @@ Akregator::SelectionController::SelectionController(QObject *parent)
: AbstractSelectionController(parent)
, m_feedList()
, m_feedSelector()
- , m_articleLister(0)
- , m_singleDisplay(0)
+ , m_articleLister(nullptr)
+ , m_singleDisplay(nullptr)
, m_subscriptionModel(new FilterUnreadProxyModel(this))
- , m_folderExpansionHandler(0)
- , m_articleModel(0)
+ , m_folderExpansionHandler(nullptr)
+ , m_articleModel(nullptr)
, m_selectedSubscription()
{
m_subscriptionModel->setDoFilter(Settings::hideReadFeeds());
diff --git a/src/selectioncontroller.h b/src/selectioncontroller.h
index a4006bc..c8313f3 100644
--- a/src/selectioncontroller.h
+++ b/src/selectioncontroller.h
@@ -45,7 +45,7 @@ class SelectionController : public AbstractSelectionController
public:
explicit SelectionController(QObject *parent = nullptr);
- ~SelectionController();
+ ~SelectionController() override;
//impl
void setFeedSelector(QAbstractItemView *feedSelector) override;
diff --git a/src/subscription/subscriptionlistdelegate.cpp b/src/subscription/subscriptionlistdelegate.cpp
index d79cce5..8f34e49 100644
--- a/src/subscription/subscriptionlistdelegate.cpp
+++ b/src/subscription/subscriptionlistdelegate.cpp
@@ -77,7 +77,7 @@ void Akregator::SubscriptionListDelegate::paint(QPainter *painter, const QStyleO
void Akregator::SubscriptionListDelegate::recalculateRowHeight()
{
KIconTheme *iconTheme = KIconLoader::global()->theme();
- m_viewIconHeight = (iconTheme != NULL) ? iconTheme->defaultSize(KIconLoader::Small) : 0;
+ m_viewIconHeight = iconTheme ? iconTheme->defaultSize(KIconLoader::Small) : 0;
qCDebug(AKREGATOR_LOG) << "icon height" << m_viewIconHeight;
}
diff --git a/src/subscription/subscriptionlistdelegate.h b/src/subscription/subscriptionlistdelegate.h
index e177507..3262f2a 100644
--- a/src/subscription/subscriptionlistdelegate.h
+++ b/src/subscription/subscriptionlistdelegate.h
@@ -35,7 +35,7 @@ class SubscriptionListDelegate : public QStyledItemDelegate
public:
explicit SubscriptionListDelegate(QWidget *parent = nullptr);
- ~SubscriptionListDelegate();
+ ~SubscriptionListDelegate() override;
protected:
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
diff --git a/src/subscription/subscriptionlistmodel.cpp b/src/subscription/subscriptionlistmodel.cpp
index d0ee900..9cd5220 100644
--- a/src/subscription/subscriptionlistmodel.cpp
+++ b/src/subscription/subscriptionlistmodel.cpp
@@ -79,7 +79,7 @@ static QString errorCodeToString(Syndication::ErrorCode err)
static const Akregator::TreeNode *nodeForIndex(const QModelIndex &index, const FeedList *feedList)
{
- return (!index.isValid() || !feedList) ? 0 : feedList->findByID(index.internalId());
+ return (!index.isValid() || !feedList) ? nullptr : feedList->findByID(index.internalId());
}
}
@@ -443,7 +443,7 @@ void Akregator::FolderExpansionHandler::setExpanded(const QModelIndex &idx, bool
FolderExpansionHandler::FolderExpansionHandler(QObject *parent) : QObject(parent)
, m_feedList()
- , m_model(0)
+ , m_model(nullptr)
{
}
diff --git a/src/subscription/subscriptionlistview.h b/src/subscription/subscriptionlistview.h
index 7094829..b319880 100644
--- a/src/subscription/subscriptionlistview.h
+++ b/src/subscription/subscriptionlistview.h
@@ -37,7 +37,7 @@ class SubscriptionListView : public QTreeView
Q_OBJECT
public:
explicit SubscriptionListView(QWidget *parent = nullptr);
- ~SubscriptionListView();
+ ~SubscriptionListView() override;
// the following is all transitional, for easier porting from the item-based views
void startNodeRenaming(TreeNode *node);
diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp
index ab98d4e..407f956 100644
--- a/src/tabwidget.cpp
+++ b/src/tabwidget.cpp
@@ -498,7 +498,7 @@ void TabWidget::slotCloseTab()
QWidget *widget = d->selectedWidget();
Frame *frame = d->frames.value(widget);
- if (frame == 0 || !frame->isRemovable()) {
+ if (frame == nullptr || !frame->isRemovable()) {
return;
}
diff --git a/src/tabwidget.h b/src/tabwidget.h
index 5a647ad..291ea8f 100644
--- a/src/tabwidget.h
+++ b/src/tabwidget.h
@@ -39,7 +39,7 @@ class TabWidget : public QTabWidget
public:
explicit TabWidget(QWidget *parent = nullptr);
- ~TabWidget();
+ ~TabWidget() override;
public Q_SLOTS:
void slotWebPageMutedOrAudibleChanged(Akregator::Frame *frame, bool isAudioMuted, bool wasRecentlyAudible);
diff --git a/src/treenode.cpp b/src/treenode.cpp
index fc4e1a2..06a12b9 100644
--- a/src/treenode.cpp
+++ b/src/treenode.cpp
@@ -55,14 +55,14 @@ TreeNode::TreeNodePrivate::TreeNodePrivate() : doNotify(true)
, nodeChangeOccurred(false)
, articleChangeOccurred(false)
, title()
- , parent(0)
+ , parent(nullptr)
, id(0)
, signalDestroyedEmitted(false)
{
}
TreeNode::TreeNode()
- : QObject(0)
+ : QObject(nullptr)
, d(new TreeNodePrivate)
{
}
@@ -82,7 +82,7 @@ TreeNode::~TreeNode()
{
Q_ASSERT(d->signalDestroyedEmitted || !"TreeNode subclasses must call emitSignalDestroyed in their destructor");
delete d;
- d = 0;
+ d = nullptr;
}
QString TreeNode::title() const
diff --git a/src/urlhandler/webengine/urlhandlerwebengine.h b/src/urlhandler/webengine/urlhandlerwebengine.h
index 298cd6c..dc5fddf 100644
--- a/src/urlhandler/webengine/urlhandlerwebengine.h
+++ b/src/urlhandler/webengine/urlhandlerwebengine.h
@@ -68,7 +68,7 @@ public:
{
}
- virtual ~AkregatorConfigHandler()
+ ~AkregatorConfigHandler() override
{
}
@@ -84,7 +84,7 @@ public:
{
}
- virtual ~MailToURLHandlerWebEngine()
+ ~MailToURLHandlerWebEngine() override
{
}
@@ -100,7 +100,7 @@ public:
{
}
- virtual ~ActionURLHandlerWebEngine()
+ ~ActionURLHandlerWebEngine() override
{
}