diff options
Diffstat (limited to 'src/qt3support')
-rw-r--r-- | src/qt3support/itemviews/q3listbox.cpp | 6 | ||||
-rw-r--r-- | src/qt3support/sql/q3datatable.cpp | 2 | ||||
-rw-r--r-- | src/qt3support/text/q3richtext.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/qt3support/itemviews/q3listbox.cpp b/src/qt3support/itemviews/q3listbox.cpp index 796a3b8..f1574df 100644 --- a/src/qt3support/itemviews/q3listbox.cpp +++ b/src/qt3support/itemviews/q3listbox.cpp @@ -3531,9 +3531,9 @@ void Q3ListBox::refreshSlot() int col = columnAt(x); int row = rowAt(y); int top = row; - while(col < (int)d->columnPos.size()-1 && d->columnPos[col+1] < x) + while(col+1 < (int)d->columnPos.size() && d->columnPos[col+1] < x) col++; - while(top < (int)d->rowPos.size()-1 && d->rowPos[top+1] < y) + while(top+1 < (int)d->rowPos.size() && d->rowPos[top+1] < y) top++; Q3ListBoxItem * i = item(col * numRows() + row); @@ -3684,7 +3684,7 @@ int Q3ListBox::columnAt(int x) const return numColumns() - 1; int col = 0; - while(col < (int)d->columnPos.size()-1 && d->columnPos[col+1] < x) + while(col+1 < (int)d->columnPos.size() && d->columnPos[col+1] < x) col++; return col; } diff --git a/src/qt3support/sql/q3datatable.cpp b/src/qt3support/sql/q3datatable.cpp index 39ef1d9..35e9fda 100644 --- a/src/qt3support/sql/q3datatable.cpp +++ b/src/qt3support/sql/q3datatable.cpp @@ -710,7 +710,7 @@ bool Q3DataTable::eventFilter( QObject *o, QEvent *e ) return true; } if ( d->dat.mode() != QSql::None ) { - if ( (ke->key() == Qt::Key_Tab) && (c < numCols() - 1) && (!isColumnReadOnly( c+1 ) || d->dat.mode() == QSql::Insert) ) + if ( (ke->key() == Qt::Key_Tab) && (c+1 < numCols()) && (!isColumnReadOnly( c+1 ) || d->dat.mode() == QSql::Insert) ) d->continuousEdit = true; else if ( (ke->key() == Qt::Key_BackTab) && (c > 0) && (!isColumnReadOnly( c-1 ) || d->dat.mode() == QSql::Insert) ) d->continuousEdit = true; diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp index dc1476c..c367c0c 100644 --- a/src/qt3support/text/q3richtext.cpp +++ b/src/qt3support/text/q3richtext.cpp @@ -121,7 +121,7 @@ static inline bool isBreakable(Q3TextString *string, int pos) { if (string->at(pos).nobreak) return false; - return (pos < string->length()-1 && string->at(pos+1).softBreak); + return (pos+1 < string->length() && string->at(pos+1).softBreak); } // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |