QJsonDocumentPrivate: remove unused rawData{,Size} member variables
This is a followup to commit a6b3a1e4598f829b1b60407b2e47417db6f0e442 from 2020. Found while writing gdb pretty printers for QJsonDocument and friends. Change-Id: I223751003198dc9aab3f4b108d070296bb8112db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
9b0970ad82
commit
d52506e262
@ -56,24 +56,8 @@ class QJsonDocumentPrivate
|
||||
public:
|
||||
QJsonDocumentPrivate() = default;
|
||||
QJsonDocumentPrivate(QCborValue data) : value(std::move(data)) {}
|
||||
~QJsonDocumentPrivate()
|
||||
{
|
||||
if (rawData)
|
||||
free(rawData);
|
||||
}
|
||||
|
||||
QCborValue value;
|
||||
char *rawData = nullptr;
|
||||
uint rawDataSize = 0;
|
||||
|
||||
void clearRawData()
|
||||
{
|
||||
if (rawData) {
|
||||
free(rawData);
|
||||
rawData = nullptr;
|
||||
rawDataSize = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
@ -152,8 +136,6 @@ QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other)
|
||||
if (other.d) {
|
||||
if (!d)
|
||||
d = std::make_unique<QJsonDocumentPrivate>();
|
||||
else
|
||||
d->clearRawData();
|
||||
d->value = other.d->value;
|
||||
} else {
|
||||
d.reset();
|
||||
@ -375,8 +357,6 @@ void QJsonDocument::setObject(const QJsonObject &object)
|
||||
{
|
||||
if (!d)
|
||||
d = std::make_unique<QJsonDocumentPrivate>();
|
||||
else
|
||||
d->clearRawData();
|
||||
|
||||
d->value = QCborValue::fromJsonValue(object);
|
||||
}
|
||||
@ -390,8 +370,6 @@ void QJsonDocument::setArray(const QJsonArray &array)
|
||||
{
|
||||
if (!d)
|
||||
d = std::make_unique<QJsonDocumentPrivate>();
|
||||
else
|
||||
d->clearRawData();
|
||||
|
||||
d->value = QCborValue::fromJsonValue(array);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user