Browse Source

Fix memery leak of QXlsx::Cell

master
Debao Zhang 11 years ago
parent
commit
5adda5735a
  1. 8
      src/xlsx/xlsxcell.cpp
  2. 2
      src/xlsx/xlsxcell.h

8
src/xlsx/xlsxcell.cpp

@ -58,6 +58,14 @@ Cell::Cell(const QVariant &data, DataType type, Format *format, Worksheet *paren
d_ptr->parent = parent;
}
/*!
* Destroys the Cell and cleans up.
*/
Cell::~Cell()
{
delete d_ptr;
}
/*!
* Return the dataType of this Cell
*/

2
src/xlsx/xlsxcell.h

@ -57,12 +57,12 @@ public:
bool isDateTime() const;
QDateTime dateTime() const;
~Cell();
private:
friend class Worksheet;
friend class WorksheetPrivate;
Cell(const QVariant &data=QVariant(), DataType type=Blank, Format *format=0, Worksheet *parent=0);
CellPrivate * const d_ptr;
};

Loading…
Cancel
Save