From 56af30fa1a0893f115e195ee767b84d33327046a Mon Sep 17 00:00:00 2001 From: Michael Nottebrock Date: Thu, 15 Feb 2007 10:23:35 +0000 Subject: Stop-gap patch to make koffice build with libpqxx 2.6.9. Submitted by: Maxim Samsonov --- .../patch-kexi_kexidb_drivers_pqxx-pqxxconnection.cpp | 11 +++++++++++ .../patch-kexi_kexidb_drivers_pqxx-pqxxconnection_p.h | 11 +++++++++++ .../patch-kexi_kexidb_drivers_pqxx-pqxxcursor.cpp | 11 +++++++++++ .../patch-kexi_kexidb_drivers_pqxx-pqxxdriver.cpp | 19 +++++++++++++++++++ .../files/patch-kexi_migration_pqxx-pqxxmigrate.h | 11 +++++++++++ 5 files changed, 63 insertions(+) create mode 100644 editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxconnection.cpp create mode 100644 editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxconnection_p.h create mode 100644 editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxcursor.cpp create mode 100644 editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxdriver.cpp create mode 100644 editors/calligra/files/patch-kexi_migration_pqxx-pqxxmigrate.h (limited to 'editors/calligra/files') diff --git a/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxconnection.cpp b/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxconnection.cpp new file mode 100644 index 000000000000..3b6ac0bea559 --- /dev/null +++ b/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxconnection.cpp @@ -0,0 +1,11 @@ +--- kexi/kexidb/drivers/pqxx/pqxxconnection.cpp.orig Sun Feb 11 16:58:22 2007 ++++ kexi/kexidb/drivers/pqxx/pqxxconnection.cpp Sun Feb 11 16:58:53 2007 +@@ -277,7 +277,7 @@ + // m_trans = new pqxx::nontransaction(*m_pqxxsql); + // KexiDBDrvDbg << "About to execute" << endl; + //Create a result object through the transaction +- d->res = new pqxx::result(m_trans->data->exec(statement.utf8())); ++ d->res = new pqxx::result(m_trans->data->exec(statement.utf8().data())); + // KexiDBDrvDbg << "Executed" << endl; + //Commit the transaction + if (implicityStarted) { diff --git a/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxconnection_p.h b/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxconnection_p.h new file mode 100644 index 000000000000..bc0531bfb527 --- /dev/null +++ b/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxconnection_p.h @@ -0,0 +1,11 @@ +--- kexi/kexidb/drivers/pqxx/pqxxconnection_p.h.orig Sun Feb 11 16:52:10 2007 ++++ kexi/kexidb/drivers/pqxx/pqxxconnection_p.h Sun Feb 11 16:54:21 2007 +@@ -31,7 +31,7 @@ + #define PQXXSQLCONNECTIONINTERNAL_H + + #include +-#include ++#include + + namespace KexiDB + { diff --git a/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxcursor.cpp b/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxcursor.cpp new file mode 100644 index 000000000000..65ded10e000d --- /dev/null +++ b/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxcursor.cpp @@ -0,0 +1,11 @@ +--- kexi/kexidb/drivers/pqxx/pqxxcursor.cpp.orig Sun Feb 11 16:45:47 2007 ++++ kexi/kexidb/drivers/pqxx/pqxxcursor.cpp Sun Feb 11 16:50:26 2007 +@@ -155,7 +155,7 @@ + m_implicityStarted = true; + } + +- m_res = new pqxx::result(((pqxxSqlConnection*)connection())->m_trans->data->exec(m_sql.utf8())); ++ m_res = new pqxx::result(((pqxxSqlConnection*)connection())->m_trans->data->exec(m_sql.utf8().data())); + ((pqxxSqlConnection*)connection()) + ->drv_commitTransaction(((pqxxSqlConnection*)connection())->m_trans); + // my_conn->m_trans->commit(); diff --git a/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxdriver.cpp b/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxdriver.cpp new file mode 100644 index 000000000000..bd06c9436ff7 --- /dev/null +++ b/editors/calligra/files/patch-kexi_kexidb_drivers_pqxx-pqxxdriver.cpp @@ -0,0 +1,19 @@ +--- kexi/kexidb/drivers/pqxx/pqxxdriver.cpp.orig Sun Feb 11 16:38:08 2007 ++++ kexi/kexidb/drivers/pqxx/pqxxdriver.cpp Sun Feb 11 17:29:18 2007 +@@ -133,14 +133,14 @@ + // + QString pqxxSqlDriver::escapeString( const QString& str) const + { +- return QString(pqxx::Quote(str.ascii()).c_str()); ++ return "'"+QString(pqxx::sqlesc(str.ascii()).c_str())+"'"; + } + + //================================================================================== + // + QCString pqxxSqlDriver::escapeString( const QCString& str) const + { +- return QCString(pqxx::Quote(QString(str).ascii()).c_str()); ++ return "'"+QCString(pqxx::sqlesc(QString(str).ascii()).c_str())+"'"; + } + + //================================================================================== diff --git a/editors/calligra/files/patch-kexi_migration_pqxx-pqxxmigrate.h b/editors/calligra/files/patch-kexi_migration_pqxx-pqxxmigrate.h new file mode 100644 index 000000000000..8a7fc161aabe --- /dev/null +++ b/editors/calligra/files/patch-kexi_migration_pqxx-pqxxmigrate.h @@ -0,0 +1,11 @@ +--- kexi/migration/pqxx/pqxxmigrate.h.orig Sun Feb 11 17:15:12 2007 ++++ kexi/migration/pqxx/pqxxmigrate.h Sun Feb 11 17:15:38 2007 +@@ -26,7 +26,7 @@ + #include + #include + +-#include ++#include + + namespace KexiMigration + { -- cgit v1.2.3