Utils: Remove std::initializer_list contructor

If you write

Utils::SmallStringView view;
Utils::SmallString text{view};

it selects the std::initializer_list contructor. Not the didicated
constructore. It is much to easy to get it wrong so it is better
to make it explicit.

Change-Id: I4240eaf1f39cf71d37df4480fea1ecfa3ea83cb0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2021-05-19 18:50:51 +02:00
parent 7b330d3496
commit 8603eb5ba9
15 changed files with 52 additions and 57 deletions

View File

@@ -57,18 +57,17 @@ public:
checkTableName();
checkColumns();
return {"CREATE ",
m_indexType == IndexType::Unique ? "UNIQUE " : "",
"INDEX IF NOT EXISTS index_",
m_tableName,
"_",
m_columnNames.join("_"),
" ON ",
m_tableName,
"(",
m_columnNames.join(", "),
")"
};
return Utils::SmallString::join({"CREATE ",
m_indexType == IndexType::Unique ? "UNIQUE " : "",
"INDEX IF NOT EXISTS index_",
m_tableName,
"_",
m_columnNames.join("_"),
" ON ",
m_tableName,
"(",
m_columnNames.join(", "),
")"});
}
void checkTableName() const