diff options
Diffstat (limited to 'src/gui/text/qtexttable.cpp')
-rw-r--r-- | src/gui/text/qtexttable.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp index 9097b4e..3657698 100644 --- a/src/gui/text/qtexttable.cpp +++ b/src/gui/text/qtexttable.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE \brief The QTextTableCell class represents the properties of a cell in a QTextTable. - \ingroup text + \ingroup richtext-processing Table cells are pieces of document structure that belong to a table. The table orders cells into particular rows and columns; cells can @@ -432,6 +432,13 @@ void QTextTablePrivate::fragmentRemoved(const QChar &type, uint fragment) QTextFramePrivate::fragmentRemoved(type, fragment); } +/*! + /fn void QTextTablePrivate::update() const + + This function is usually called when the table is "dirty". + It seems to update all kind of table information. + +*/ void QTextTablePrivate::update() const { Q_Q(const QTextTable); @@ -439,7 +446,7 @@ void QTextTablePrivate::update() const nRows = (cells.size() + nCols-1)/nCols; // qDebug(">>>> QTextTablePrivate::update, nRows=%d, nCols=%d", nRows, nCols); - grid = (int *)realloc(grid, nRows*nCols*sizeof(int)); + grid = q_check_ptr((int *)realloc(grid, nRows*nCols*sizeof(int))); memset(grid, 0, nRows*nCols*sizeof(int)); QTextDocumentPrivate *p = pieceTable; @@ -463,7 +470,7 @@ void QTextTablePrivate::update() const cellIndices[i] = cell; if (r + rowspan > nRows) { - grid = (int *)realloc(grid, sizeof(int)*(r + rowspan)*nCols); + grid = q_check_ptr((int *)realloc(grid, sizeof(int)*(r + rowspan)*nCols)); memset(grid + (nRows*nCols), 0, sizeof(int)*(r+rowspan-nRows)*nCols); nRows = r + rowspan; } @@ -492,7 +499,7 @@ void QTextTablePrivate::update() const \brief The QTextTable class represents a table in a QTextDocument. - \ingroup text + \ingroup richtext-processing A table is a group of cells ordered into rows and columns. Each table contains at least one row and one column. Each cell contains a block, and |