Skip to content
Permalink
Browse files
Merge pull request #44219 from nirvn/qt6_11
[qt6] Fix compilation of gpx and db2 providers against qt6
  • Loading branch information
nirvn committed Jul 18, 2021
2 parents 8510650 + 194dac6 commit 9f816de054456df8b920ad22331a49e86a53d223
Showing with 8 additions and 4 deletions.
  1. +4 −2 src/providers/db2/qgsdb2provider.cpp
  2. +4 −2 src/providers/gpx/gpsdata.cpp
@@ -1138,8 +1138,8 @@ bool QgsDb2Provider::addFeatures( QgsFeatureList &flist, Flags flags )
query.bindValue( bindIdx, bytea, QSql::In | QSql::Binary );
}

// Show bound values
#if 0
// Show bound values
QList<QVariant> list = query.boundValues().values();

for ( int i = 0; i < list.size(); ++i )
@@ -1576,13 +1576,15 @@ Qgis::VectorExportResult QgsDb2Provider::createEmptyLayer( const QString &uri,
}
}

#if 0
// Show bound values
QList<QVariant> list = query.boundValues().values();
for ( int i = 0; i < list.size(); ++i )
{
QgsDebugMsg( QStringLiteral( "i: %1; value: %2; type: %3" )
.arg( i ).arg( list.at( i ).toString().toLatin1().data(), list.at( i ).typeName() ) );
}

#endif
}
// clear any resources hold by the query
q.clear();
@@ -349,7 +349,9 @@ void QgsGpsData::removeTracks( const QgsFeatureIds &ids )

void QgsGpsData::writeXml( QTextStream &stream )
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
stream.setCodec( QTextCodec::codecForName( "UTF8" ) );
#endif
stream << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
<< "<gpx version=\"1.0\" creator=\"QGIS\">\n";
for ( WaypointIterator wIter = waypoints.begin();
@@ -360,7 +362,7 @@ void QgsGpsData::writeXml( QTextStream &stream )
for ( TrackIterator tIter = tracks.begin(); tIter != tracks.end(); ++tIter )
tIter->writeXml( stream );
stream << "</gpx>\n";
stream << flush;
stream.flush();
}


@@ -409,7 +411,7 @@ QgsGpsData *QgsGpsData::getData( const QString &fileName )

data->setNoDataExtent();

dataObjects[fileName] = qMakePair<QgsGpsData *, unsigned>( data, 0 );
dataObjects[fileName] = qMakePair( data, 0 );
}
else
{

0 comments on commit 9f816de

Please sign in to comment.