58 QRegularExpression tileCacheFilenameMatchingRegexp(
60 R"(^(?<pluginName>.*?)-(?<mapId>\d+)-(?<zoom>\d+)-(?<x>\d+)-(?<y>\d+)-@(?<scale>\d+)x)"));
62 std::unordered_map<
const char *,
int> matchIntegerValues = {
70 QRegularExpressionMatch match = tileCacheFilenameMatchingRegexp.match(filename);
72 bool matchValuesValid =
false;
73 if (match.hasMatch()) {
74 matchValuesValid =
true;
75 for (
auto &kv : matchIntegerValues) {
77 kv.second = match.captured(kv.first).toInt(&ok);
79 matchValuesValid =
false;
85 constexpr int noVersionSpecified = -1;
86 return matchValuesValid && matchIntegerValues[
"scale"] == m_scaleFactor
88 match.captured(
"pluginName"),
89 matchIntegerValues[
"mapId"],
90 matchIntegerValues[
"zoom"],
91 matchIntegerValues[
"x"],
92 matchIntegerValues[
"y"],