MCPcopy Create free account
hub / github.com/KDAB/KDChart / moveRow

Method moveRow

tests/Gantt/reorder/main.cpp:87–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 }
86
87 void moveRow(int from, int to)
88 {
89 if (from == to)
90 return;
91 if (from >= m_tasks.size() || to >= m_tasks.size() + 1)
92 return;
93
94 if (beginMoveRows(QModelIndex(), from, from, QModelIndex(), to)) {
95 m_tasks.move(from, to);
96 endMoveRows();
97 } else {
98 assert(0);
99 }
100 }
101};
102
103/* Test class to see the effect of moving rows */

Callers 1

~MoveHelperMethod · 0.45

Calls 2

sizeMethod · 0.80
QModelIndexClass · 0.50

Tested by

no test coverage detected