diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-06 11:55:39 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-07 20:35:05 +0200 |
commit | 471e4fcb226c4523efe93b1bdaf0db026495da94 (patch) | |
tree | bb963937b2446eb32d7632568433083a386f2c68 /src/gui/text/qtextodfwriter.cpp | |
parent | 7f400522c39f6a1abf083dc1af49ea3109635cc8 (diff) |
Use QList instead of QVector in gui implementation
Task-number: QTBUG-84469
Change-Id: I366e845249203d80d640355a7780ac2f91a762f1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/text/qtextodfwriter.cpp')
-rw-r--r-- | src/gui/text/qtextodfwriter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index 6e729cad28..62a655b43c 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -525,7 +525,7 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF void QTextOdfWriter::writeFormats(QXmlStreamWriter &writer, const QSet<int> &formats) const { writer.writeStartElement(officeNS, QString::fromLatin1("automatic-styles")); - QVector<QTextFormat> allStyles = m_document->allFormats(); + QList<QTextFormat> allStyles = m_document->allFormats(); for (int formatIndex : formats) { QTextFormat textFormat = allStyles.at(formatIndex); switch (textFormat.type()) { @@ -905,11 +905,11 @@ void QTextOdfWriter::writeTableFormat(QXmlStreamWriter &writer, QTextTableFormat } void QTextOdfWriter::writeTableCellFormat(QXmlStreamWriter &writer, QTextTableCellFormat format, - int formatIndex, QVector<QTextFormat> &styles) const + int formatIndex, QList<QTextFormat> &styles) const { // check for all table cells here if they are in a table with border if (m_cellFormatsInTablesWithBorders.contains(formatIndex)) { - const QVector<int> tableIdVector = m_cellFormatsInTablesWithBorders.value(formatIndex); + const QList<int> tableIdVector = m_cellFormatsInTablesWithBorders.value(formatIndex); for (const auto &tableId : tableIdVector) { const auto &tmpStyle = styles.at(tableId); if (tmpStyle.isTableFormat()) { @@ -1052,7 +1052,7 @@ bool QTextOdfWriter::writeAll() } // add objects for lists, frames and tables - const QVector<QTextFormat> allFormats = m_document->allFormats(); + const QList<QTextFormat> allFormats = m_document->allFormats(); const QList<int> copy = formats.values(); for (auto index : copy) { QTextObject *object = m_document->objectForFormat(allFormats[index]); @@ -1067,7 +1067,7 @@ bool QTextOdfWriter::writeAll() for (int rowindex = 0; rowindex < tableobject->rows(); ++rowindex) { for (int colindex = 0; colindex < tableobject->columns(); ++colindex) { const int cellFormatID = tableobject->cellAt(rowindex, colindex).tableCellFormatIndex(); - QVector<int> tableIdsTmp; + QList<int> tableIdsTmp; if (m_cellFormatsInTablesWithBorders.contains(cellFormatID)) tableIdsTmp = m_cellFormatsInTablesWithBorders.value(cellFormatID); if (!tableIdsTmp.contains(tableID)) |