comparison data/model/ModelDataTableModel.cpp @ 1038:cc27f35aa75c cxx11

Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author Chris Cannam
date Tue, 03 Mar 2015 15:18:24 +0000
parents cd42620e3f40
children 2f49be7d4264
comparison
equal deleted inserted replaced
1037:bf0e5944289b 1038:cc27f35aa75c
153 if (parent.isValid()) return 0; 153 if (parent.isValid()) return 0;
154 return m_model->getColumnCount(); 154 return m_model->getColumnCount();
155 } 155 }
156 156
157 QModelIndex 157 QModelIndex
158 ModelDataTableModel::getModelIndexForFrame(int frame) const 158 ModelDataTableModel::getModelIndexForFrame(sv_frame_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, (void *)0); 162 return createIndex(getSorted(row), 0, (void *)0);
163 } 163 }
164 164
165 int 165 sv_frame_t
166 ModelDataTableModel::getFrameForModelIndex(const QModelIndex &index) const 166 ModelDataTableModel::getFrameForModelIndex(const QModelIndex &index) const
167 { 167 {
168 if (!m_model) return 0; 168 if (!m_model) return 0;
169 return m_model->getFrameForRow(getUnsorted(index.row())); 169 return m_model->getFrameForRow(getUnsorted(index.row()));
170 } 170 }