mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
Return a default-constructed QString instead of implicitly converting an empty string literal.
This commit is contained in:
@@ -150,7 +150,7 @@ namespace BlackMisc
|
||||
|
||||
QString IDatastoreObjectWithStringKey::getDbKeyAsStringInParentheses(const QString &prefix) const
|
||||
{
|
||||
if (m_dbKey.isEmpty()) { return ""; }
|
||||
if (m_dbKey.isEmpty()) { return {}; }
|
||||
return prefix % '(' % m_dbKey % ')';
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace BlackMisc
|
||||
const CIcon &toDatabaseIcon() const;
|
||||
|
||||
//! Invalid key
|
||||
static QString invalidDbKey() { return ""; }
|
||||
static QString invalidDbKey() { return {}; }
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace BlackMisc
|
||||
template<class OBJ, class CONTAINER, typename KEYTYPE>
|
||||
QString IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::dbKeysAsString(const QString &separator) const
|
||||
{
|
||||
if (ITimestampObjectList<OBJ, CONTAINER>::container().isEmpty()) { return ""; }
|
||||
if (ITimestampObjectList<OBJ, CONTAINER>::container().isEmpty()) { return {}; }
|
||||
const QSet<QString> keys = IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::toDbKeyStringSet();
|
||||
QString s;
|
||||
for (const QString &k : keys)
|
||||
|
||||
Reference in New Issue
Block a user