Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[gpx] Fix compilation against qt6
  • Loading branch information
nirvn committed Jul 18, 2021
1 parent d10695c commit cdce377
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/providers/gpx/gpsdata.cpp
Expand Up @@ -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();
Expand All @@ -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();
}


Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit cdce377

Please sign in to comment.