Fix tests

This commit is contained in:
Martin Kleusberg
2017-08-10 21:33:33 +02:00
parent e3a7d9aa75
commit c030349fe0

View File

@@ -656,6 +656,12 @@ void SqliteTableModel::removeCommentsFromQuery(QString& query) {
query = result.trimmed();
}
// Remove multiple line breaks that might have been created by deleting comments till the end of the line but not including the line break
query.replace(QRegExp("\\n+"), "\n");
// Also remove any remaining whitespace at the end of each line
query.replace(QRegExp("[ \t]+\n"), "\n");
}
QStringList SqliteTableModel::getColumns(const QString& sQuery, QVector<int>& fieldsTypes)