comparison data/model/ModelDataTableModel.cpp @ 763:2b3a8ae04597 qt5

Get remainder of svcore building with Qt5
author Chris Cannam
date Mon, 11 Mar 2013 13:55:22 +0000
parents 1424aa29ae95
children e802e550a1f2
comparison
equal deleted inserted replaced
762:3b2409646cc0 763:2b3a8ae04597
127 } 127 }
128 128
129 QModelIndex 129 QModelIndex
130 ModelDataTableModel::index(int row, int column, const QModelIndex &parent) const 130 ModelDataTableModel::index(int row, int column, const QModelIndex &parent) const
131 { 131 {
132 return createIndex(row, column, 0); 132 return createIndex(row, column, (void *)0);
133 } 133 }
134 134
135 QModelIndex 135 QModelIndex
136 ModelDataTableModel::parent(const QModelIndex &index) const 136 ModelDataTableModel::parent(const QModelIndex &index) const
137 { 137 {
157 QModelIndex 157 QModelIndex
158 ModelDataTableModel::getModelIndexForFrame(size_t frame) const 158 ModelDataTableModel::getModelIndexForFrame(size_t frame) const
159 { 159 {
160 if (!m_model) return createIndex(0, 0); 160 if (!m_model) return createIndex(0, 0);
161 int row = m_model->getRowForFrame(frame); 161 int row = m_model->getRowForFrame(frame);
162 return createIndex(getSorted(row), 0, 0); 162 return createIndex(getSorted(row), 0, (void *)0);
163 } 163 }
164 164
165 size_t 165 size_t
166 ModelDataTableModel::getFrameForModelIndex(const QModelIndex &index) const 166 ModelDataTableModel::getFrameForModelIndex(const QModelIndex &index) const
167 { 167 {
204 m_sortColumn = column; 204 m_sortColumn = column;
205 m_sortOrdering = sortOrder; 205 m_sortOrdering = sortOrder;
206 int current = getCurrentRow(); 206 int current = getCurrentRow();
207 if (current != prevCurrent) { 207 if (current != prevCurrent) {
208 // std::cerr << "Current row changed from " << prevCurrent << " to " << current << " for underlying row " << m_currentRow << std::endl; 208 // std::cerr << "Current row changed from " << prevCurrent << " to " << current << " for underlying row " << m_currentRow << std::endl;
209 emit currentChanged(createIndex(current, 0, 0)); 209 emit currentChanged(createIndex(current, 0, (void *)0));
210 } 210 }
211 emit layoutChanged(); 211 emit layoutChanged();
212 } 212 }
213 213
214 void 214 void