Commit bc9d0749 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix pedentic + use nullptr + override

parent 482071a6
......@@ -92,7 +92,7 @@ AbstractModel *AbstractModel::modelForRow(int row)
{
Q_UNUSED(row)
return 0;
return nullptr;
}
int AbstractModel::rowForModel(AbstractModel *model)
......
......@@ -36,7 +36,7 @@ class AbstractModel : public QAbstractListModel
Q_PROPERTY(AbstractModel* favoritesModel READ favoritesModel WRITE setFavoritesModel NOTIFY favoritesModelChanged)
public:
explicit AbstractModel(QObject *parent = 0);
explicit AbstractModel(QObject *parent = nullptr);
~AbstractModel();
QHash<int, QByteArray> roleNames() const override;
......
......@@ -50,8 +50,8 @@ class AppsModel : public AbstractModel, public QQmlParserStatus
public:
explicit AppsModel(const QString &entryPath = QString(), bool paginate = false, int pageSize = 24,
bool flat = false, bool sorted = true, bool separators = true, QObject *parent = 0);
explicit AppsModel(const QList<AbstractEntry *> entryList, bool deleteEntriesOnDestruction, QObject *parent = 0);
bool flat = false, bool sorted = true, bool separators = true, QObject *parent = nullptr);
explicit AppsModel(const QList<AbstractEntry *> entryList, bool deleteEntriesOnDestruction, QObject *parent = nullptr);
~AppsModel();
QString description() const override;
......
......@@ -40,7 +40,7 @@ class FilteredPlacesModel : public QSortFilterProxyModel
Q_OBJECT
public:
FilteredPlacesModel(QObject *parent = 0);
FilteredPlacesModel(QObject *parent = nullptr);
~FilteredPlacesModel();
QUrl url(const QModelIndex &index) const;
......@@ -60,7 +60,7 @@ class RunCommandModel : public AbstractModel
Q_OBJECT
public:
RunCommandModel(QObject *parent = 0);
RunCommandModel(QObject *parent = nullptr);
~RunCommandModel();
QString description() const override;
......@@ -81,7 +81,7 @@ class ComputerModel : public ForwardingModel
Q_PROPERTY(QStringList systemApplications READ systemApplications WRITE setSystemApplications NOTIFY systemApplicationsChanged)
public:
explicit ComputerModel(QObject *parent = 0);
explicit ComputerModel(QObject *parent = nullptr);
~ComputerModel();
QString description() const override;
......
......@@ -41,7 +41,7 @@ class ContainmentInterface : public QObject
Q_ENUM(Target)
ContainmentInterface(QObject *parent = 0);
ContainmentInterface(QObject *parent = nullptr);
~ContainmentInterface();
static Q_INVOKABLE bool mayAddLauncher(QObject *appletInterface, Target target, const QString &entryPath = QString());
......
......@@ -32,7 +32,7 @@ class DragHelper : public QObject
Q_PROPERTY(int dragIconSize READ dragIconSize WRITE setDragIconSize NOTIFY dragIconSizeChanged)
public:
DragHelper(QObject *parent = 0);
DragHelper(QObject *parent = nullptr);
~DragHelper();
int dragIconSize() const;
......
......@@ -28,10 +28,10 @@ class ForwardingModel : public AbstractModel
{
Q_OBJECT
Q_PROPERTY(QAbstractItemModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged);
Q_PROPERTY(QAbstractItemModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged)
public:
explicit ForwardingModel(QObject *parent = 0);
explicit ForwardingModel(QObject *parent = nullptr);
~ForwardingModel();
QString description() const override;
......
......@@ -27,7 +27,7 @@ class FunnelModel : public ForwardingModel
Q_OBJECT
public:
explicit FunnelModel(QObject *parent = 0);
explicit FunnelModel(QObject *parent = nullptr);
~FunnelModel();
void setSourceModel(QAbstractItemModel *model) override;
......
......@@ -51,7 +51,7 @@ class KAStatsFavoritesModel : public PlaceholderModel
Q_PROPERTY(QObject* activities READ activities CONSTANT)
public:
explicit KAStatsFavoritesModel(QObject *parent = 0);
explicit KAStatsFavoritesModel(QObject *parent = nullptr);
~KAStatsFavoritesModel();
QString description() const;
......
......@@ -27,7 +27,7 @@ class MenuEntryEditor : public QObject
Q_OBJECT
public:
MenuEntryEditor(QObject *parent = 0);
MenuEntryEditor(QObject *parent = nullptr);
~MenuEntryEditor();
bool canEdit(const QString &entryPath) const;
......
......@@ -34,7 +34,7 @@ class PlaceholderModel : public AbstractModel
Q_PROPERTY(int dropPlaceholderIndex READ dropPlaceholderIndex WRITE setDropPlaceholderIndex NOTIFY dropPlaceholderIndexChanged)
public:
explicit PlaceholderModel(QObject *parent = 0);
explicit PlaceholderModel(QObject *parent = nullptr);
~PlaceholderModel();
QString description() const;
......
......@@ -27,7 +27,7 @@ class ProcessRunner : public QObject
Q_OBJECT
public:
ProcessRunner(QObject *parent = 0);
ProcessRunner(QObject *parent = nullptr);
~ProcessRunner();
Q_INVOKABLE void runMenuEditor();
......
......@@ -32,7 +32,7 @@ class RecentContactsModel : public ForwardingModel
Q_OBJECT
public:
explicit RecentContactsModel(QObject *parent = 0);
explicit RecentContactsModel(QObject *parent = nullptr);
~RecentContactsModel();
QString description() const override;
......
......@@ -68,7 +68,7 @@ class RecentUsageModel : public ForwardingModel, public QQmlParserStatus
enum Ordering { Recent, Popular };
explicit RecentUsageModel(
QObject *parent = 0,
QObject *parent = nullptr,
IncludeUsage usage = AppsAndDocs,
int ordering = Recent);
~RecentUsageModel();
......
......@@ -60,7 +60,7 @@ class RootModel : public AppsModel
Q_PROPERTY(bool showPowerSession READ showPowerSession WRITE setShowPowerSession NOTIFY showPowerSessionChanged)
public:
explicit RootModel(QObject *parent = 0);
explicit RootModel(QObject *parent = nullptr);
~RootModel();
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
......
......@@ -37,7 +37,7 @@ class RunnerMatchesModel : public AbstractModel
public:
explicit RunnerMatchesModel(const QString &runnerId, const QString &name,
Plasma::RunnerManager *manager, QObject *parent = 0);
Plasma::RunnerManager *manager, QObject *parent = nullptr);
QString description() const override;
......
......@@ -42,13 +42,13 @@ class RunnerModel : public QAbstractListModel
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(AbstractModel* favoritesModel READ favoritesModel WRITE setFavoritesModel NOTIFY favoritesModelChanged)
Q_PROPERTY(QObject* appletInterface READ appletInterface WRITE setAppletInterface NOTIFY appletInterfaceChanged)
Q_PROPERTY(QStringList runners READ runners WRITE setRunners NOTIFY runnersChanged);
Q_PROPERTY(QString query READ query WRITE setQuery NOTIFY queryChanged);
Q_PROPERTY(QStringList runners READ runners WRITE setRunners NOTIFY runnersChanged)
Q_PROPERTY(QString query READ query WRITE setQuery NOTIFY queryChanged)
Q_PROPERTY(bool mergeResults READ mergeResults WRITE setMergeResults NOTIFY mergeResultsChanged)
Q_PROPERTY(bool deleteWhenEmpty READ deleteWhenEmpty WRITE setDeleteWhenEmpty NOTIFY deleteWhenEmptyChanged)
public:
explicit RunnerModel(QObject *parent = 0);
explicit RunnerModel(QObject *parent = nullptr);
~RunnerModel();
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
......
......@@ -36,7 +36,7 @@ class SimpleFavoritesModel : public AbstractModel
Q_PROPERTY(int dropPlaceholderIndex READ dropPlaceholderIndex WRITE setDropPlaceholderIndex NOTIFY dropPlaceholderIndexChanged)
public:
explicit SimpleFavoritesModel(QObject *parent = 0);
explicit SimpleFavoritesModel(QObject *parent = nullptr);
~SimpleFavoritesModel();
QString description() const override;
......
......@@ -33,7 +33,7 @@ class SubMenu : public PlasmaQuick::Dialog
Q_PROPERTY(bool facingLeft READ facingLeft NOTIFY facingLeftChanged)
public:
SubMenu(QQuickItem *parent = 0);
SubMenu(QQuickItem *parent = nullptr);
~SubMenu();
Q_INVOKABLE QRect availableScreenRectForItem(QQuickItem *item) const;
......
......@@ -29,7 +29,7 @@ class SystemModel : public AbstractModel
Q_OBJECT
public:
explicit SystemModel(QObject *parent = 0);
explicit SystemModel(QObject *parent = nullptr);
~SystemModel();
QString description() const override;
......
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