From 9c2752a41538930c3c531d9510896823fdcd0129 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Jan 05 2019 04:26:06 +0000 Subject: Rename the struct Param in qsqlextension_p.h that conflicts with PostgreSQL 11 --- diff --git a/qt-x11-free-3.3.8b-postgresql11.patch b/qt-x11-free-3.3.8b-postgresql11.patch new file mode 100644 index 0000000..ad9c4cc --- /dev/null +++ b/qt-x11-free-3.3.8b-postgresql11.patch @@ -0,0 +1,57 @@ +diff -ur qt-x11-free-3.3.8b/src/sql/qsqlextension_p.cpp qt-x11-free-3.3.8b-postgresql11/src/sql/qsqlextension_p.cpp +--- qt-x11-free-3.3.8b/src/sql/qsqlextension_p.cpp 2008-01-15 20:09:13.000000000 +0100 ++++ qt-x11-free-3.3.8b-postgresql11/src/sql/qsqlextension_p.cpp 2019-01-05 05:21:29.839087511 +0100 +@@ -68,7 +68,7 @@ + if ( index.contains( (int)values.count() ) ) { + index[ (int)values.count() ] = placeholder; + } +- values[ placeholder ] = Param( val, tp ); ++ values[ placeholder ] = Parame( val, tp ); + } + + void QSqlExtension::bindValue( int pos, const QVariant& val, QSql::ParameterType tp ) +@@ -76,7 +76,7 @@ + bindm = BindByPosition; + index[ pos ] = QString::number( pos ); + QString nm = QString::number( pos ); +- values[ nm ] = Param( val, tp ); ++ values[ nm ] = Parame( val, tp ); + } + + void QSqlExtension::addBindValue( const QVariant& val, QSql::ParameterType tp ) +@@ -130,7 +130,7 @@ + + QMap QSqlExtension::boundValues() const + { +- QMap::ConstIterator it; ++ QMap::ConstIterator it; + QMap m; + if ( bindm == BindByName ) { + for ( it = values.begin(); it != values.end(); ++it ) +diff -ur qt-x11-free-3.3.8b/src/sql/qsqlextension_p.h qt-x11-free-3.3.8b-postgresql11/src/sql/qsqlextension_p.h +--- qt-x11-free-3.3.8b/src/sql/qsqlextension_p.h 2008-01-15 20:09:13.000000000 +0100 ++++ qt-x11-free-3.3.8b-postgresql11/src/sql/qsqlextension_p.h 2019-01-05 05:20:59.605555077 +0100 +@@ -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 Parame { ++ Parame( 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(Parame) + }; + + struct Holder { +@@ -114,7 +114,7 @@ + int bindCount; + + QMap index; +- typedef QMap ValueMap; ++ typedef QMap ValueMap; + ValueMap values; + + // convenience container for QSqlQuery diff --git a/qt3.spec b/qt3.spec index 9f958e4..1493eea 100644 --- a/qt3.spec +++ b/qt3.spec @@ -28,7 +28,8 @@ Patch8: qt-x11-free-3.3.3-qembed.patch Patch12: qt-uic-nostdlib.patch Patch13: qt-x11-free-3.3.6-qfontdatabase_x11.patch Patch14: qt-x11-free-3.3.3-gl.patch -Patch19: qt-3.3.3-gtkstyle.patch +Patch19: qt-3.3.3-gtkstyle.patch +# hardcode the compiler version in the build key once and for all Patch20: qt-x11-free-3.3.8b-hardcode-buildkey.patch Patch24: qt-x11-free-3.3.5-uic.patch Patch25: qt-x11-free-3.3.8b-uic-multilib.patch @@ -64,6 +65,8 @@ Patch46: qt-3.3.8-libpng15.patch Patch47: qt-x11-free-3.3.8b-#1037297.patch # search for FreeType using pkg-config, fixes FTBFS with freetype >= 2.5.1 Patch48: qt-x11-free-3.3.8b-freetype251.patch +# rename the struct Param in qsqlextension_p.h that conflicts with PostgreSQL 11 +Patch49: qt-x11-free-3.3.8b-postgresql11.patch # immodule patches Patch50: qt-x11-immodule-unified-qt3.3.8-20071116.diff.bz2 @@ -332,6 +335,7 @@ sed -i.KDE3_PLUGIN_PATH \ %endif %patch47 -p1 -b .#1037297 %patch48 -p1 -b .freetype251 +%patch49 -p1 -b .postgresql11 # immodule patches %if %{immodule} @@ -649,6 +653,7 @@ mkdir -p %{buildroot}%{qtdir}/plugins/styles %changelog * Sat Jan 05 2019 Kevin Kofler - 3.3.8b-77 - Hardcode the compiler version in the build key once and for all +- Rename the struct Param in qsqlextension_p.h that conflicts with PostgreSQL 11 * Fri Jul 20 2018 Rex Dieter - 3.3.8b-76 - BR: gcc-c++