Warning--
This commit is contained in:
parent
2785916d01
commit
a4eeca5190
@ -218,9 +218,9 @@ void DaysModel::setPluginsManager(QObject *manager)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pluginsManager != 0) {
|
||||
if (m_pluginsManager) {
|
||||
m_pluginsManager->deleteLater();
|
||||
m_pluginsManager = 0;
|
||||
m_pluginsManager = nullptr;
|
||||
}
|
||||
|
||||
m_pluginsManager = m;
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
m_roles.insert(Qt::EditRole, QByteArrayLiteral("checked"));
|
||||
m_roles.insert(Qt::UserRole, QByteArrayLiteral("configUi"));
|
||||
m_roles.insert(Qt::UserRole + 1, QByteArrayLiteral("pluginPath"));
|
||||
};
|
||||
}
|
||||
|
||||
// make these two available to the manager
|
||||
void beginResetModel()
|
||||
|
@ -57,7 +57,7 @@ ColorScope *ColorScope::qmlAttachedProperties(QObject *object)
|
||||
return cs;
|
||||
}
|
||||
|
||||
ColorScope *s = new ColorScope(0, object);
|
||||
ColorScope *s = new ColorScope(nullptr, object);
|
||||
s_attachedScopes[object] = s;
|
||||
s->m_inherit = true;
|
||||
s->setParent(object);
|
||||
|
@ -88,7 +88,7 @@ class ColorScope : public QQuickItem
|
||||
public:
|
||||
/// @cond INTERNAL_DOCS
|
||||
explicit ColorScope(QQuickItem *parent = nullptr, QObject *parentObject = nullptr);
|
||||
~ColorScope();
|
||||
~ColorScope() Q_DECL_OVERRIDE;
|
||||
|
||||
void setColorGroup(Plasma::Theme::ColorGroup group);
|
||||
Plasma::Theme::ColorGroup colorGroup() const;
|
||||
|
@ -217,7 +217,7 @@ int SortFilterModel::mapRowFromSource(int row) const
|
||||
|
||||
DataModel::DataModel(QObject *parent)
|
||||
: QAbstractItemModel(parent),
|
||||
m_dataSource(0),
|
||||
m_dataSource(nullptr),
|
||||
m_maxRoleId(Qt::UserRole + 1)
|
||||
{
|
||||
//There is one reserved role name: DataEngineSource
|
||||
@ -293,7 +293,7 @@ void DataModel::setDataSource(QObject *object)
|
||||
}
|
||||
|
||||
if (m_dataSource) {
|
||||
disconnect(m_dataSource, 0, this, 0);
|
||||
disconnect(m_dataSource, nullptr, this, nullptr);
|
||||
}
|
||||
|
||||
m_dataSource = source;
|
||||
|
@ -514,7 +514,7 @@ QSGNode *FrameSvgItem::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaint
|
||||
if (m_fastPath) {
|
||||
if (m_textureChanged) {
|
||||
delete oldNode;
|
||||
oldNode = 0;
|
||||
oldNode = nullptr;
|
||||
}
|
||||
|
||||
if (!oldNode) {
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
IconItem::IconItem(QQuickItem *parent)
|
||||
: QQuickItem(parent),
|
||||
m_svgIcon(0),
|
||||
m_svgIcon(nullptr),
|
||||
m_status(Plasma::Svg::Normal),
|
||||
m_smooth(true),
|
||||
m_active(false),
|
||||
@ -163,7 +163,7 @@ void IconItem::setSource(const QVariant &source)
|
||||
m_imageIcon = QImage(localFile);
|
||||
m_svgIconName.clear();
|
||||
delete m_svgIcon;
|
||||
m_svgIcon = 0;
|
||||
m_svgIcon = nullptr;
|
||||
} else {
|
||||
if (!m_svgIcon) {
|
||||
m_svgIcon = new Plasma::Svg(this);
|
||||
@ -209,7 +209,7 @@ void IconItem::setSource(const QVariant &source)
|
||||
}
|
||||
m_svgIconName.clear();
|
||||
delete m_svgIcon;
|
||||
m_svgIcon = 0;
|
||||
m_svgIcon = nullptr;
|
||||
m_imageIcon = QImage();
|
||||
}
|
||||
}
|
||||
@ -220,19 +220,19 @@ void IconItem::setSource(const QVariant &source)
|
||||
m_imageIcon = QImage();
|
||||
m_svgIconName.clear();
|
||||
delete m_svgIcon;
|
||||
m_svgIcon = 0;
|
||||
m_svgIcon = nullptr;
|
||||
} else if (source.canConvert<QImage>()) {
|
||||
m_icon = QIcon();
|
||||
m_imageIcon = source.value<QImage>();
|
||||
m_svgIconName.clear();
|
||||
delete m_svgIcon;
|
||||
m_svgIcon = 0;
|
||||
m_svgIcon = nullptr;
|
||||
} else {
|
||||
m_icon = QIcon();
|
||||
m_imageIcon = QImage();
|
||||
m_svgIconName.clear();
|
||||
delete m_svgIcon;
|
||||
m_svgIcon = 0;
|
||||
m_svgIcon = nullptr;
|
||||
}
|
||||
|
||||
if (width() > 0 && height() > 0) {
|
||||
@ -470,7 +470,7 @@ QSGNode* IconItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *update
|
||||
{
|
||||
Q_UNUSED(updatePaintNodeData)
|
||||
|
||||
if (m_iconPixmap.isNull() || width() == 0 || height() == 0) {
|
||||
if (m_iconPixmap.isNull() || width() == 0.0 || height() == 0.0) {
|
||||
delete oldNode;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ class IconItem : public QQuickItem
|
||||
|
||||
public:
|
||||
explicit IconItem(QQuickItem *parent = nullptr);
|
||||
~IconItem();
|
||||
~IconItem() Q_DECL_OVERRIDE;
|
||||
|
||||
void setSource(const QVariant &source);
|
||||
QVariant source() const;
|
||||
|
@ -36,7 +36,7 @@ void ServiceOperationStatus::setService(Plasma::Service *service)
|
||||
}
|
||||
|
||||
if (m_service) {
|
||||
disconnect(m_service.data(), 0, this, 0);
|
||||
disconnect(m_service.data(), nullptr, this, nullptr);
|
||||
}
|
||||
if (service) {
|
||||
connect(service, &Plasma::Service::operationEnabledChanged,
|
||||
|
@ -86,7 +86,7 @@ QSizeF SvgItem::naturalSize() const
|
||||
void SvgItem::setSvg(Plasma::Svg *svg)
|
||||
{
|
||||
if (m_svg) {
|
||||
disconnect(m_svg.data(), 0, this, 0);
|
||||
disconnect(m_svg.data(), nullptr, this, nullptr);
|
||||
}
|
||||
m_svg = svg;
|
||||
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
|
||||
if (width() == 0 || height() == 0) {
|
||||
if (width() == 0.0 || height() == 0.0) {
|
||||
delete oldNode;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -127,8 +127,8 @@ class ToolTip : public QQuickItem
|
||||
|
||||
public:
|
||||
/// @cond INTERNAL_DOCS
|
||||
ToolTip(QQuickItem *parent = nullptr);
|
||||
~ToolTip();
|
||||
explicit ToolTip(QQuickItem *parent = nullptr);
|
||||
~ToolTip() Q_DECL_OVERRIDE;
|
||||
|
||||
QQuickItem *mainItem() const;
|
||||
void setMainItem(QQuickItem *mainItem);
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
ToolTipDialog::ToolTipDialog(QQuickItem *parent)
|
||||
: Dialog(parent),
|
||||
m_qmlObject(0),
|
||||
m_qmlObject(nullptr),
|
||||
m_hideTimeout(4000),
|
||||
m_interactive(false),
|
||||
m_owner(nullptr)
|
||||
|
@ -43,8 +43,8 @@ class ToolTipDialog : public PlasmaQuick::Dialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ToolTipDialog(QQuickItem *parent = nullptr);
|
||||
~ToolTipDialog();
|
||||
explicit ToolTipDialog(QQuickItem *parent = nullptr);
|
||||
~ToolTipDialog() Q_DECL_OVERRIDE;
|
||||
|
||||
QQuickItem *loadDefaultItem();
|
||||
|
||||
|
@ -32,8 +32,8 @@ class SharedAppFilter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SharedAppFilter(QObject *parent = nullptr);
|
||||
~SharedAppFilter();
|
||||
explicit SharedAppFilter(QObject *parent = nullptr);
|
||||
~SharedAppFilter() Q_DECL_OVERRIDE;
|
||||
|
||||
Q_SIGNALS:
|
||||
void fontChanged();
|
||||
|
@ -102,7 +102,7 @@ class QMenuProxy : public QObject
|
||||
|
||||
public:
|
||||
explicit QMenuProxy(QObject *parent = nullptr);
|
||||
~QMenuProxy();
|
||||
~QMenuProxy() Q_DECL_OVERRIDE;
|
||||
|
||||
QQmlListProperty<QMenuItem> content();
|
||||
int actionCount() const;
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
QMenuItem::QMenuItem(QQuickItem *parent)
|
||||
: QQuickItem(parent),
|
||||
m_action(0),
|
||||
m_action(nullptr),
|
||||
m_section(false)
|
||||
{
|
||||
setAction(new QAction(this));
|
||||
@ -37,7 +37,7 @@ void QMenuItem::setAction(QAction *a)
|
||||
{
|
||||
if (m_action != a) {
|
||||
if (m_action) {
|
||||
disconnect(m_action, 0, this, 0);
|
||||
disconnect(m_action, nullptr, this, nullptr);
|
||||
|
||||
if (m_action->parent() == this) {
|
||||
delete m_action;
|
||||
|
@ -48,7 +48,7 @@ class QMenuItem : public QQuickItem
|
||||
Q_PROPERTY(bool checked READ checked WRITE setChecked NOTIFY toggled)
|
||||
|
||||
public:
|
||||
QMenuItem(QQuickItem *parent = nullptr);
|
||||
explicit QMenuItem(QQuickItem *parent = nullptr);
|
||||
|
||||
QAction *action() const;
|
||||
void setAction(QAction *a);
|
||||
|
@ -104,7 +104,7 @@ qreal QRangeModelPrivate::publicPosition(qreal position) const
|
||||
const qreal positionValueRatio = valueRange ? (max - min) / valueRange : 0;
|
||||
const qreal positionStep = stepSize * positionValueRatio;
|
||||
|
||||
if (positionStep == 0) {
|
||||
if (positionStep == 0.0) {
|
||||
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
|
||||
// outside the range, might become valid later if the range changes.
|
||||
|
||||
if (stepSize == 0) {
|
||||
if (stepSize == 0.0) {
|
||||
return qBound(minimum, value, maximum);
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ QRangeModel::QRangeModel(QRangeModelPrivate &dd, QObject *parent)
|
||||
QRangeModel::~QRangeModel()
|
||||
{
|
||||
delete d_ptr;
|
||||
d_ptr = 0;
|
||||
d_ptr = nullptr;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -37,7 +37,7 @@ class AppBackgroundProvider : public QQuickImageProvider
|
||||
|
||||
public:
|
||||
AppBackgroundProvider();
|
||||
~AppBackgroundProvider();
|
||||
~AppBackgroundProvider() Q_DECL_OVERRIDE;
|
||||
QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) Q_DECL_OVERRIDE;
|
||||
private:
|
||||
Plasma::Theme *m_theme;
|
||||
|
Loading…
Reference in New Issue
Block a user