File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ void BaseSqlTableModel::select() {
265265 // the the first column always contains the id?
266266 DEBUG_ASSERT (idColumn == kIdColumn );
267267
268- VERIFY_OR_DEBUG_ASSERT (idColumn >= 0 ) {
268+ VERIFY_OR_DEBUG_ASSERT (idColumn != - 1 ) {
269269 qCritical ()
270270 << " ID column not available in database query results:"
271271 << m_idColumn;
@@ -280,10 +280,10 @@ void BaseSqlTableModel::select() {
280280 // current position defines the ordering
281281 rowInfo.order = rowInfos.size ();
282282
283- if (posColumn < 0 && !m_positionColumn.isEmpty ()) {
283+ if (posColumn == - 1 && !m_positionColumn.isEmpty ()) {
284284 posColumn = sqlRecord.indexOf (m_positionColumn);
285285 }
286- if (posColumn >= 0 ) {
286+ if (posColumn != - 1 ) {
287287 bool ok = false ;
288288 int pos = sqlRecord.value (posColumn).toInt (&ok);
289289 if (ok) {
@@ -351,7 +351,7 @@ void BaseSqlTableModel::select() {
351351 DEBUG_ASSERT (trackIdToRows.size () <= rowInfos.size ());
352352
353353 TrackPos2Row trackPosToRows;
354- if (posColumn >= 0 ) {
354+ if (posColumn != - 1 ) {
355355 // We expect as many positions as we have rows
356356 trackPosToRows.reserve (rowInfos.size ());
357357 for (int i = 0 ; i < rowInfos.size (); ++i) {
You can’t perform that action at this time.
0 commit comments