From 2cc900a98ec7a78c6f9889bf3a99729b69519723 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Tue, 11 Sep 2018 17:13:44 +0200 Subject: [PATCH] Simplify code --- src/sqlitetypes.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/sqlitetypes.cpp b/src/sqlitetypes.cpp index 1192aa33..baa3fa96 100644 --- a/src/sqlitetypes.cpp +++ b/src/sqlitetypes.cpp @@ -143,13 +143,7 @@ QString ForeignKeyClause::toString() const QString result = escapeIdentifier(m_table); if(m_columns.size()) - { - result += "("; - for(const QString& column : m_columns) - result += escapeIdentifier(column) + ','; - result.chop(1); // Remove last comma - result += ")"; - } + result += "(" + escapeIdentifier(m_columns).join(",") + ")"; if(m_constraint.size()) result += " " + m_constraint;