Warning--

This commit is contained in:
Laurent Montel 2018-04-13 09:05:17 +02:00
parent 2785916d01
commit a4eeca5190
19 changed files with 34 additions and 34 deletions

View File

@ -218,9 +218,9 @@ void DaysModel::setPluginsManager(QObject *manager)
return; return;
} }
if (m_pluginsManager != 0) { if (m_pluginsManager) {
m_pluginsManager->deleteLater(); m_pluginsManager->deleteLater();
m_pluginsManager = 0; m_pluginsManager = nullptr;
} }
m_pluginsManager = m; m_pluginsManager = m;

View File

@ -42,7 +42,7 @@ public:
m_roles.insert(Qt::EditRole, QByteArrayLiteral("checked")); m_roles.insert(Qt::EditRole, QByteArrayLiteral("checked"));
m_roles.insert(Qt::UserRole, QByteArrayLiteral("configUi")); m_roles.insert(Qt::UserRole, QByteArrayLiteral("configUi"));
m_roles.insert(Qt::UserRole + 1, QByteArrayLiteral("pluginPath")); m_roles.insert(Qt::UserRole + 1, QByteArrayLiteral("pluginPath"));
}; }
// make these two available to the manager // make these two available to the manager
void beginResetModel() void beginResetModel()

View File

@ -57,7 +57,7 @@ ColorScope *ColorScope::qmlAttachedProperties(QObject *object)
return cs; return cs;
} }
ColorScope *s = new ColorScope(0, object); ColorScope *s = new ColorScope(nullptr, object);
s_attachedScopes[object] = s; s_attachedScopes[object] = s;
s->m_inherit = true; s->m_inherit = true;
s->setParent(object); s->setParent(object);

View File

@ -88,7 +88,7 @@ class ColorScope : public QQuickItem
public: public:
/// @cond INTERNAL_DOCS /// @cond INTERNAL_DOCS
explicit ColorScope(QQuickItem *parent = nullptr, QObject *parentObject = nullptr); explicit ColorScope(QQuickItem *parent = nullptr, QObject *parentObject = nullptr);
~ColorScope(); ~ColorScope() Q_DECL_OVERRIDE;
void setColorGroup(Plasma::Theme::ColorGroup group); void setColorGroup(Plasma::Theme::ColorGroup group);
Plasma::Theme::ColorGroup colorGroup() const; Plasma::Theme::ColorGroup colorGroup() const;

View File

@ -217,7 +217,7 @@ int SortFilterModel::mapRowFromSource(int row) const
DataModel::DataModel(QObject *parent) DataModel::DataModel(QObject *parent)
: QAbstractItemModel(parent), : QAbstractItemModel(parent),
m_dataSource(0), m_dataSource(nullptr),
m_maxRoleId(Qt::UserRole + 1) m_maxRoleId(Qt::UserRole + 1)
{ {
//There is one reserved role name: DataEngineSource //There is one reserved role name: DataEngineSource
@ -293,7 +293,7 @@ void DataModel::setDataSource(QObject *object)
} }
if (m_dataSource) { if (m_dataSource) {
disconnect(m_dataSource, 0, this, 0); disconnect(m_dataSource, nullptr, this, nullptr);
} }
m_dataSource = source; m_dataSource = source;

View File

@ -514,7 +514,7 @@ QSGNode *FrameSvgItem::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaint
if (m_fastPath) { if (m_fastPath) {
if (m_textureChanged) { if (m_textureChanged) {
delete oldNode; delete oldNode;
oldNode = 0; oldNode = nullptr;
} }
if (!oldNode) { if (!oldNode) {

View File

@ -37,7 +37,7 @@
IconItem::IconItem(QQuickItem *parent) IconItem::IconItem(QQuickItem *parent)
: QQuickItem(parent), : QQuickItem(parent),
m_svgIcon(0), m_svgIcon(nullptr),
m_status(Plasma::Svg::Normal), m_status(Plasma::Svg::Normal),
m_smooth(true), m_smooth(true),
m_active(false), m_active(false),
@ -163,7 +163,7 @@ void IconItem::setSource(const QVariant &source)
m_imageIcon = QImage(localFile); m_imageIcon = QImage(localFile);
m_svgIconName.clear(); m_svgIconName.clear();
delete m_svgIcon; delete m_svgIcon;
m_svgIcon = 0; m_svgIcon = nullptr;
} else { } else {
if (!m_svgIcon) { if (!m_svgIcon) {
m_svgIcon = new Plasma::Svg(this); m_svgIcon = new Plasma::Svg(this);
@ -209,7 +209,7 @@ void IconItem::setSource(const QVariant &source)
} }
m_svgIconName.clear(); m_svgIconName.clear();
delete m_svgIcon; delete m_svgIcon;
m_svgIcon = 0; m_svgIcon = nullptr;
m_imageIcon = QImage(); m_imageIcon = QImage();
} }
} }
@ -220,19 +220,19 @@ void IconItem::setSource(const QVariant &source)
m_imageIcon = QImage(); m_imageIcon = QImage();
m_svgIconName.clear(); m_svgIconName.clear();
delete m_svgIcon; delete m_svgIcon;
m_svgIcon = 0; m_svgIcon = nullptr;
} else if (source.canConvert<QImage>()) { } else if (source.canConvert<QImage>()) {
m_icon = QIcon(); m_icon = QIcon();
m_imageIcon = source.value<QImage>(); m_imageIcon = source.value<QImage>();
m_svgIconName.clear(); m_svgIconName.clear();
delete m_svgIcon; delete m_svgIcon;
m_svgIcon = 0; m_svgIcon = nullptr;
} else { } else {
m_icon = QIcon(); m_icon = QIcon();
m_imageIcon = QImage(); m_imageIcon = QImage();
m_svgIconName.clear(); m_svgIconName.clear();
delete m_svgIcon; delete m_svgIcon;
m_svgIcon = 0; m_svgIcon = nullptr;
} }
if (width() > 0 && height() > 0) { if (width() > 0 && height() > 0) {
@ -470,7 +470,7 @@ QSGNode* IconItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *update
{ {
Q_UNUSED(updatePaintNodeData) Q_UNUSED(updatePaintNodeData)
if (m_iconPixmap.isNull() || width() == 0 || height() == 0) { if (m_iconPixmap.isNull() || width() == 0.0 || height() == 0.0) {
delete oldNode; delete oldNode;
return nullptr; return nullptr;
} }

View File

@ -126,7 +126,7 @@ class IconItem : public QQuickItem
public: public:
explicit IconItem(QQuickItem *parent = nullptr); explicit IconItem(QQuickItem *parent = nullptr);
~IconItem(); ~IconItem() Q_DECL_OVERRIDE;
void setSource(const QVariant &source); void setSource(const QVariant &source);
QVariant source() const; QVariant source() const;

View File

@ -36,7 +36,7 @@ void ServiceOperationStatus::setService(Plasma::Service *service)
} }
if (m_service) { if (m_service) {
disconnect(m_service.data(), 0, this, 0); disconnect(m_service.data(), nullptr, this, nullptr);
} }
if (service) { if (service) {
connect(service, &Plasma::Service::operationEnabledChanged, connect(service, &Plasma::Service::operationEnabledChanged,

View File

@ -86,7 +86,7 @@ QSizeF SvgItem::naturalSize() const
void SvgItem::setSvg(Plasma::Svg *svg) void SvgItem::setSvg(Plasma::Svg *svg)
{ {
if (m_svg) { if (m_svg) {
disconnect(m_svg.data(), 0, this, 0); disconnect(m_svg.data(), nullptr, this, nullptr);
} }
m_svg = svg; m_svg = svg;
updateDevicePixelRatio(); updateDevicePixelRatio();
@ -138,7 +138,7 @@ QSGNode *SvgItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updateP
} }
//this is more than just an optimisation, uploading a null image to QSGAtlasTexture causes a crash //this is more than just an optimisation, uploading a null image to QSGAtlasTexture causes a crash
if (width() == 0 || height() == 0) { if (width() == 0.0 || height() == 0.0) {
delete oldNode; delete oldNode;
return nullptr; return nullptr;
} }

View File

@ -127,8 +127,8 @@ class ToolTip : public QQuickItem
public: public:
/// @cond INTERNAL_DOCS /// @cond INTERNAL_DOCS
ToolTip(QQuickItem *parent = nullptr); explicit ToolTip(QQuickItem *parent = nullptr);
~ToolTip(); ~ToolTip() Q_DECL_OVERRIDE;
QQuickItem *mainItem() const; QQuickItem *mainItem() const;
void setMainItem(QQuickItem *mainItem); void setMainItem(QQuickItem *mainItem);

View File

@ -29,7 +29,7 @@
ToolTipDialog::ToolTipDialog(QQuickItem *parent) ToolTipDialog::ToolTipDialog(QQuickItem *parent)
: Dialog(parent), : Dialog(parent),
m_qmlObject(0), m_qmlObject(nullptr),
m_hideTimeout(4000), m_hideTimeout(4000),
m_interactive(false), m_interactive(false),
m_owner(nullptr) m_owner(nullptr)

View File

@ -43,8 +43,8 @@ class ToolTipDialog : public PlasmaQuick::Dialog
Q_OBJECT Q_OBJECT
public: public:
ToolTipDialog(QQuickItem *parent = nullptr); explicit ToolTipDialog(QQuickItem *parent = nullptr);
~ToolTipDialog(); ~ToolTipDialog() Q_DECL_OVERRIDE;
QQuickItem *loadDefaultItem(); QQuickItem *loadDefaultItem();

View File

@ -32,8 +32,8 @@ class SharedAppFilter : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
SharedAppFilter(QObject *parent = nullptr); explicit SharedAppFilter(QObject *parent = nullptr);
~SharedAppFilter(); ~SharedAppFilter() Q_DECL_OVERRIDE;
Q_SIGNALS: Q_SIGNALS:
void fontChanged(); void fontChanged();

View File

@ -102,7 +102,7 @@ class QMenuProxy : public QObject
public: public:
explicit QMenuProxy(QObject *parent = nullptr); explicit QMenuProxy(QObject *parent = nullptr);
~QMenuProxy(); ~QMenuProxy() Q_DECL_OVERRIDE;
QQmlListProperty<QMenuItem> content(); QQmlListProperty<QMenuItem> content();
int actionCount() const; int actionCount() const;

View File

@ -22,7 +22,7 @@
QMenuItem::QMenuItem(QQuickItem *parent) QMenuItem::QMenuItem(QQuickItem *parent)
: QQuickItem(parent), : QQuickItem(parent),
m_action(0), m_action(nullptr),
m_section(false) m_section(false)
{ {
setAction(new QAction(this)); setAction(new QAction(this));
@ -37,7 +37,7 @@ void QMenuItem::setAction(QAction *a)
{ {
if (m_action != a) { if (m_action != a) {
if (m_action) { if (m_action) {
disconnect(m_action, 0, this, 0); disconnect(m_action, nullptr, this, nullptr);
if (m_action->parent() == this) { if (m_action->parent() == this) {
delete m_action; delete m_action;

View File

@ -48,7 +48,7 @@ class QMenuItem : public QQuickItem
Q_PROPERTY(bool checked READ checked WRITE setChecked NOTIFY toggled) Q_PROPERTY(bool checked READ checked WRITE setChecked NOTIFY toggled)
public: public:
QMenuItem(QQuickItem *parent = nullptr); explicit QMenuItem(QQuickItem *parent = nullptr);
QAction *action() const; QAction *action() const;
void setAction(QAction *a); void setAction(QAction *a);

View File

@ -104,7 +104,7 @@ qreal QRangeModelPrivate::publicPosition(qreal position) const
const qreal positionValueRatio = valueRange ? (max - min) / valueRange : 0; const qreal positionValueRatio = valueRange ? (max - min) / valueRange : 0;
const qreal positionStep = stepSize * positionValueRatio; const qreal positionStep = stepSize * positionValueRatio;
if (positionStep == 0) { if (positionStep == 0.0) {
return (min < max) ? qBound(min, position, max) : qBound(max, position, min); return (min < max) ? qBound(min, position, max) : qBound(max, position, min);
} }
@ -146,7 +146,7 @@ qreal QRangeModelPrivate::publicValue(qreal value) const
// QML bindings; a position that is initially invalid because it lays // QML bindings; a position that is initially invalid because it lays
// outside the range, might become valid later if the range changes. // outside the range, might become valid later if the range changes.
if (stepSize == 0) { if (stepSize == 0.0) {
return qBound(minimum, value, maximum); return qBound(minimum, value, maximum);
} }
@ -215,7 +215,7 @@ QRangeModel::QRangeModel(QRangeModelPrivate &dd, QObject *parent)
QRangeModel::~QRangeModel() QRangeModel::~QRangeModel()
{ {
delete d_ptr; delete d_ptr;
d_ptr = 0; d_ptr = nullptr;
} }
/*! /*!

View File

@ -37,7 +37,7 @@ class AppBackgroundProvider : public QQuickImageProvider
public: public:
AppBackgroundProvider(); AppBackgroundProvider();
~AppBackgroundProvider(); ~AppBackgroundProvider() Q_DECL_OVERRIDE;
QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) Q_DECL_OVERRIDE; QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) Q_DECL_OVERRIDE;
private: private:
Plasma::Theme *m_theme; Plasma::Theme *m_theme;