Fix compilation errors appeared since commit a074a5e67
qttools_sql: don't log empty SQL statements