Improved class name used in previous commit. Suggestion comes from Slavek :-)

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 19ef3e4359)
r14.0.x
Michele Calgaro 6 years ago
parent 329fb60877
commit ec5adca5bb
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -68,7 +68,7 @@ void QSqlExtension::bindValue( const QString& placeholder, const QVariant& val,
if ( index.contains( (int)values.count() ) ) { if ( index.contains( (int)values.count() ) ) {
index[ (int)values.count() ] = placeholder; index[ (int)values.count() ] = placeholder;
} }
values[ placeholder ] = QtParam( val, tp ); values[ placeholder ] = QSqlParam( val, tp );
} }
void QSqlExtension::bindValue( int pos, const QVariant& val, QSql::ParameterType tp ) void QSqlExtension::bindValue( int pos, const QVariant& val, QSql::ParameterType tp )
@ -76,7 +76,7 @@ void QSqlExtension::bindValue( int pos, const QVariant& val, QSql::ParameterType
bindm = BindByPosition; bindm = BindByPosition;
index[ pos ] = QString::number( pos ); index[ pos ] = QString::number( pos );
QString nm = QString::number( pos ); QString nm = QString::number( pos );
values[ nm ] = QtParam( val, tp ); values[ nm ] = QSqlParam( val, tp );
} }
void QSqlExtension::addBindValue( const QVariant& val, QSql::ParameterType tp ) void QSqlExtension::addBindValue( const QVariant& val, QSql::ParameterType tp )
@ -130,7 +130,7 @@ QVariant QSqlExtension::boundValue( int pos ) const
QMap<QString, QVariant> QSqlExtension::boundValues() const QMap<QString, QVariant> QSqlExtension::boundValues() const
{ {
QMap<QString, QtParam>::ConstIterator it; QMap<QString, QSqlParam>::ConstIterator it;
QMap<QString, QVariant> m; QMap<QString, QVariant> m;
if ( bindm == BindByName ) { if ( bindm == BindByName ) {
for ( it = values.begin(); it != values.end(); ++it ) for ( it = values.begin(); it != values.end(); ++it )

@ -71,11 +71,11 @@
#define QM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN #define QM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN
#endif #endif
struct QtParam { struct QSqlParam {
QtParam( const QVariant& v = QVariant(), QSql::ParameterType t = QSql::In ): value( v ), typ( t ) {} QSqlParam( const QVariant& v = QVariant(), QSql::ParameterType t = QSql::In ): value( v ), typ( t ) {}
QVariant value; QVariant value;
QSql::ParameterType typ; QSql::ParameterType typ;
Q_DUMMY_COMPARISON_OPERATOR(QtParam) Q_DUMMY_COMPARISON_OPERATOR(QSqlParam)
}; };
struct Holder { struct Holder {
@ -114,7 +114,7 @@ public:
int bindCount; int bindCount;
QMap<int, QString> index; QMap<int, QString> index;
typedef QMap<QString, QtParam> ValueMap; typedef QMap<QString, QSqlParam> ValueMap;
ValueMap values; ValueMap values;
// convenience container for QSqlQuery // convenience container for QSqlQuery

@ -215,7 +215,7 @@ QM_TEMPLATE_EXTERN_TABLE template class QM_EXPORT_TABLE QPtrVector<QTableItem>;
// qsqlextension template exports // qsqlextension template exports
#if defined(Q_DEFINED_QSQLEXTENSION) && defined(Q_DEFINED_QMAP) && defined(Q_DEFINED_QVALUEVECTOR) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QSQLEXTENSION_TEMPLATES) #if defined(Q_DEFINED_QSQLEXTENSION) && defined(Q_DEFINED_QMAP) && defined(Q_DEFINED_QVALUEVECTOR) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QSQLEXTENSION_TEMPLATES)
#define Q_EXPORTED_QSQLEXTENSION_TEMPLATES #define Q_EXPORTED_QSQLEXTENSION_TEMPLATES
QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap<QString,QtParam>; QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap<QString,QSqlParam>;
QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QValueVector<Holder>; QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QValueVector<Holder>;
#endif #endif

Loading…
Cancel
Save