Commit 36f60778 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add override + nullptr + use const'ref + remove unimplemented method

parent bc420af0
......@@ -30,13 +30,13 @@ class UserPermissionDelegate : public QItemDelegate
Q_OBJECT
public:
UserPermissionDelegate(QObject *parent = 0);
explicit UserPermissionDelegate(QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
void setEditorData(QWidget *editor, const QModelIndex &index) const;
const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const;
const QModelIndex &index) const override;
};
#endif
......@@ -32,15 +32,15 @@ class UserPermissionModel : public QAbstractTableModel
Q_OBJECT
public:
UserPermissionModel(KSambaShareData &shareData, QObject *parent = 0);
explicit UserPermissionModel(KSambaShareData &shareData, QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Qt::ItemFlags flags(const QModelIndex & index) const;
bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
Qt::ItemFlags flags(const QModelIndex & index) const override;
bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) override;
QString getAcl() const;
......
......@@ -299,7 +299,7 @@ void SambaUserSharePlugin::checkShareName(const QString &name)
}
}
QString SambaUserSharePlugin::getNewShareName()
QString SambaUserSharePlugin::getNewShareName() const
{
QString shareName = QUrl(m_url).fileName();
......
......@@ -46,7 +46,7 @@ class SambaUserSharePlugin : public KPropertiesDialogPlugin
public:
SambaUserSharePlugin(QObject *parent, const QList<QVariant> &args);
virtual ~SambaUserSharePlugin();
virtual void applyChanges();
void applyChanges() override;
private:
QString m_url;
......@@ -62,8 +62,7 @@ private:
void setupModel();
void setupViews();
QStringList getUsersList();
QString getNewShareName();
QString getNewShareName() const;
void load();
void toggleShareStatus(bool checked);
void checkShareName(const QString &name);
......
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