21 const QString &routeDownloadCommand,
const QString &routeUploadCommand,
22 const QString &trackDownloadCommand,
const QString &trackUploadCommand )
24 const thread_local QRegularExpression whiteSpaceRx( QStringLiteral(
"\\s" ) );
26 if ( !waypointDownloadCommand.isEmpty() )
28 mWaypointDownloadCommand = waypointDownloadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
32 if ( !waypointUploadCommand.isEmpty() )
34 mWaypointUploadCommand = waypointUploadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
38 if ( !routeDownloadCommand.isEmpty() )
40 mRouteDownloadCommand = routeDownloadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
44 if ( !routeUploadCommand.isEmpty() )
46 mRouteUploadCommand = routeUploadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
50 if ( !trackDownloadCommand.isEmpty() )
52 mTrackDownloadCommand = trackDownloadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
56 if ( !trackUploadCommand.isEmpty() )
58 mTrackUploadCommand = trackUploadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
67 const QString &out, Qgis::BabelCommandFlags flags )
const
74 original = mWaypointDownloadCommand;
77 original = mRouteDownloadCommand;
80 original = mTrackDownloadCommand;
85 copy.reserve( original.size() );
86 for (
const QString &iter : std::as_const( original ) )
88 if ( iter == QLatin1String(
"%babel" ) )
90 else if ( iter == QLatin1String(
"%type" ) )
92 else if ( iter == QLatin1String(
"%in" ) )
94 else if ( iter == QLatin1String(
"%out" ) )
105 const QString &out, Qgis::BabelCommandFlags flags )
const
107 QStringList original;
111 original = mWaypointUploadCommand;
114 original = mRouteUploadCommand;
117 original = mTrackUploadCommand;
122 copy.reserve( original.size() );
123 for (
const QString &iter : std::as_const( original ) )
125 if ( iter == QLatin1String(
"%babel" ) )
127 else if ( iter == QLatin1String(
"%type" ) )
129 else if ( iter == QLatin1String(
"%in" ) )
131 else if ( iter == QLatin1String(
"%out" ) )