Changeset View
Changeset View
Standalone View
Standalone View
plugins/akregator/akregatorplugin.h
Show All 13 Lines | 1 | /* This file is part of the KDE project | |||
---|---|---|---|---|---|
14 | 14 | | |||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #ifndef _AKREGATORPLUGIN_H_ | 19 | #ifndef _AKREGATORPLUGIN_H_ | ||
20 | #define _AKREGATORPLUGIN_H_ | 20 | #define _AKREGATORPLUGIN_H_ | ||
21 | 21 | | |||
22 | #include <konq_popupmenu.h> | 22 | #include <kabstractfileitemactionplugin.h> | ||
23 | #include <kfileitem.h> | | |||
24 | #include <kconfig.h> | | |||
25 | 23 | | |||
26 | #include "pluginbase.h" | 24 | #include "pluginbase.h" | ||
27 | 25 | | |||
28 | class KHTMLPart; | 26 | class KFileItem; | ||
27 | class KFileItemListProperties; | ||||
29 | 28 | | |||
30 | namespace Akregator | 29 | namespace Akregator | ||
31 | { | 30 | { | ||
32 | 31 | | |||
33 | class AkregatorMenu : public KonqPopupMenuPlugin, PluginBase | 32 | class AkregatorMenu : public KAbstractFileItemActionPlugin, PluginBase | ||
34 | { | 33 | { | ||
35 | Q_OBJECT | 34 | Q_OBJECT | ||
35 | | ||||
36 | public: | 36 | public: | ||
37 | AkregatorMenu(KonqPopupMenu *, const QStringList &list); | 37 | AkregatorMenu(QObject *parent, const QVariantList &args); | ||
38 | virtual ~AkregatorMenu(); | 38 | virtual ~AkregatorMenu() = default; | ||
39 | | ||||
40 | QList<QAction *> actions(const KFileItemListProperties &fileItemInfos, QWidget *parent) override; | ||||
dfaure: override ? | |||||
39 | 41 | | |||
40 | public slots: | 42 | public slots: | ||
41 | void slotAddFeed(); | 43 | void slotAddFeed(); | ||
42 | 44 | | |||
43 | protected: | 45 | private: | ||
dfaure: while at it: const, or static, or better, make it file-static | |||||
Made file-static, but left the next function as member to avoid having to construct m_feedMimeTypes every time (or complicate with global static). marten: Made file-static, but left the next function as member to avoid having to construct… | |||||
dfaure: Sure, the other function should stay. | |||||
dfaure: white at it: private | |||||
44 | bool isFeedUrl(const QString &s); | 46 | bool isFeedUrl(const KFileItem &item) const; | ||
dfaure: const | |||||
45 | bool isFeedUrl(const KFileItem &item); | | |||
46 | 47 | | |||
47 | private: | 48 | private: | ||
48 | QStringList m_feedMimeTypes; | 49 | QStringList m_feedMimeTypes; | ||
49 | // KConfig *m_conf; | | |||
50 | KHTMLPart *m_part; | | |||
51 | QString m_feedURL; | | |||
52 | }; | 50 | }; | ||
53 | 51 | | |||
54 | } | 52 | } | ||
55 | 53 | | |||
56 | #endif | 54 | #endif | ||
57 | |
override ?