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 9226c02de9)
r14.0.x
Michele Calgaro 6 years ago
parent 86f493cd12
commit 959ee5c588
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -68,7 +68,7 @@ void TQSqlExtension::bindValue( const TQString& placeholder, const TQVariant& va
if ( index.contains( (int)values.count() ) ) { if ( index.contains( (int)values.count() ) ) {
index[ (int)values.count() ] = placeholder; index[ (int)values.count() ] = placeholder;
} }
values[ placeholder ] = TQtParam( val, tp ); values[ placeholder ] = TQSqlParam( val, tp );
} }
void TQSqlExtension::bindValue( int pos, const TQVariant& val, TQSql::ParameterType tp ) void TQSqlExtension::bindValue( int pos, const TQVariant& val, TQSql::ParameterType tp )
@ -76,7 +76,7 @@ void TQSqlExtension::bindValue( int pos, const TQVariant& val, TQSql::ParameterT
bindm = BindByPosition; bindm = BindByPosition;
index[ pos ] = TQString::number( pos ); index[ pos ] = TQString::number( pos );
TQString nm = TQString::number( pos ); TQString nm = TQString::number( pos );
values[ nm ] = TQtParam( val, tp ); values[ nm ] = TQSqlParam( val, tp );
} }
void TQSqlExtension::addBindValue( const TQVariant& val, TQSql::ParameterType tp ) void TQSqlExtension::addBindValue( const TQVariant& val, TQSql::ParameterType tp )
@ -130,7 +130,7 @@ TQVariant TQSqlExtension::boundValue( int pos ) const
TQMap<TQString, TQVariant> TQSqlExtension::boundValues() const TQMap<TQString, TQVariant> TQSqlExtension::boundValues() const
{ {
TQMap<TQString, TQtParam>::ConstIterator it; TQMap<TQString, TQSqlParam>::ConstIterator it;
TQMap<TQString, TQVariant> m; TQMap<TQString, TQVariant> 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 TQM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN #define TQM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN
#endif #endif
struct TQtParam { struct TQSqlParam {
TQtParam( const TQVariant& v = TQVariant(), TQSql::ParameterType t = TQSql::In ): value( v ), typ( t ) {} TQSqlParam( const TQVariant& v = TQVariant(), TQSql::ParameterType t = TQSql::In ): value( v ), typ( t ) {}
TQVariant value; TQVariant value;
TQSql::ParameterType typ; TQSql::ParameterType typ;
Q_DUMMY_COMPARISON_OPERATOR(TQtParam) Q_DUMMY_COMPARISON_OPERATOR(TQSqlParam)
}; };
struct Holder { struct Holder {
@ -114,7 +114,7 @@ public:
int bindCount; int bindCount;
TQMap<int, TQString> index; TQMap<int, TQString> index;
typedef TQMap<TQString, TQtParam> ValueMap; typedef TQMap<TQString, TQSqlParam> ValueMap;
ValueMap values; ValueMap values;
// convenience container for TQSqlQuery // convenience container for TQSqlQuery

@ -215,7 +215,7 @@ TQM_TEMPLATE_EXTERN_TABLE template class TQM_EXPORT_TABLE TQPtrVector<TQTableIte
// 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
TQM_TEMPLATE_EXTERN_SQL template class TQM_EXPORT_SQL TQMap<TQString,TQtParam>; TQM_TEMPLATE_EXTERN_SQL template class TQM_EXPORT_SQL TQMap<TQString,TQSqlParam>;
TQM_TEMPLATE_EXTERN_SQL template class TQM_EXPORT_SQL TQValueVector<Holder>; TQM_TEMPLATE_EXTERN_SQL template class TQM_EXPORT_SQL TQValueVector<Holder>;
#endif #endif

Loading…
Cancel
Save