mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-05 20:20:52 +01:00
Modernize-use-override refactors code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5009 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -45,7 +45,7 @@ class ECHSFileToFile : public ECHStrategy
|
||||
{
|
||||
public:
|
||||
ECHSFileToFile (ElementsLocation &source, ElementsLocation &destination);
|
||||
ElementsLocation copy();
|
||||
ElementsLocation copy() override;
|
||||
|
||||
private:
|
||||
ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, QString rename = QString());
|
||||
@@ -60,7 +60,7 @@ class ECHSXmlToFile : public ECHStrategy
|
||||
{
|
||||
public:
|
||||
ECHSXmlToFile (ElementsLocation &source, ElementsLocation &destination);
|
||||
ElementsLocation copy();
|
||||
ElementsLocation copy() override;
|
||||
|
||||
private:
|
||||
ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, QString rename = QString());
|
||||
@@ -76,7 +76,7 @@ class ECHSToXml : public ECHStrategy
|
||||
{
|
||||
public:
|
||||
ECHSToXml (ElementsLocation &source, ElementsLocation &destination);
|
||||
ElementsLocation copy();
|
||||
ElementsLocation copy() override;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ class ElementCollectionItem : public QStandardItem
|
||||
ElementCollectionItem();
|
||||
|
||||
enum {Type = UserType+1};
|
||||
virtual int type() const { return Type; }
|
||||
int type() const override { return Type; }
|
||||
|
||||
virtual bool isDir() const = 0;
|
||||
virtual bool isElement() const = 0;
|
||||
|
||||
@@ -35,11 +35,11 @@ class ElementsCollectionModel : public QStandardItemModel
|
||||
public:
|
||||
ElementsCollectionModel(QObject *parent = Q_NULLPTR);
|
||||
|
||||
virtual QVariant data(const QModelIndex &index, int role) const;
|
||||
virtual QMimeData *mimeData(const QModelIndexList &indexes) const;
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const override;
|
||||
QStringList mimeTypes() const override;
|
||||
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override;
|
||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
|
||||
|
||||
void loadCollections(bool common_collection, bool custom_collection, QList<QETProject *> projects);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class ElementsCollectionWidget : public QWidget
|
||||
void setCurrentLocation(const ElementsLocation &location);
|
||||
|
||||
protected:
|
||||
virtual void leaveEvent(QEvent *event);
|
||||
void leaveEvent(QEvent *event) override;
|
||||
|
||||
private:
|
||||
void setUpAction();
|
||||
|
||||
@@ -34,7 +34,7 @@ class ElementsTreeView : public QTreeView
|
||||
ElementsTreeView(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
virtual void startDrag(Qt::DropActions supportedActions);
|
||||
void startDrag(Qt::DropActions supportedActions) override;
|
||||
virtual void startElementDrag(const ElementsLocation &location);
|
||||
};
|
||||
|
||||
|
||||
@@ -31,24 +31,24 @@ class FileElementCollectionItem : public ElementCollectionItem
|
||||
FileElementCollectionItem();
|
||||
|
||||
enum { Type = UserType+2 };
|
||||
virtual int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
bool setRootPath(QString path, bool set_data = true, bool hide_element = false);
|
||||
QString fileSystemPath() const;
|
||||
QString dirPath() const;
|
||||
|
||||
virtual bool isDir() const;
|
||||
virtual bool isElement() const;
|
||||
virtual QString localName();
|
||||
virtual QString name() const;
|
||||
virtual QString collectionPath() const;
|
||||
virtual bool isCollectionRoot() const;
|
||||
bool isDir() const override;
|
||||
bool isElement() const override;
|
||||
QString localName() override;
|
||||
QString name() const override;
|
||||
QString collectionPath() const override;
|
||||
bool isCollectionRoot() const override;
|
||||
bool isCommonCollection() const;
|
||||
bool isCustomCollection() const;
|
||||
virtual void addChildAtPath(const QString &collection_name);
|
||||
void addChildAtPath(const QString &collection_name) override;
|
||||
|
||||
void setUpData();
|
||||
void setUpIcon();
|
||||
void setUpData() override;
|
||||
void setUpIcon() override;
|
||||
|
||||
void hire();
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class RenameDialog : public QDialog
|
||||
|
||||
public:
|
||||
explicit RenameDialog(QString path, QWidget *parent = nullptr);
|
||||
~RenameDialog();
|
||||
~RenameDialog() override;
|
||||
|
||||
QString newName() const {return m_new_name;}
|
||||
QET::Action selectedAction() const {return m_action;}
|
||||
|
||||
@@ -33,21 +33,21 @@ class XmlProjectElementCollectionItem : public ElementCollectionItem
|
||||
XmlProjectElementCollectionItem();
|
||||
|
||||
enum {Type = UserType+3};
|
||||
virtual int type() const { return Type; }
|
||||
int type() const override { return Type; }
|
||||
|
||||
virtual bool isDir() const;
|
||||
virtual bool isElement() const;
|
||||
virtual QString localName();
|
||||
virtual QString name() const;
|
||||
virtual QString collectionPath() const;
|
||||
bool isDir() const override;
|
||||
bool isElement() const override;
|
||||
QString localName() override;
|
||||
QString name() const override;
|
||||
QString collectionPath() const override;
|
||||
virtual QString embeddedPath() const;
|
||||
virtual bool isCollectionRoot() const;
|
||||
virtual void addChildAtPath(const QString &collection_name);
|
||||
bool isCollectionRoot() const override;
|
||||
void addChildAtPath(const QString &collection_name) override;
|
||||
QETProject * project() const;
|
||||
|
||||
void setProject (QETProject *project, bool set_data = true, bool hide_element = false);
|
||||
void setUpData();
|
||||
void setUpIcon();
|
||||
void setUpData() override;
|
||||
void setUpIcon() override;
|
||||
|
||||
private:
|
||||
void populate(bool set_data = true, bool hide_element = false);
|
||||
|
||||
Reference in New Issue
Block a user