21 const QString &routeDownloadCommand,
const QString &routeUploadCommand,
22 const QString &trackDownloadCommand,
const QString &trackUploadCommand )
24 const thread_local QRegularExpression whiteSpaceRx( QStringLiteral(
"\\s" ) );
26#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
27 if ( !waypointDownloadCommand.isEmpty() )
29 mWaypointDownloadCommand = waypointDownloadCommand.split( whiteSpaceRx, QString::SkipEmptyParts );
33 if ( !waypointUploadCommand.isEmpty() )
35 mWaypointUploadCommand = waypointUploadCommand.split( whiteSpaceRx, QString::SkipEmptyParts );
39 if ( !routeDownloadCommand.isEmpty() )
41 mRouteDownloadCommand = routeDownloadCommand.split( whiteSpaceRx, QString::SkipEmptyParts );
45 if ( !routeUploadCommand.isEmpty() )
47 mRouteUploadCommand = routeUploadCommand.split( whiteSpaceRx, QString::SkipEmptyParts );
51 if ( !trackDownloadCommand.isEmpty() )
53 mTrackDownloadCommand = trackDownloadCommand.split( whiteSpaceRx, QString::SkipEmptyParts );
57 if ( !trackUploadCommand.isEmpty() )
59 mTrackUploadCommand = trackUploadCommand.split( whiteSpaceRx, QString::SkipEmptyParts );
65 if ( !waypointDownloadCommand.isEmpty() )
67 mWaypointDownloadCommand = waypointDownloadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
71 if ( !waypointUploadCommand.isEmpty() )
73 mWaypointUploadCommand = waypointUploadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
77 if ( !routeDownloadCommand.isEmpty() )
79 mRouteDownloadCommand = routeDownloadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
83 if ( !routeUploadCommand.isEmpty() )
85 mRouteUploadCommand = routeUploadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
89 if ( !trackDownloadCommand.isEmpty() )
91 mTrackDownloadCommand = trackDownloadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
95 if ( !trackUploadCommand.isEmpty() )
97 mTrackUploadCommand = trackUploadCommand.split( whiteSpaceRx, Qt::SkipEmptyParts );
107 const QString &out, Qgis::BabelCommandFlags flags )
const
109 QStringList original;
114 original = mWaypointDownloadCommand;
117 original = mRouteDownloadCommand;
120 original = mTrackDownloadCommand;
125 copy.reserve( original.size() );
126 for (
const QString &iter : std::as_const( original ) )
128 if ( iter == QLatin1String(
"%babel" ) )
130 else if ( iter == QLatin1String(
"%type" ) )
132 else if ( iter == QLatin1String(
"%in" ) )
134 else if ( iter == QLatin1String(
"%out" ) )
145 const QString &out, Qgis::BabelCommandFlags flags )
const
147 QStringList original;
151 original = mWaypointUploadCommand;
154 original = mRouteUploadCommand;
157 original = mTrackUploadCommand;
162 copy.reserve( original.size() );
163 for (
const QString &iter : std::as_const( original ) )
165 if ( iter == QLatin1String(
"%babel" ) )
167 else if ( iter == QLatin1String(
"%type" ) )
169 else if ( iter == QLatin1String(
"%in" ) )
171 else if ( iter == QLatin1String(
"%out" ) )