diff --git a/src/command/createfoldercommand.cpp b/src/command/createfoldercommand.cpp index aafae865..a8e28b3e 100644 --- a/src/command/createfoldercommand.cpp +++ b/src/command/createfoldercommand.cpp @@ -1,124 +1,124 @@ /* This file is part of Akregator. Copyright (C) 2008 Frank Osterfeld 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. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include "createfoldercommand.h" #include "folder.h" #include "subscriptionlistview.h" #include #include #include #include using namespace Akregator; class Q_DECL_HIDDEN CreateFolderCommand::Private { CreateFolderCommand *const q; public: explicit Private(CreateFolderCommand *qq); void doCreate(); TreeNode *m_selectedSubscription = nullptr; Folder *m_rootFolder = nullptr; SubscriptionListView *m_subscriptionListView = nullptr; }; CreateFolderCommand::Private::Private(CreateFolderCommand *qq) : q(qq) , m_selectedSubscription(0) , m_rootFolder(0) , m_subscriptionListView(0) { } void CreateFolderCommand::Private::doCreate() { Q_ASSERT(m_rootFolder); Q_ASSERT(m_subscriptionListView); bool ok; const QString name = QInputDialog::getText(q->parentWidget(), i18n("Add Folder"), i18n("Folder name:"), QLineEdit::Normal, QString(), &ok); if (!ok || name.trimmed().isEmpty()) { q->done(); return; } Folder *parentFolder = qobject_cast(m_selectedSubscription); if (!parentFolder) { parentFolder = m_selectedSubscription ? m_selectedSubscription->parent() : nullptr; } if (!parentFolder) { parentFolder = m_rootFolder; } TreeNode *const after = (m_selectedSubscription && m_selectedSubscription->isGroup()) ? m_selectedSubscription : nullptr; Folder *const newFolder = new Folder(name); parentFolder->insertChild(newFolder, after); m_subscriptionListView->ensureNodeVisible(newFolder); q->done(); } CreateFolderCommand::CreateFolderCommand(QObject *parent) : Command(parent) , d(new Private(this)) { } CreateFolderCommand::~CreateFolderCommand() { delete d; } void CreateFolderCommand::setSubscriptionListView(SubscriptionListView *view) { d->m_subscriptionListView = view; } void CreateFolderCommand::setSelectedSubscription(TreeNode *selected) { d->m_selectedSubscription = selected; } void CreateFolderCommand::setRootFolder(Folder *rootFolder) { d->m_rootFolder = rootFolder; } void CreateFolderCommand::doStart() { - QTimer::singleShot(0, this, SLOT(doCreate())); + QTimer::singleShot(0, this, [this]() { d->doCreate(); }); } void CreateFolderCommand::doAbort() { } #include "moc_createfoldercommand.cpp" diff --git a/src/command/deletesubscriptioncommand.cpp b/src/command/deletesubscriptioncommand.cpp index 12c09275..1970021e 100644 --- a/src/command/deletesubscriptioncommand.cpp +++ b/src/command/deletesubscriptioncommand.cpp @@ -1,199 +1,199 @@ /* This file is part of Akregator. Copyright (C) 2008 Frank Osterfeld 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. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include "deletesubscriptioncommand.h" #include "feed.h" #include "feedlist.h" #include "folder.h" #include "subscriptionlistjobs.h" #include "treenodevisitor.h" #include #include #include #include using namespace Akregator; namespace { class DeleteNodeVisitor : public TreeNodeVisitor { public: explicit DeleteNodeVisitor(QWidget *parent) : m_widget(parent) , m_job(0) { } bool visitFolder(Folder *node) override { const QString msg = node->title().isEmpty() ? i18n("Are you sure you want to delete this folder and its feeds and subfolders?") : i18n("Are you sure you want to delete folder %1 and its feeds and subfolders?", node->title()); if (KMessageBox::warningContinueCancel(m_widget, msg, i18n("Delete Folder"), KStandardGuiItem::del(), KStandardGuiItem::cancel(), QStringLiteral("Disable delete folder confirmation")) != KMessageBox::Continue) { return true; } m_job = reallyCreateJob(node); //TODO: port focus //m_widget->m_feedListView->setFocus(); return true; } bool visitFeed(Feed *node) override { QString msg; if (node->title().isEmpty()) { msg = i18n("Are you sure you want to delete this feed?"); } else { msg = i18n("Are you sure you want to delete feed %1?", node->title()); } if (KMessageBox::warningContinueCancel(m_widget, msg, i18n("Delete Feed"), KStandardGuiItem::del(), KStandardGuiItem::cancel(), QStringLiteral("Disable delete feed confirmation")) != KMessageBox::Continue) { return true; } m_job = reallyCreateJob(node); //TODO: port focus // m_widget->m_feedListView->setFocus(); return true; } DeleteSubscriptionJob *createJob(TreeNode *node) { m_job = 0; if (node) { visit(node); } return m_job; } private: static DeleteSubscriptionJob *reallyCreateJob(TreeNode *node) { DeleteSubscriptionJob *job = new DeleteSubscriptionJob; job->setSubscriptionId(node->id()); return job; } private: QPointer m_widget; QPointer m_job; }; } class DeleteSubscriptionCommand::Private { DeleteSubscriptionCommand *const q; public: explicit Private(DeleteSubscriptionCommand *qq); ~Private(); void startDelete(); void jobFinished(); QWeakPointer m_list; int m_subscriptionId; }; DeleteSubscriptionCommand::Private::Private(DeleteSubscriptionCommand *qq) : q(qq) , m_list() , m_subscriptionId(-1) { } DeleteSubscriptionCommand::Private::~Private() { } DeleteSubscriptionCommand::DeleteSubscriptionCommand(QObject *parent) : Command(parent) , d(new Private(this)) { } DeleteSubscriptionCommand::~DeleteSubscriptionCommand() { delete d; } void DeleteSubscriptionCommand::setSubscription(const QWeakPointer &feedList, int subId) { d->m_list = feedList; d->m_subscriptionId = subId; } int DeleteSubscriptionCommand::subscriptionId() const { return d->m_subscriptionId; } QWeakPointer DeleteSubscriptionCommand::feedList() const { return d->m_list; } void DeleteSubscriptionCommand::doStart() { - QTimer::singleShot(0, this, SLOT(startDelete())); + QTimer::singleShot(0, this, [this]() { d->startDelete(); }); } void DeleteSubscriptionCommand::Private::jobFinished() { q->done(); } void DeleteSubscriptionCommand::Private::startDelete() { const QSharedPointer list = m_list.lock(); if (!list) { q->done(); return; } TreeNode *const node = list->findByID(m_subscriptionId); DeleteNodeVisitor visitor(q->parentWidget()); DeleteSubscriptionJob *job = visitor.createJob(node); if (!job) { q->done(); return; } - QObject::connect(job, SIGNAL(finished(KJob*)), q, SLOT(jobFinished())); + QObject::connect(job, &DeleteSubscriptionJob::finished, q, [this]() { jobFinished(); }); job->start(); } void DeleteSubscriptionCommand::doAbort() { } #include "moc_deletesubscriptioncommand.cpp" diff --git a/src/command/deletesubscriptioncommand.h b/src/command/deletesubscriptioncommand.h index bc774e67..a395ccfd 100644 --- a/src/command/deletesubscriptioncommand.h +++ b/src/command/deletesubscriptioncommand.h @@ -1,59 +1,57 @@ /* This file is part of Akregator. Copyright (C) 2008 Frank Osterfeld 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. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef AKREGATOR_DELETESUBSCRIPTIONCOMMAND_H #define AKREGATOR_DELETESUBSCRIPTIONCOMMAND_H #include "command.h" #include namespace Akregator { class FeedList; class DeleteSubscriptionCommand : public Command { Q_OBJECT public: explicit DeleteSubscriptionCommand(QObject *parent = nullptr); ~DeleteSubscriptionCommand(); void setSubscription(const QWeakPointer &feedList, int subId); int subscriptionId() const; QWeakPointer feedList() const; private: void doStart() override; void doAbort() override; private: class Private; Private *const d; - Q_PRIVATE_SLOT(d, void startDelete()) - Q_PRIVATE_SLOT(d, void jobFinished()) }; } #endif // AKREGATOR_DELETESUBSCRIPTIONCOMMAND_H diff --git a/src/command/editsubscriptioncommand.cpp b/src/command/editsubscriptioncommand.cpp index 835ed14e..de009e56 100644 --- a/src/command/editsubscriptioncommand.cpp +++ b/src/command/editsubscriptioncommand.cpp @@ -1,160 +1,160 @@ /* This file is part of Akregator. Copyright (C) 2008 Frank Osterfeld 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. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include "editsubscriptioncommand.h" #include "feed.h" #include "feedlist.h" #include "folder.h" #include "feedpropertiesdialog.h" #include "subscriptionlistview.h" #include "treenodevisitor.h" #include #include using namespace Akregator; namespace { class EditNodePropertiesVisitor : public TreeNodeVisitor { public: EditNodePropertiesVisitor(SubscriptionListView *subcriptionListView, QWidget *parent); bool visitFolder(Folder *node) override { m_subscriptionListView->startNodeRenaming(node); return true; } bool visitFeed(Akregator::Feed *node) override { QPointer dlg = new FeedPropertiesDialog(m_widget); dlg->setFeed(node); dlg->exec(); delete dlg; return true; } private: SubscriptionListView *m_subscriptionListView = nullptr; QWidget *m_widget = nullptr; }; } EditNodePropertiesVisitor::EditNodePropertiesVisitor(SubscriptionListView *subscriptionListView, QWidget *parent) : m_subscriptionListView(subscriptionListView) , m_widget(parent) { Q_ASSERT(m_subscriptionListView); Q_ASSERT(m_widget); } class EditSubscriptionCommand::Private { EditSubscriptionCommand *const q; public: explicit Private(EditSubscriptionCommand *qq); ~Private(); void startEdit(); void jobFinished(); QSharedPointer m_list; int m_subscriptionId; SubscriptionListView *m_subscriptionListView = nullptr; }; EditSubscriptionCommand::Private::Private(EditSubscriptionCommand *qq) : q(qq) , m_list() , m_subscriptionId(-1) , m_subscriptionListView(0) { } EditSubscriptionCommand::Private::~Private() { } EditSubscriptionCommand::EditSubscriptionCommand(QObject *parent) : Command(parent) , d(new Private(this)) { } EditSubscriptionCommand::~EditSubscriptionCommand() { delete d; } void EditSubscriptionCommand::setSubscription(const QSharedPointer &feedList, int subId) { d->m_list = feedList; d->m_subscriptionId = subId; } int EditSubscriptionCommand::subscriptionId() const { return d->m_subscriptionId; } QSharedPointer EditSubscriptionCommand::feedList() const { return d->m_list; } SubscriptionListView *EditSubscriptionCommand::subscriptionListView() const { return d->m_subscriptionListView; } void EditSubscriptionCommand::setSubscriptionListView(SubscriptionListView *view) { d->m_subscriptionListView = view; } void EditSubscriptionCommand::doStart() { - QTimer::singleShot(0, this, SLOT(startEdit())); + QTimer::singleShot(0, this, [this]() { d->startEdit(); }); } void EditSubscriptionCommand::Private::startEdit() { TreeNode *const node = m_list->findByID(m_subscriptionId); if (!node) { q->done(); return; } EditNodePropertiesVisitor visitor(m_subscriptionListView, q->parentWidget()); visitor.visit(node); q->done(); } void EditSubscriptionCommand::doAbort() { } #include "moc_editsubscriptioncommand.cpp" diff --git a/src/command/expireitemscommand.cpp b/src/command/expireitemscommand.cpp index 46d09cd8..52ac22da 100644 --- a/src/command/expireitemscommand.cpp +++ b/src/command/expireitemscommand.cpp @@ -1,145 +1,145 @@ /* This file is part of Akregator. Copyright (C) 2008 Frank Osterfeld 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. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include "expireitemscommand.h" #include "articlejobs.h" #include "feed.h" #include "feedlist.h" #include "akregator_debug.h" #include #include #include #include using namespace Akregator; class Q_DECL_HIDDEN ExpireItemsCommand::Private { ExpireItemsCommand *const q; public: explicit Private(ExpireItemsCommand *qq); void createDeleteJobs(); void addDeleteJobForFeed(Feed *feed); void jobFinished(KJob *); QWeakPointer m_feedList; QVector m_feeds; QSet m_jobs; }; ExpireItemsCommand::Private::Private(ExpireItemsCommand *qq) : q(qq) , m_feedList() { } void ExpireItemsCommand::Private::addDeleteJobForFeed(Feed *feed) { Q_ASSERT(feed); ArticleDeleteJob *job = new ArticleDeleteJob(q); connect(job, SIGNAL(finished(KJob*)), q, SLOT(jobFinished(KJob*))); m_jobs.insert(job); feed->deleteExpiredArticles(job); job->start(); } void ExpireItemsCommand::Private::jobFinished(KJob *job) { Q_ASSERT(!m_jobs.isEmpty()); m_jobs.remove(job); Q_EMIT q->progress(((m_feeds.count() - m_jobs.count()) * 100) / m_feeds.count(), QString()); if (m_jobs.isEmpty()) { q->done(); } } void ExpireItemsCommand::Private::createDeleteJobs() { Q_ASSERT(m_jobs.isEmpty()); const QSharedPointer feedList = m_feedList.lock(); if (m_feeds.isEmpty() || !feedList) { if (!feedList) { qCWarning(AKREGATOR_LOG) << "Associated feed list was deleted, could not expire items"; } q->done(); return; } for (const int i : qAsConst(m_feeds)) { Feed *const feed = qobject_cast(feedList->findByID(i)); if (feed) { addDeleteJobForFeed(feed); } } } ExpireItemsCommand::ExpireItemsCommand(QObject *parent) : Command(parent) , d(new Private(this)) { } ExpireItemsCommand::~ExpireItemsCommand() { delete d; } void ExpireItemsCommand::setFeedList(const QWeakPointer &feedList) { d->m_feedList = feedList; } QWeakPointer ExpireItemsCommand::feedList() const { return d->m_feedList; } void ExpireItemsCommand::setFeeds(const QVector &feeds) { d->m_feeds = feeds; } QVector ExpireItemsCommand::feeds() const { return d->m_feeds; } void ExpireItemsCommand::doAbort() { for (KJob *const i : qAsConst(d->m_jobs)) { i->kill(); } } void ExpireItemsCommand::doStart() { - QTimer::singleShot(0, this, SLOT(createDeleteJobs())); + QTimer::singleShot(0, this, [this]() { d->createDeleteJobs(); }); } #include "moc_expireitemscommand.cpp" diff --git a/src/command/importfeedlistcommand.cpp b/src/command/importfeedlistcommand.cpp index 9f9fbc36..986fae3e 100644 --- a/src/command/importfeedlistcommand.cpp +++ b/src/command/importfeedlistcommand.cpp @@ -1,158 +1,158 @@ /* This file is part of Akregator. Copyright (C) 2009 Frank Osterfeld 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. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include "importfeedlistcommand.h" #include "feedlist.h" #include "folder.h" #include "kernel.h" #include "akregator_debug.h" #include #include #include #include #include #include #include using namespace Akregator; class ImportFeedListCommand::Private { ImportFeedListCommand *const q; public: explicit Private(ImportFeedListCommand *qq); void doImport(); QWeakPointer targetList; QDomDocument document; ImportFeedListCommand::RootFolderOption rootFolderOption; QString importedRootFolderName; }; ImportFeedListCommand::Private::Private(ImportFeedListCommand *qq) : q(qq) , targetList() , rootFolderOption(Ask) , importedRootFolderName(i18n("Imported Feeds")) { } void ImportFeedListCommand::Private::doImport() { const QSharedPointer target = targetList.lock(); if (!target) { if (!target) { qCWarning(AKREGATOR_LOG) << "Target list was deleted, could not import feed list"; } q->done(); return; } QScopedPointer importedList(new FeedList(Kernel::self()->storage())); const bool parsed = importedList->readFromOpml(document); // FIXME: parsing error, print some message if (!parsed) { q->done(); return; } QPointer that(q); bool ok = false; if (rootFolderOption == ImportFeedListCommand::Ask) { importedRootFolderName = QInputDialog::getText(q->parentWidget(), i18n("Add Imported Folder"), i18n("Imported folder name:"), QLineEdit::Normal, importedRootFolderName, &ok); } if (!ok || !that) { if (that) { q->done(); } return; } Folder *folder = target->allFeedsFolder(); if (rootFolderOption != None) { folder = new Folder(importedRootFolderName); target->allFeedsFolder()->appendChild(folder); } target->append(importedList.data(), folder); q->done(); } ImportFeedListCommand::ImportFeedListCommand(QObject *parent) : Command(parent) , d(new Private(this)) { } ImportFeedListCommand::~ImportFeedListCommand() { delete d; } void ImportFeedListCommand::setTargetList(const QWeakPointer &feedList) { d->targetList = feedList; } void ImportFeedListCommand::setImportedRootFolderOption(RootFolderOption opt) { d->rootFolderOption = opt; } void ImportFeedListCommand::setImportedRootFolderName(const QString &defaultName) { d->importedRootFolderName = defaultName; } void ImportFeedListCommand::setFeedListDocument(const QDomDocument &doc) { d->document = doc; } void ImportFeedListCommand::doAbort() { //TODO } void ImportFeedListCommand::doStart() { - QTimer::singleShot(0, this, SLOT(doImport())); + QTimer::singleShot(0, this, [this]() { d->doImport(); }); } #include "moc_importfeedlistcommand.cpp" diff --git a/src/subscription/subscriptionlistdelegate.h b/src/subscription/subscriptionlistdelegate.h index 8573c8a1..e177507c 100644 --- a/src/subscription/subscriptionlistdelegate.h +++ b/src/subscription/subscriptionlistdelegate.h @@ -1,55 +1,53 @@ /* This file is part of Akregator. Copyright (C) 2007 Frank Osterfeld Copyright (C) 2009 Jonathan Marten 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. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef AKREGATOR_SUBSCRIPTIONLISTDELEGATE_H #define AKREGATOR_SUBSCRIPTIONLISTDELEGATE_H #include namespace Akregator { class SubscriptionListDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit SubscriptionListDelegate(QWidget *parent = nullptr); ~SubscriptionListDelegate(); protected: QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override; -private Q_SLOTS: - void recalculateRowHeight(); - private: - int m_viewIconHeight; + void recalculateRowHeight(); + int m_viewIconHeight = 0; }; } #endif // AKREGATOR_SUBSCRIPTIONLISTDELEGATE_H diff --git a/src/subscription/subscriptionlistjobs.h b/src/subscription/subscriptionlistjobs.h index 7c21fd03..ed27c6f1 100644 --- a/src/subscription/subscriptionlistjobs.h +++ b/src/subscription/subscriptionlistjobs.h @@ -1,98 +1,96 @@ /* This file is part of Akregator. Copyright (C) 2008 Frank Osterfeld 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. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef AKREGATOR_SUBSCRIPTIONLISTJOBS_H #define AKREGATOR_SUBSCRIPTIONLISTJOBS_H #include #include #include "akregator_export.h" namespace Akregator { class FeedList; //transitional job classes class AKREGATOR_EXPORT MoveSubscriptionJob : public KJob { Q_OBJECT public: explicit MoveSubscriptionJob(QObject *parent = nullptr); void setSubscriptionId(int id); void setDestination(int folder, int afterChild); void start() override; private Q_SLOTS: void doMove(); private: int m_id; int m_destFolderId; int m_afterId; QWeakPointer m_feedList; }; class AKREGATOR_EXPORT RenameSubscriptionJob : public KJob { Q_OBJECT public: explicit RenameSubscriptionJob(QObject *parent = nullptr); void setSubscriptionId(int id); void setName(const QString &name); void start() override; private Q_SLOTS: void doRename(); private: int m_id; QString m_name; QSharedPointer m_feedList; }; class AKREGATOR_EXPORT DeleteSubscriptionJob : public KJob { Q_OBJECT public: explicit DeleteSubscriptionJob(QObject *parent = nullptr); void setSubscriptionId(int id); void start() override; -private Q_SLOTS: - void doDelete(); - private: + void doDelete(); int m_id; QWeakPointer m_feedList; }; } #endif // AKREGATOR_SUBSCRIPTIONLISTJOBS_H