summaryrefslogtreecommitdiff
path: root/src/sql
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-01-21 23:05:37 +0100
committerThiago Macieira <thiago.macieira@nokia.com>2011-01-26 14:20:39 +0100
commitf34e2b62b03e35015b0eaa6b96dc982caf0f230d (patch)
tree6236ef0aa384b6fa79d3a18f548340993e201557 /src/sql
parentb7de076b698a1e0a61c6b1597db860c88dd3ee86 (diff)
downloadqt4-tools-f34e2b62b03e35015b0eaa6b96dc982caf0f230d.tar.gz
Fix warnings in PSQL driver: handle VersionUnknown in switch
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 0a7d5bf9ca..a044c7f860 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -1021,6 +1021,9 @@ QSqlIndex QPSQLDriver::primaryIndex(const QString& tablename) const
stmt = stmt.arg(QString::fromLatin1("pg_class.relnamespace = (select oid from "
"pg_namespace where pg_namespace.nspname = '%1') AND ").arg(schema));
break;
+ case QPSQLDriver::VersionUnknown:
+ qFatal("PSQL version is unknown");
+ break;
}
i.exec(stmt.arg(tbl));
@@ -1110,6 +1113,9 @@ QSqlRecord QPSQLDriver::record(const QString& tablename) const
stmt = stmt.arg(QString::fromLatin1("pg_class.relnamespace = (select oid from "
"pg_namespace where pg_namespace.nspname = '%1')").arg(schema));
break;
+ case QPSQLDriver::VersionUnknown:
+ qFatal("PSQL version is unknown");
+ break;
}
QSqlQuery query(createResult());