Commit 557d7948 authored by Laurent Montel's avatar Laurent Montel 😁

Use nullptr, add explicit keyword

parent 7e56359d
......@@ -25,7 +25,7 @@
#include <KLocalizedString>
DirectoryPicker::DirectoryPicker(QObject *parent) : QObject(parent),
m_dialog(0)
m_dialog(nullptr)
{
}
......
......@@ -32,7 +32,7 @@ class DirectoryPicker : public QObject
Q_PROPERTY(QUrl url READ url NOTIFY urlChanged)
public:
DirectoryPicker(QObject *parent = 0);
explicit DirectoryPicker(QObject *parent = nullptr);
~DirectoryPicker();
QUrl url() const;
......
......@@ -59,7 +59,7 @@ class DirLister : public KDirLister
Q_OBJECT
public:
DirLister(QObject *parent = 0);
explicit DirLister(QObject *parent = nullptr);
~DirLister();
Q_SIGNALS:
......@@ -122,7 +122,7 @@ class FolderModel : public QSortFilterProxyModel
};
Q_ENUM(Status)
FolderModel(QObject *parent = 0);
explicit FolderModel(QObject *parent = nullptr);
~FolderModel();
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
......
......@@ -24,8 +24,8 @@
#include <QSize>
ItemViewAdapter::ItemViewAdapter(QObject *parent) : KAbstractViewAdapter(parent),
m_adapterView(0),
m_adapterModel(0),
m_adapterView(nullptr),
m_adapterModel(nullptr),
m_adapterIconSize(-1)
{
}
......
......@@ -34,7 +34,7 @@ class ItemViewAdapter : public KAbstractViewAdapter
Q_PROPERTY(QRect adapterVisibleArea READ adapterVisibleArea WRITE setAdapterVisibleArea NOTIFY adapterVisibleAreaChanged)
public:
ItemViewAdapter(QObject* parent = 0);
explicit ItemViewAdapter(QObject* parent = nullptr);
QAbstractItemModel *model() const Q_DECL_OVERRIDE;
QSize iconSize() const Q_DECL_OVERRIDE;
......
......@@ -100,7 +100,7 @@ void LabelGenerator::setLabelText(const QString& text)
}
}
QString LabelGenerator::displayLabel()
QString LabelGenerator::displayLabel() const
{
if (!m_folderModel) {
return QString();
......
......@@ -37,7 +37,7 @@ class LabelGenerator : public QObject
Q_PROPERTY(QString displayLabel READ displayLabel NOTIFY displayLabelChanged)
public:
LabelGenerator(QObject *parent = 0);
explicit LabelGenerator(QObject *parent = nullptr);
~LabelGenerator();
FolderModel *folderModel() const;
......@@ -52,7 +52,7 @@ class LabelGenerator : public QObject
QString labelText() const;
void setLabelText(const QString &text);
QString displayLabel();
QString displayLabel() const;
Q_SIGNALS:
void folderModelChanged();
......
......@@ -30,7 +30,7 @@ class MenuHelper : public QObject
Q_OBJECT
public:
MenuHelper(QObject *parent = 0);
explicit MenuHelper(QObject *parent = nullptr);
~MenuHelper();
Q_INVOKABLE QString iconName(QAction *action);
......
......@@ -33,7 +33,7 @@ class MimeTypesModel : public QAbstractListModel
Q_PROPERTY(QStringList checkedTypes READ checkedTypes WRITE setCheckedTypes NOTIFY checkedTypesChanged)
public:
MimeTypesModel(QObject *parent = 0);
explicit MimeTypesModel(QObject *parent = nullptr);
~MimeTypesModel();
QHash<int, QByteArray> roleNames() const override;
......
......@@ -31,7 +31,7 @@ class PlacesModel : public QSortFilterProxyModel
Q_PROPERTY(bool activityLinkingEnabled READ activityLinkingEnabled CONSTANT)
public:
PlacesModel(QObject *parent = 0);
explicit PlacesModel(QObject *parent = nullptr);
~PlacesModel();
bool activityLinkingEnabled();
......
......@@ -27,7 +27,7 @@
Positioner::Positioner(QObject *parent): QAbstractItemModel(parent)
, m_enabled(false)
, m_folderModel(0)
, m_folderModel(nullptr)
, m_perStripe(0)
, m_lastRow(-1)
, m_ignoreNextTransaction(false)
......
......@@ -36,7 +36,7 @@ class Positioner : public QAbstractItemModel
Q_PROPERTY(QStringList positions READ positions WRITE setPositions NOTIFY positionsChanged)
public:
Positioner(QObject *parent = 0);
explicit Positioner(QObject *parent = nullptr);
~Positioner();
bool enabled() const;
......
......@@ -33,7 +33,7 @@ class PreviewPluginsModel : public QAbstractListModel
Q_PROPERTY(QStringList checkedPlugins READ checkedPlugins WRITE setCheckedPlugins NOTIFY checkedPluginsChanged)
public:
PreviewPluginsModel(QObject *parent = 0);
explicit PreviewPluginsModel(QObject *parent = nullptr);
~PreviewPluginsModel();
QHash<int, QByteArray> roleNames() const override;
......
......@@ -27,7 +27,7 @@ class RubberBand : public QQuickPaintedItem
Q_OBJECT
public:
RubberBand(QQuickItem *parent = 0);
explicit RubberBand(QQuickItem *parent = nullptr);
~RubberBand();
void paint(QPainter* painter) Q_DECL_OVERRIDE;
......
......@@ -39,9 +39,9 @@ class ShortCut : public QObject
Q_OBJECT
public:
explicit ShortCut(QObject *parent = Q_NULLPTR);
explicit ShortCut(QObject *parent = nullptr);
Q_INVOKABLE void installAsEventFilterFor(QObject *target = Q_NULLPTR);
Q_INVOKABLE void installAsEventFilterFor(QObject *target = nullptr);
Q_SIGNALS:
void deleteFile();
......
......@@ -30,7 +30,7 @@ class SubDialog : public PlasmaQuick::Dialog
Q_OBJECT
public:
SubDialog(QQuickItem *parent = 0);
explicit SubDialog(QQuickItem *parent = nullptr);
~SubDialog();
Q_INVOKABLE QRect availableScreenRectForItem(QQuickItem *item) const;
......
......@@ -30,7 +30,7 @@ class WheelInterceptor : public QQuickItem
Q_PROPERTY(QObject* destination READ destination WRITE setDestination NOTIFY destinationChanged)
public:
WheelInterceptor(QQuickItem *parent = 0);
explicit WheelInterceptor(QQuickItem *parent = nullptr);
~WheelInterceptor();
QObject *destination() const;
......
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