65 } |
65 } |
66 |
66 |
67 // ============================================================================= |
67 // ============================================================================= |
68 // ----------------------------------------------------------------------------- |
68 // ----------------------------------------------------------------------------- |
69 static bool isKnownVersion (str ver) { |
69 static bool isKnownVersion (str ver) { |
70 for (const var& it : getVersions()) |
70 for (const QVariant& it : getVersions()) |
71 if (it.toString() == ver || it.toString() + 'M' == ver) |
71 if (it.toString() == ver || it.toString() + 'M' == ver) |
72 return true; |
72 return true; |
73 |
73 |
74 return false; |
74 return false; |
75 } |
75 } |
83 // Cannot just return an empty string here since that'd trigger |
83 // Cannot just return an empty string here since that'd trigger |
84 // another error prompt - skip ahead and exit. |
84 // another error prompt - skip ahead and exit. |
85 exit (9); |
85 exit (9); |
86 } |
86 } |
87 |
87 |
88 for (const var& it : cfg::wadpaths) { |
88 for (const QVariant& it : cfg::wadpaths) { |
89 str fullpath = fmt ("%1/%2", it.toString(), name); |
89 str fullpath = fmt ("%1/%2", it.toString(), name); |
90 QFile f (fullpath); |
90 QFile f (fullpath); |
91 |
91 |
92 if (f.exists()) |
92 if (f.exists()) |
93 return fullpath; |
93 return fullpath; |