diff options
author | François Andriot <francois.andriot@free.fr> | 2020-06-10 00:09:59 +0200 |
---|---|---|
committer | François Andriot <francois.andriot@free.fr> | 2020-06-11 10:53:14 +0200 |
commit | 73d1fecdcfcb4cb62d506ffbbf9f079800f0be86 (patch) | |
tree | 235d443fab944f1bb7425323b5ee63b142d06a77 | |
parent | f6f0e33f48b1e4879cc42283b76cdcc08a6bb5cb (diff) | |
download | koffice-73d1fecdcfcb4cb62d506ffbbf9f079800f0be86.tar.gz koffice-73d1fecdcfcb4cb62d506ffbbf9f079800f0be86.zip |
Fix kexi build with libpqxx 7
Signed-off-by: François Andriot <francois.andriot@free.fr>
-rw-r--r-- | kexi/migration/pqxx/pqxxmigrate.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp index 257e4f0e..f40b02af 100644 --- a/kexi/migration/pqxx/pqxxmigrate.cpp +++ b/kexi/migration/pqxx/pqxxmigrate.cpp @@ -92,7 +92,11 @@ bool PqxxMigrate::drv_readTableSchema( for (uint i = 0; i < (uint)m_res->columns(); i++) { TQString fldName(m_res->column_name(i)); +#if PQXX_VERSION_MAJOR < 7 KexiDB::Field::Type fldType = type(m_res->column_type(i), fldName); +#else + KexiDB::Field::Type fldType = type(m_res->column_type(m_res->column_name(i)), fldName); +#endif TQString fldID( KexiUtils::string2Identifier(fldName) ); const pqxx::oid toid = tableOid(originalName); if (toid==0) @@ -249,7 +253,9 @@ bool PqxxMigrate::drv_disconnect() { if (m_conn) { +#if PQXX_VERSION_MAJOR < 7 m_conn->disconnect(); +#endif delete m_conn; m_conn = 0; } |