diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2016-07-19 19:51:41 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2016-07-19 20:14:40 +0200 |
commit | 782ebeada125e3d8a293c7806e34cc737c30ddda (patch) | |
tree | 5516ad24a7532d650289758abd5e92a35bc2240e /src/gui/itemmodels | |
parent | 091df96fb8da356dc9de81dc390f55e66d4d7c01 (diff) | |
parent | 62cbb434579a56871f0917bc306d592055381c00 (diff) | |
download | qtbase-782ebeada125e3d8a293c7806e34cc737c30ddda.tar.gz |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
qmake/library/qmakebuiltins.cpp
qmake/library/qmakeevaluator.cpp
qmake/library/qmakeevaluator.h
qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
changed the survivor
src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.
src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.
src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.
tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.
There was no git-conflict in
src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them. Put FixedColumnMatrix<>::removeRow(int)
back for its new user.
Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
Diffstat (limited to 'src/gui/itemmodels')
-rw-r--r-- | src/gui/itemmodels/qstandarditemmodel.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp index 3279880601..e965045524 100644 --- a/src/gui/itemmodels/qstandarditemmodel.cpp +++ b/src/gui/itemmodels/qstandarditemmodel.cpp @@ -1796,11 +1796,12 @@ QStandardItem *QStandardItem::takeChild(int row, int column) QList<QStandardItem*> QStandardItem::takeRow(int row) { Q_D(QStandardItem); + QList<QStandardItem*> items; if ((row < 0) || (row >= rowCount())) - return QList<QStandardItem*>(); + return items; if (d->model) d->model->d_func()->rowsAboutToBeRemoved(this, row, row); - QList<QStandardItem*> items; + int index = d->childIndex(row, 0); // Will return -1 if there are no columns if (index != -1) { int col_count = d->columnCount(); @@ -1829,13 +1830,15 @@ QList<QStandardItem*> QStandardItem::takeRow(int row) QList<QStandardItem*> QStandardItem::takeColumn(int column) { Q_D(QStandardItem); + QList<QStandardItem*> items; if ((column < 0) || (column >= columnCount())) - return QList<QStandardItem*>(); + return items; if (d->model) d->model->d_func()->columnsAboutToBeRemoved(this, column, column); - QList<QStandardItem*> items; - for (int row = d->rowCount() - 1; row >= 0; --row) { + const int rowCount = d->rowCount(); + items.reserve(rowCount); + for (int row = rowCount - 1; row >= 0; --row) { int index = d->childIndex(row, column); QStandardItem *ch = d->children.at(index); if (ch) |