Use the "nullptr" literal.
This commit is contained in:
parent
409161c302
commit
304ff66b06
|
@ -1641,7 +1641,7 @@ auto dxfRW::writeImage(DRW_Image *ent, const std::string &name) -> DRW_ImageDef
|
|||
{
|
||||
// search if exist imagedef with this mane (image inserted more than 1 time)
|
||||
// RLZ: imagedef_reactor seem needed to read in acad
|
||||
DRW_ImageDef *id = NULL;
|
||||
DRW_ImageDef *id = nullptr;
|
||||
for (unsigned int i = 0; i < imageDef.size(); i++)
|
||||
{
|
||||
if (imageDef.at(i)->name == name)
|
||||
|
@ -1682,7 +1682,7 @@ auto dxfRW::writeImage(DRW_Image *ent, const std::string &name) -> DRW_ImageDef
|
|||
id->reactors[idReactor] = toHexStr(static_cast<int>(ent->handle));
|
||||
return id;
|
||||
}
|
||||
return NULL; // not exist in acad 12
|
||||
return nullptr; // not exist in acad 12
|
||||
}
|
||||
|
||||
auto dxfRW::writeBlockRecord(std::string name) -> bool
|
||||
|
|
|
@ -20,15 +20,16 @@
|
|||
|
||||
#include "vemptyproperty.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QFlags>
|
||||
#include <QFont>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "../vproperty.h"
|
||||
|
||||
namespace VPE {
|
||||
namespace VPE
|
||||
{
|
||||
class VPropertyPrivate;
|
||||
} // namespace VPE
|
||||
|
||||
|
@ -42,13 +43,11 @@ VPE::VEmptyProperty::VEmptyProperty(const QString& name)
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
VPE::VEmptyProperty::VEmptyProperty(VPropertyPrivate *d)
|
||||
: VProperty(d)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
VPE::VEmptyProperty::~VEmptyProperty()
|
||||
{
|
||||
//
|
||||
|
@ -85,10 +84,9 @@ auto VPE::VEmptyProperty::createEditor(QWidget *parent, const QStyleOptionViewIt
|
|||
Q_UNUSED(parent)
|
||||
Q_UNUSED(delegate)
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
//! Gets the data from the widget
|
||||
auto VPE::VEmptyProperty::getEditorData(const QWidget *editor) const -> QVariant
|
||||
{
|
||||
|
|
|
@ -20,22 +20,22 @@
|
|||
|
||||
#include "vpropertyfactorymanager.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QStringList>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "vabstractpropertyfactory.h"
|
||||
#include "vproperty.h"
|
||||
#include "vpropertyfactorymanager_p.h"
|
||||
#include "vstandardpropertyfactory.h"
|
||||
|
||||
VPE::VPropertyFactoryManager* VPE::VPropertyFactoryManager::DefaultManager = NULL;
|
||||
VPE::VPropertyFactoryManager *VPE::VPropertyFactoryManager::DefaultManager = nullptr;
|
||||
|
||||
VPE::VPropertyFactoryManager::VPropertyFactoryManager(QObject *parent)
|
||||
: QObject(parent), d_ptr(new VPropertyFactoryManagerPrivate())
|
||||
: QObject(parent),
|
||||
d_ptr(new VPropertyFactoryManagerPrivate())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
VPE::VPropertyFactoryManager::~VPropertyFactoryManager()
|
||||
|
@ -49,7 +49,6 @@ VPE::VPropertyFactoryManager::~VPropertyFactoryManager()
|
|||
delete tmpFactory;
|
||||
}
|
||||
|
||||
|
||||
delete d_ptr;
|
||||
if (this == DefaultManager)
|
||||
{
|
||||
|
@ -120,7 +119,7 @@ auto VPE::VPropertyFactoryManager::createProperty(const QString &type, const QSt
|
|||
const QString &default_value) -> VPE::VProperty *
|
||||
{
|
||||
VAbstractPropertyFactory *tmpFactory = getFactory(type);
|
||||
VProperty* tmpResult = NULL;
|
||||
VProperty *tmpResult = nullptr;
|
||||
if (tmpFactory)
|
||||
{
|
||||
tmpResult = tmpFactory->createProperty(type, name);
|
||||
|
|
|
@ -168,7 +168,7 @@ class ColorPickerItem : public QFrame
|
|||
Q_OBJECT // NOLINT
|
||||
|
||||
public:
|
||||
ColorPickerItem(const QColor &color = Qt::white, const QString &text = QString(), QWidget *parent = 0);
|
||||
ColorPickerItem(const QColor &color = Qt::white, const QString &text = QString(), QWidget *parent = nullptr);
|
||||
~ColorPickerItem();
|
||||
|
||||
auto color() const -> QColor;
|
||||
|
@ -573,7 +573,7 @@ ColorPickerPopup::ColorPickerPopup(int width, bool withColorDialog, QWidget *par
|
|||
}
|
||||
else
|
||||
{
|
||||
moreButton = 0;
|
||||
moreButton = nullptr;
|
||||
}
|
||||
|
||||
eventLoop = nullptr;
|
||||
|
@ -709,7 +709,7 @@ void ColorPickerPopup::updateSelected()
|
|||
{
|
||||
QLayoutItem *layoutItem;
|
||||
int i = 0;
|
||||
while ((layoutItem = grid->itemAt(i)) != 0)
|
||||
while ((layoutItem = grid->itemAt(i)) != nullptr)
|
||||
{
|
||||
QWidget *w = layoutItem->widget();
|
||||
if (w && w->inherits("ColorPickerItem"))
|
||||
|
@ -832,7 +832,7 @@ void ColorPickerPopup::keyPressEvent(QKeyEvent *e)
|
|||
|
||||
QLayoutItem *layoutItem;
|
||||
int i = 0;
|
||||
while ((layoutItem = grid->itemAt(i)) != 0)
|
||||
while ((layoutItem = grid->itemAt(i)) != nullptr)
|
||||
{
|
||||
QWidget *wl = layoutItem->widget();
|
||||
if (wl && wl->inherits("ColorPickerItem"))
|
||||
|
@ -857,7 +857,7 @@ void ColorPickerPopup::keyPressEvent(QKeyEvent *e)
|
|||
|
||||
QLayoutItem *layoutItem;
|
||||
int i = 0;
|
||||
while ((layoutItem = grid->itemAt(i)) != 0)
|
||||
while ((layoutItem = grid->itemAt(i)) != nullptr)
|
||||
{
|
||||
QWidget *wl = layoutItem->widget();
|
||||
if (wl && wl->inherits("ColorPickerItem"))
|
||||
|
|
|
@ -64,7 +64,7 @@ class QtColorPicker : public QPushButton
|
|||
Q_PROPERTY(bool colorDialog READ colorDialogEnabled WRITE setColorDialogEnabled)
|
||||
|
||||
public:
|
||||
explicit QtColorPicker(QWidget *parent = 0, int columns = -1, bool enableColorDialog = true);
|
||||
explicit QtColorPicker(QWidget *parent = nullptr, int columns = -1, bool enableColorDialog = true);
|
||||
|
||||
~QtColorPicker() override;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user