diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qxpmhandler.cpp | 2 | ||||
-rw-r--r-- | src/sql/models/qsqltablemodel.cpp | 4 | ||||
-rw-r--r-- | src/sql/models/qsqltablemodel_p.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp index a02b3ff..76cd813 100644 --- a/src/gui/image/qxpmhandler.cpp +++ b/src/gui/image/qxpmhandler.cpp @@ -882,7 +882,7 @@ static bool read_xpm_body( QByteArray buf(200, 0); int i; - if (cpp > 15) + if (cpp < 0 || cpp > 15) return false; // For > 256 colors, we delay creation of the image until diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 4df1d63..bf7c0aa 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -657,7 +657,7 @@ bool QSqlTableModel::insertRowIntoTable(const QSqlRecord &values) return false; } - return d->exec(stmt, prepStatement, rec); + return d->exec(stmt, prepStatement, rec, QSqlRecord() /* no where values */); } /*! @@ -695,7 +695,7 @@ bool QSqlTableModel::deleteRowFromTable(int row) } stmt.append(QLatin1Char(' ')).append(where); - return d->exec(stmt, prepStatement, whereValues); + return d->exec(stmt, prepStatement, QSqlRecord() /* no new values */, whereValues); } /*! diff --git a/src/sql/models/qsqltablemodel_p.h b/src/sql/models/qsqltablemodel_p.h index d2b96e6..f4f3811 100644 --- a/src/sql/models/qsqltablemodel_p.h +++ b/src/sql/models/qsqltablemodel_p.h @@ -75,7 +75,7 @@ public: QSqlRecord record(const QVector<QVariant> &values) const; bool exec(const QString &stmt, bool prepStatement, - const QSqlRecord &rec, const QSqlRecord &whereValues = QSqlRecord()); + const QSqlRecord &rec, const QSqlRecord &whereValues); virtual void revertCachedRow(int row); void revertInsertedRow(); bool setRecord(int row, const QSqlRecord &record); |