mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
Ref T77, prefix for getDbKeyAsStringInParentheses
This commit is contained in:
@@ -25,10 +25,10 @@ namespace BlackMisc
|
||||
return QString::number(this->m_dbKey);
|
||||
}
|
||||
|
||||
QString IDatastoreObjectWithIntegerKey::getDbKeyAsStringInParentheses() const
|
||||
QString IDatastoreObjectWithIntegerKey::getDbKeyAsStringInParentheses(const QString &prefix) const
|
||||
{
|
||||
if (this->m_dbKey < 0) { return ""; }
|
||||
return "(" + QString::number(this->m_dbKey) + ")";
|
||||
return prefix + "(" + QString::number(this->m_dbKey) + ")";
|
||||
}
|
||||
|
||||
void IDatastoreObjectWithIntegerKey::setDbKey(const QString &key)
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace BlackMisc
|
||||
QJsonValue getDbKeyAsJsonValue() const;
|
||||
|
||||
//! Db ley in parentheses, e.g. "(3)"
|
||||
QString getDbKeyAsStringInParentheses() const;
|
||||
QString getDbKeyAsStringInParentheses(const QString &prefix = {}) const;
|
||||
|
||||
//! Set the DB key
|
||||
void setDbKey(int key) { m_dbKey = key; }
|
||||
|
||||
Reference in New Issue
Block a user