Login UI/lookup improvements

* made tool -> push buttons as easier to spot
* reverse lookup of model before login -> always latest DB data
* use "text only" ICAO code if loading from DB yields no result
This commit is contained in:
Klaus Basan
2019-01-16 18:56:05 +01:00
committed by Mat Sutcliffe
parent 985674f1cf
commit 13c67e4838
12 changed files with 96 additions and 51 deletions

View File

@@ -61,6 +61,14 @@ namespace BlackMisc
return ok ? key : -1;
}
QString CDatastoreUtility::stripKeyInParentheses(const QString &valueWithKey)
{
const int i = valueWithKey.indexOf('(');
if (i < 0) { return valueWithKey.trimmed(); }
if (i < 1) { return QStringLiteral(""); }
return valueWithKey.left(i - 1).trimmed();
}
QDateTime CDatastoreUtility::parseTimestamp(const QString &timestamp)
{
if (timestamp.isEmpty()) { return QDateTime(); }