Ref T304, array index fix if "7za.exe" is not available

This commit is contained in:
Klaus Basan
2018-08-12 19:17:55 +02:00
parent 30ba404043
commit 018a60f23c
3 changed files with 27 additions and 1 deletions

View File

@@ -108,6 +108,14 @@ namespace BlackMisc
return s.trimmed();
}
//! Safe "at" function, returns empty string if index does not exists
inline const QString &safeAt(const QStringList &stringList, int index)
{
if (stringList.size() > index) { return stringList.at(index); }
static const QString empty;
return empty;
}
//! String with digits only
inline bool isDigitsOnlyString(const QString &testString)
{