Mark overriden methods as Q_DECL_OVERRIDE.

This commit is contained in:
Felix Geyer 2012-06-29 14:37:29 +02:00
parent 4e6cf15a09
commit e144f7c85a
17 changed files with 58 additions and 54 deletions

View File

@ -20,6 +20,8 @@
#include <QtGui/QApplication>
#include "core/Global.h"
class Application : public QApplication
{
Q_OBJECT
@ -27,7 +29,7 @@ class Application : public QApplication
public:
Application(int& argc, char** argv);
bool event(QEvent* event);
bool event(QEvent* event) Q_DECL_OVERRIDE;
Q_SIGNALS:
void openFile(const QString& filename);

View File

@ -31,7 +31,7 @@ public:
explicit DialogyWidget(QWidget* parent = Q_NULLPTR);
protected:
virtual void keyPressEvent(QKeyEvent* e);
virtual void keyPressEvent(QKeyEvent* e) Q_DECL_OVERRIDE;
private:
bool clickButton(QDialogButtonBox::StandardButton standardButton);

View File

@ -30,11 +30,11 @@ public:
explicit DragTabBar(QWidget* parent = Q_NULLPTR);
protected:
void dragEnterEvent(QDragEnterEvent* event);
void dragMoveEvent(QDragMoveEvent* event);
void dragLeaveEvent(QDragLeaveEvent* event);
void dropEvent(QDropEvent* event);
void tabLayoutChange();
void dragEnterEvent(QDragEnterEvent* event) Q_DECL_OVERRIDE;
void dragMoveEvent(QDragMoveEvent* event) Q_DECL_OVERRIDE;
void dragLeaveEvent(QDragLeaveEvent* event) Q_DECL_OVERRIDE;
void dropEvent(QDropEvent* event) Q_DECL_OVERRIDE;
void tabLayoutChange() Q_DECL_OVERRIDE;
private Q_SLOTS:
void dragSwitchTab();

View File

@ -31,8 +31,8 @@ class DefaultIconModel : public QAbstractListModel
public:
explicit DefaultIconModel(QObject* parent = Q_NULLPTR);
int rowCount(const QModelIndex& parent = QModelIndex()) const;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
};
class CustomIconModel : public QAbstractListModel
@ -42,8 +42,8 @@ class CustomIconModel : public QAbstractListModel
public:
explicit CustomIconModel(QObject* parent = Q_NULLPTR);
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
void setIcons(const QHash<Uuid, QImage>& icons, const QList<Uuid>& iconsOrder);
Uuid uuidFromIndex(const QModelIndex& index) const;
QModelIndex indexFromUuid(const Uuid& uuid) const;

View File

@ -29,7 +29,7 @@ public:
~KeePass1OpenWidget();
protected:
void openDatabase();
void openDatabase() Q_DECL_OVERRIDE;
};
#endif // KEEPASSX_KEEPASS1OPENWIDGET_H

View File

@ -34,7 +34,7 @@ public:
explicit LineEdit(QWidget* parent = Q_NULLPTR);
protected:
void resizeEvent(QResizeEvent* event);
void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE;
private Q_SLOTS:
void updateCloseButton(const QString& text);

View File

@ -39,7 +39,7 @@ public Q_SLOTS:
const QString& keyFile = QString());
protected:
void closeEvent(QCloseEvent* event);
void closeEvent(QCloseEvent* event) Q_DECL_OVERRIDE;
private Q_SLOTS:
void setMenuActionState(DatabaseWidget::Mode mode = DatabaseWidget::None);

View File

@ -31,9 +31,9 @@ class EntryAttachmentsModel : public QAbstractListModel
public:
explicit EntryAttachmentsModel(QObject* parent = Q_NULLPTR);
void setEntryAttachments(EntryAttachments* entry);
int rowCount(const QModelIndex& parent = QModelIndex()) const;
int columnCount(const QModelIndex& parent = QModelIndex()) const;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
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 = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QString keyByIndex(const QModelIndex& index) const;
private Q_SLOTS:

View File

@ -31,12 +31,12 @@ class EntryAttributesModel : public QAbstractListModel
public:
explicit EntryAttributesModel(QObject* parent = Q_NULLPTR);
void setEntryAttributes(EntryAttributes* entryAttributes);
int rowCount(const QModelIndex& parent = QModelIndex()) const;
int columnCount(const QModelIndex& parent = QModelIndex()) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
Qt::ItemFlags flags(const QModelIndex& index) const;
int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex& index) const Q_DECL_OVERRIDE;
QModelIndex indexByKey(const QString& key) const;
QString keyByIndex(const QModelIndex& index) const;

View File

@ -32,10 +32,10 @@ public:
explicit EntryHistoryModel(QObject* parent = Q_NULLPTR);
Entry* entryFromIndex(const QModelIndex& index) const;
int columnCount(const QModelIndex& parent = QModelIndex()) const;
int rowCount(const QModelIndex& parent = QModelIndex()) const;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
int columnCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
void setEntries(const QList<Entry*>& entries);
void clear();

View File

@ -34,14 +34,14 @@ public:
Entry* entryFromIndex(const QModelIndex& index) const;
QModelIndex indexFromEntry(Entry* entry) const;
int rowCount(const QModelIndex& parent = QModelIndex()) const;
int columnCount(const QModelIndex& parent = QModelIndex()) const;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
Qt::DropActions supportedDropActions() const;
Qt::ItemFlags flags(const QModelIndex& modelIndex) const;
QStringList mimeTypes() const;
QMimeData* mimeData(const QModelIndexList& indexes) const;
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 = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex& modelIndex) const Q_DECL_OVERRIDE;
QStringList mimeTypes() const Q_DECL_OVERRIDE;
QMimeData* mimeData(const QModelIndexList& indexes) const Q_DECL_OVERRIDE;
void setEntries(const QList<Entry*>& entries);

View File

@ -33,7 +33,7 @@ class EntryView : public QTreeView
public:
explicit EntryView(QWidget* parent = Q_NULLPTR);
void setModel(QAbstractItemModel* model);
void setModel(QAbstractItemModel* model) Q_DECL_OVERRIDE;
Entry* currentEntry();
bool isSingleEntrySelected();
void setCurrentEntry(Entry* entry);

View File

@ -37,16 +37,16 @@ public:
int rowCount(const QModelIndex& parent = QModelIndex()) const;
int columnCount(const QModelIndex& parent = QModelIndex()) const;
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex& index) const;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
Qt::DropActions supportedDropActions() const;
Qt::ItemFlags flags(const QModelIndex& modelIndex) const;
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex parent(const QModelIndex& index) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex& modelIndex) const Q_DECL_OVERRIDE;
bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column,
const QModelIndex& parent);
QStringList mimeTypes() const;
QMimeData* mimeData(const QModelIndexList& indexes) const;
const QModelIndex& parent) Q_DECL_OVERRIDE;
QStringList mimeTypes() const Q_DECL_OVERRIDE;
QMimeData* mimeData(const QModelIndexList& indexes) const Q_DECL_OVERRIDE;
private:
QModelIndex parent(Group* group) const;

View File

@ -33,7 +33,7 @@ class GroupView : public QTreeView
public:
explicit GroupView(Database* db, QWidget* parent = Q_NULLPTR);
void changeDatabase(Database* newDb);
void setModel(QAbstractItemModel* model);
void setModel(QAbstractItemModel* model) Q_DECL_OVERRIDE;
Group* currentGroup();
void setCurrentGroup(Group* group);
void expandGroup(Group* group, bool expand = true);

View File

@ -35,8 +35,8 @@ public:
void close();
protected:
qint64 readData(char* data, qint64 maxSize);
qint64 writeData(const char* data, qint64 maxSize);
qint64 readData(char* data, qint64 maxSize) Q_DECL_OVERRIDE;
qint64 writeData(const char* data, qint64 maxSize) Q_DECL_OVERRIDE;
private:
void init();

View File

@ -20,6 +20,8 @@
#include <QtCore/QIODevice>
#include "core/Global.h"
class LayeredStream : public QIODevice
{
Q_OBJECT
@ -28,13 +30,13 @@ public:
explicit LayeredStream(QIODevice* baseDevice);
virtual ~LayeredStream();
bool isSequential() const;
bool isSequential() const Q_DECL_OVERRIDE;
virtual QString errorString() const;
bool open(QIODevice::OpenMode mode);
bool open(QIODevice::OpenMode mode) Q_DECL_OVERRIDE;
protected:
qint64 readData(char* data, qint64 maxSize);
qint64 writeData(const char* data, qint64 maxSize);
qint64 readData(char* data, qint64 maxSize) Q_DECL_OVERRIDE;
qint64 writeData(const char* data, qint64 maxSize) Q_DECL_OVERRIDE;
QIODevice* const m_baseDevice;

View File

@ -36,8 +36,8 @@ public:
void close();
protected:
qint64 readData(char* data, qint64 maxSize);
qint64 writeData(const char* data, qint64 maxSize);
qint64 readData(char* data, qint64 maxSize) Q_DECL_OVERRIDE;
qint64 writeData(const char* data, qint64 maxSize) Q_DECL_OVERRIDE;
private:
bool readBlock();