From 329fb608774ca3e6a9bc273683fd4509f3629cd4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 1 Nov 2018 22:37:59 +0900 Subject: [PATCH] Fixed FTBFS caused by name conflict with new postgres server dev 11 package. Signed-off-by: Michele Calgaro (cherry picked from commit 4a5da4685a8607a87602e065d1e3abdbf66c9ff9) --- src/sql/qsqlextension_p.cpp | 6 +++--- src/sql/qsqlextension_p.h | 8 ++++---- src/tools/qwinexport.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sql/qsqlextension_p.cpp b/src/sql/qsqlextension_p.cpp index 4e68fee..137ef50 100644 --- a/src/sql/qsqlextension_p.cpp +++ b/src/sql/qsqlextension_p.cpp @@ -68,7 +68,7 @@ void QSqlExtension::bindValue( const QString& placeholder, const QVariant& val, if ( index.contains( (int)values.count() ) ) { index[ (int)values.count() ] = placeholder; } - values[ placeholder ] = Param( val, tp ); + values[ placeholder ] = QtParam( val, 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; index[ pos ] = QString::number( pos ); QString nm = QString::number( pos ); - values[ nm ] = Param( val, tp ); + values[ nm ] = QtParam( val, tp ); } void QSqlExtension::addBindValue( const QVariant& val, QSql::ParameterType tp ) @@ -130,7 +130,7 @@ QVariant QSqlExtension::boundValue( int pos ) const QMap QSqlExtension::boundValues() const { - QMap::ConstIterator it; + QMap::ConstIterator it; QMap m; if ( bindm == BindByName ) { for ( it = values.begin(); it != values.end(); ++it ) diff --git a/src/sql/qsqlextension_p.h b/src/sql/qsqlextension_p.h index 01e540e..a77be75 100644 --- a/src/sql/qsqlextension_p.h +++ b/src/sql/qsqlextension_p.h @@ -71,11 +71,11 @@ #define QM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN #endif -struct Param { - Param( const QVariant& v = QVariant(), QSql::ParameterType t = QSql::In ): value( v ), typ( t ) {} +struct QtParam { + QtParam( const QVariant& v = QVariant(), QSql::ParameterType t = QSql::In ): value( v ), typ( t ) {} QVariant value; QSql::ParameterType typ; - Q_DUMMY_COMPARISON_OPERATOR(Param) + Q_DUMMY_COMPARISON_OPERATOR(QtParam) }; struct Holder { @@ -114,7 +114,7 @@ public: int bindCount; QMap index; - typedef QMap ValueMap; + typedef QMap ValueMap; ValueMap values; // convenience container for QSqlQuery diff --git a/src/tools/qwinexport.h b/src/tools/qwinexport.h index 67c13e9..4d9e5d4 100644 --- a/src/tools/qwinexport.h +++ b/src/tools/qwinexport.h @@ -215,7 +215,7 @@ QM_TEMPLATE_EXTERN_TABLE template class QM_EXPORT_TABLE QPtrVector; // 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) #define Q_EXPORTED_QSQLEXTENSION_TEMPLATES -QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap; +QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap; QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QValueVector; #endif