Fix multiple commented out lines not being ignored (#811)

This was supposed to be fixed by 842aec8, but it wasn't. It now removes
everything that starts with two consecutive dashes, up until the end of
the respective line.
This commit is contained in:
Iulian Onofrei
2016-10-11 22:11:39 +03:00
committed by GitHub
parent 90f98f311e
commit a4f44d8f19

View File

@@ -102,7 +102,7 @@ void SqliteTableModel::setQuery(const QString& sQuery, bool dontClearHeaders)
m_sQuery = sQuery.trimmed();
m_sQuery.remove(QRegExp("(?=\\s*[-]{2})[^'\"\n]*($|\\n)"));
m_sQuery.remove(QRegExp("\\s*--[^\\n]+"));
// do a count query to get the full row count in a fast manner
m_rowCount = getQueryRowCount();