Commit c73a2887 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Q_DECL_OVERRIDE -> override

parent 789d898e
......@@ -477,9 +477,9 @@ public:
KBookmarkGroupList(KBookmarkManager *);
QList<KBookmark> getList(const KBookmarkGroup &);
private:
void visit(const KBookmark &) Q_DECL_OVERRIDE {}
void visitEnter(const KBookmarkGroup &) Q_DECL_OVERRIDE;
void visitLeave(const KBookmarkGroup &) Q_DECL_OVERRIDE {}
void visit(const KBookmark &) override {}
void visitEnter(const KBookmarkGroup &) override;
void visitLeave(const KBookmarkGroup &) override {}
private:
KBookmarkManager *m_manager;
QList<KBookmark> m_list;
......
......@@ -34,8 +34,8 @@ class BookmarkFolderView : public KBookmarkView
public:
explicit BookmarkFolderView( BookmarkListView * view, QWidget * parent = nullptr );
virtual ~BookmarkFolderView();
void selectionChanged ( const QItemSelection & selected, const QItemSelection & deselected ) Q_DECL_OVERRIDE;
KBookmark bookmarkForIndex(const QModelIndex & idx) const Q_DECL_OVERRIDE;
void selectionChanged ( const QItemSelection & selected, const QItemSelection & deselected ) override;
KBookmark bookmarkForIndex(const QModelIndex & idx) const override;
private Q_SLOTS:
void slotReset();
private:
......@@ -51,11 +51,11 @@ public:
virtual ~BookmarkListView();
void loadColumnSetting();
void saveColumnSetting();
void setModel(QAbstractItemModel * model) Q_DECL_OVERRIDE;
KBookmark bookmarkForIndex(const QModelIndex & idx) const Q_DECL_OVERRIDE;
void setModel(QAbstractItemModel * model) override;
KBookmark bookmarkForIndex(const QModelIndex & idx) const override;
KBookmarkModel * bookmarkModel() const;
protected:
void contextMenuEvent ( QContextMenuEvent * e ) Q_DECL_OVERRIDE;
void contextMenuEvent ( QContextMenuEvent * e ) override;
};
......@@ -65,13 +65,13 @@ class BookmarkFolderViewFilterModel : public QSortFilterProxyModel
public:
explicit BookmarkFolderViewFilterModel(QObject * parent = nullptr);
virtual ~BookmarkFolderViewFilterModel();
QStringList mimeTypes() const Q_DECL_OVERRIDE;
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
QStringList mimeTypes() const override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
protected:
bool filterAcceptsColumn ( int source_column, const QModelIndex & source_parent ) const Q_DECL_OVERRIDE;
bool filterAcceptsRow ( int source_row, const QModelIndex & source_parent ) const Q_DECL_OVERRIDE;
bool filterAcceptsColumn ( int source_column, const QModelIndex & source_parent ) const override;
bool filterAcceptsRow ( int source_row, const QModelIndex & source_parent ) const override;
//FIXME check
Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE
Qt::DropActions supportedDropActions() const override
{ return sourceModel()->supportedDropActions(); }
};
#endif
......@@ -29,9 +29,9 @@ public:
QString toString(const KBookmarkGroup &, bool showAddress = false);
void write(const KBookmarkGroup &, const QString &, bool showAddress = false);
private:
void visit(const KBookmark &) Q_DECL_OVERRIDE;
void visitEnter(const KBookmarkGroup &) Q_DECL_OVERRIDE;
void visitLeave(const KBookmarkGroup &) Q_DECL_OVERRIDE;
void visit(const KBookmark &) override;
void visitEnter(const KBookmarkGroup &) override;
void visitLeave(const KBookmarkGroup &) override;
private:
QString m_string;
QTextStream m_out;
......
......@@ -40,14 +40,14 @@ public:
FavIconsItr(BookmarkIteratorHolder* holder, const QList<KBookmark>& bks);
~FavIconsItr();
void cancel() Q_DECL_OVERRIDE;
void cancel() override;
public Q_SLOTS:
void slotDone(bool succeeded, const QString& errorString);
protected:
void doAction() Q_DECL_OVERRIDE;
bool isApplicable(const KBookmark &bk) const Q_DECL_OVERRIDE;
void doAction() override;
bool isApplicable(const KBookmark &bk) const override;
private:
void setStatus(const QString & status);
......
......@@ -46,9 +46,9 @@ public:
virtual ~ImportCommand()
{}
void redo() Q_DECL_OVERRIDE;
void undo() Q_DECL_OVERRIDE;
QString affectedBookmarks() const Q_DECL_OVERRIDE;
void redo() override;
void undo() override;
QString affectedBookmarks() const override;
QString groupAddress() const { return m_group; }
QString folder() const;
......@@ -89,31 +89,31 @@ class XBELImportCommand : public ImportCommand
{
public:
explicit XBELImportCommand(KBookmarkModel* model) : ImportCommand(model) {}
void import(const QString &fileName, bool folder) Q_DECL_OVERRIDE = 0;
QString requestFilename() const Q_DECL_OVERRIDE = 0;
void import(const QString &fileName, bool folder) override = 0;
QString requestFilename() const override = 0;
private:
void doCreateHoldingFolder(KBookmarkGroup &bkGroup) Q_DECL_OVERRIDE;
void doExecute(const KBookmarkGroup &) Q_DECL_OVERRIDE;
void doCreateHoldingFolder(KBookmarkGroup &bkGroup) override;
void doExecute(const KBookmarkGroup &) override;
};
class GaleonImportCommand : public XBELImportCommand
{
public:
explicit GaleonImportCommand(KBookmarkModel* model) : XBELImportCommand(model) { setVisibleName(i18n("Galeon")); }
void import(const QString &fileName, bool folder) Q_DECL_OVERRIDE {
void import(const QString &fileName, bool folder) override {
init(fileName, folder, QLatin1String(""), false);
}
QString requestFilename() const Q_DECL_OVERRIDE;
QString requestFilename() const override;
};
class KDE2ImportCommand : public XBELImportCommand
{
public:
explicit KDE2ImportCommand(KBookmarkModel* model) : XBELImportCommand(model) { setVisibleName(i18n("KDE")); }
void import(const QString &fileName, bool folder) Q_DECL_OVERRIDE {
void import(const QString &fileName, bool folder) override {
init(fileName, folder, QLatin1String(""), false);
}
QString requestFilename() const Q_DECL_OVERRIDE;
QString requestFilename() const override;
};
// part pure
......@@ -121,54 +121,54 @@ class HTMLImportCommand : public ImportCommand
{
public:
explicit HTMLImportCommand(KBookmarkModel* model) : ImportCommand(model) {}
void import(const QString &fileName, bool folder) Q_DECL_OVERRIDE = 0;
QString requestFilename() const Q_DECL_OVERRIDE = 0;
void import(const QString &fileName, bool folder) override = 0;
QString requestFilename() const override = 0;
private:
void doExecute(const KBookmarkGroup &) Q_DECL_OVERRIDE;
void doExecute(const KBookmarkGroup &) override;
};
class NSImportCommand : public HTMLImportCommand
{
public:
explicit NSImportCommand(KBookmarkModel* model) : HTMLImportCommand(model) { setVisibleName(i18n("Netscape")); }
void import(const QString &fileName, bool folder) Q_DECL_OVERRIDE {
void import(const QString &fileName, bool folder) override {
init(fileName, folder, QStringLiteral("netscape"), false);
}
QString requestFilename() const Q_DECL_OVERRIDE;
QString requestFilename() const override;
};
class MozImportCommand : public HTMLImportCommand
{
public:
explicit MozImportCommand(KBookmarkModel* model) : HTMLImportCommand(model) { setVisibleName(i18n("Mozilla")); }
void import(const QString &fileName, bool folder) Q_DECL_OVERRIDE {
void import(const QString &fileName, bool folder) override {
init(fileName, folder, QStringLiteral("mozilla"), true);
}
QString requestFilename() const Q_DECL_OVERRIDE;
QString requestFilename() const override;
};
class IEImportCommand : public ImportCommand
{
public:
explicit IEImportCommand(KBookmarkModel* model) : ImportCommand(model) { setVisibleName(i18n("IE")); }
void import(const QString &fileName, bool folder) Q_DECL_OVERRIDE {
void import(const QString &fileName, bool folder) override {
init(fileName, folder, QLatin1String(""), false);
}
QString requestFilename() const Q_DECL_OVERRIDE;
QString requestFilename() const override;
private:
void doExecute(const KBookmarkGroup &) Q_DECL_OVERRIDE;
void doExecute(const KBookmarkGroup &) override;
};
class OperaImportCommand : public ImportCommand
{
public:
explicit OperaImportCommand(KBookmarkModel* model) : ImportCommand(model) { setVisibleName(i18n("Opera")); }
void import(const QString &fileName, bool folder) Q_DECL_OVERRIDE {
void import(const QString &fileName, bool folder) override {
init(fileName, folder, QStringLiteral("opera"), false);
}
QString requestFilename() const Q_DECL_OVERRIDE;
QString requestFilename() const override;
private:
void doExecute(const KBookmarkGroup &) Q_DECL_OVERRIDE;
void doExecute(const KBookmarkGroup &) override;
};
#endif
......@@ -45,7 +45,7 @@ public:
explicit KEBMacroCommand(const QString &name, QUndoCommand* parent = nullptr)
: QUndoCommand(name, parent) {}
virtual ~KEBMacroCommand() {}
QString affectedBookmarks() const Q_DECL_OVERRIDE;
QString affectedBookmarks() const override;
};
class KBOOKMARKMODEL_EXPORT DeleteManyCommand : public KEBMacroCommand
......@@ -78,9 +78,9 @@ public:
QString finalAddress() const;
virtual ~CreateCommand() {}
void redo() Q_DECL_OVERRIDE;
void undo() Q_DECL_OVERRIDE;
QString affectedBookmarks() const Q_DECL_OVERRIDE;
void redo() override;
void undo() override;
QString affectedBookmarks() const override;
private: // TODO move it all to a d pointer
KBookmarkModel* m_model;
......@@ -100,9 +100,9 @@ class KBOOKMARKMODEL_EXPORT EditCommand : public QUndoCommand, public IKEBComman
public:
EditCommand(KBookmarkModel* model, const QString & address, int col, const QString & newValue, QUndoCommand* parent = nullptr);
virtual ~EditCommand() {}
void redo() Q_DECL_OVERRIDE;
void undo() Q_DECL_OVERRIDE;
QString affectedBookmarks() const Q_DECL_OVERRIDE { return KBookmark::parentAddress(mAddress); }
void redo() override;
void undo() override;
QString affectedBookmarks() const override { return KBookmark::parentAddress(mAddress); }
void modify(const QString &newValue);
private:
KBookmarkModel* m_model;
......@@ -117,9 +117,9 @@ class KBOOKMARKMODEL_EXPORT DeleteCommand : public QUndoCommand, public IKEBComm
public:
explicit DeleteCommand(KBookmarkModel* model, const QString &from, bool contentOnly = false, QUndoCommand* parent = nullptr);
virtual ~DeleteCommand() { delete m_cmd; delete m_subCmd; }
void redo() Q_DECL_OVERRIDE;
void undo() Q_DECL_OVERRIDE;
QString affectedBookmarks() const Q_DECL_OVERRIDE;
void redo() override;
void undo() override;
QString affectedBookmarks() const override;
static KEBMacroCommand* deleteAll(KBookmarkModel* model, const KBookmarkGroup &parentGroup);
private: // TODO d pointer
......@@ -138,9 +138,9 @@ public:
SortCommand(KBookmarkModel* model, const QString &name, const QString &groupAddress, QUndoCommand* parent = nullptr);
virtual ~SortCommand()
{}
void redo() Q_DECL_OVERRIDE;
void undo() Q_DECL_OVERRIDE;
QString affectedBookmarks() const Q_DECL_OVERRIDE;
void redo() override;
void undo() override;
QString affectedBookmarks() const override;
// internal
void moveAfter(const SortItem &moveMe, const SortItem &afterMe);
private:
......
......@@ -26,9 +26,9 @@ public:
MoveCommand(KBookmarkModel* model, const QString &from, const QString &to, const QString &name = QString(), QUndoCommand* parent = nullptr);
QString finalAddress() const;
virtual ~MoveCommand() {}
void redo() Q_DECL_OVERRIDE;
void undo() Q_DECL_OVERRIDE;
QString affectedBookmarks() const Q_DECL_OVERRIDE;
void redo() override;
void undo() override;
QString affectedBookmarks() const override;
private:
KBookmarkModel* m_model;
QString m_from;
......
......@@ -57,14 +57,14 @@ public:
};
//reimplemented functions
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE;
bool setData(const QModelIndex &index, const QVariant &value, int role) Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QVariant headerData(int section, Qt::Orientation, int role = Qt::DisplayRole) const override;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
virtual void resetModel();
QModelIndex indexForBookmark(const KBookmark& bk) const;
......@@ -80,10 +80,10 @@ public:
void removeBookmark(const KBookmark &bookmark);
//drag and drop
bool dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent) Q_DECL_OVERRIDE;
QStringList mimeTypes() const Q_DECL_OVERRIDE;
QMimeData * mimeData(const QModelIndexList & indexes) const Q_DECL_OVERRIDE;
Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
bool dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent) override;
QStringList mimeTypes() const override;
QMimeData * mimeData(const QModelIndexList & indexes) const override;
Qt::DropActions supportedDropActions() const override;
public Q_SLOTS:
void notifyManagers(const KBookmarkGroup& grp);
......
......@@ -50,12 +50,12 @@ public:
BookmarkLister lister(mgr->root());
return lister.m_titleList;
}
void visit(const KBookmark& bk) Q_DECL_OVERRIDE {
void visit(const KBookmark& bk) override {
m_addressList.append(bk.address());
m_urlList.append(bk.url().url());
m_titleList.append(bk.text());
}
void visitEnter(const KBookmarkGroup& group) Q_DECL_OVERRIDE {
void visitEnter(const KBookmarkGroup& group) override {
m_addressList.append(group.address() + '/');
m_titleList.append(group.text());
}
......
......@@ -162,7 +162,7 @@ protected:
/**
* Re-implemented for internal reasons. API not affected.
*/
void contextMenuEvent( QContextMenuEvent*e ) Q_DECL_OVERRIDE;
void contextMenuEvent( QContextMenuEvent*e ) override;
protected Q_SLOTS:
/**
......
......@@ -40,15 +40,15 @@ public:
TestLinkItr(BookmarkIteratorHolder* holder, const QList<KBookmark>& bks);
~TestLinkItr();
void cancel() Q_DECL_OVERRIDE;
void cancel() override;
public Q_SLOTS:
void slotJobResult(KJob *job);
private:
void setStatus(const QString & text);
void doAction() Q_DECL_OVERRIDE;
bool isApplicable(const KBookmark &bk) const Q_DECL_OVERRIDE;
void doAction() override;
bool isApplicable(const KBookmark &bk) const override;
KIO::TransferJob *m_job;
QString m_oldStatus;
......
Markdown is supported
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