[Kexi-devel] Source for KOffice 1.6.2 has been uploaded
Michael Nottebrock
lofi at freebsd.org
Thu Feb 15 11:37:19 CET 2007
On Tuesday, 13. February 2007 20:02, Cyrille Berger wrote:
> > There is currently a problem with kexi's pqxx driver - it doesn't build
> > with the latest version of libpqxx (which abandoned an very old API that
> > kexi's pqxx driver used). I've notified the kexi developers a few days
> > ago about this and someone is looking into it. We should have that fix
> > in 1.6.2.
>
> Well quoting Jaroslaw Staniek from:
> http://lists.kde.org/?l=koffice-devel&m=117115445814684&w=2
>
> "I consider these API changes as ugly step. Ugly enough to make us
> depend on
> <=2.6.8 and add a notice to packagers about avoiding packaging 2.6.9. I
> am
> suggesting to go this way. "
>
> So I think the solution is not to use libpqxx.
You (Jaroslaw) cannot possibly be serious, both about libpqxx's decision to
retire a long-obsolete API being "ugly" and suggesting that packagers should
ignore an important update just so kexi will compile.
> Unfortunately we have no
> one to write a configure check for this :(
> (it was allready a problem
> when autocrap was the main build system of KDE...)
Ah yes, the arcane art of using an M4 macro and writing a line or two of shell
script ... you really cannot expect such a thing from a project full of C++
programmers (you're kidding, right?).
Here's a few patches contributed by a FreeBSD user that make the libpqxx
driver at least compile.
--
,_, | Michael Nottebrock | lofi at freebsd.org
(/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org
\u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org
-------------- next part --------------
--- 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) {
-------------- next part --------------
--- 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 <kexidb/connection_p.h>
-#include <pqxx/all.h>
+#include <pqxx/pqxx>
namespace KexiDB
{
-------------- next part --------------
--- 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();
-------------- next part --------------
--- 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())+"'";
}
//==================================================================================
-------------- next part --------------
--- 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 <kexidb/field.h>
#include <kexidb/connection.h>
-#include <pqxx/all.h>
+#include <pqxx/pqxx>
namespace KexiMigration
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kexi-devel/attachments/20070215/ae3bc8c9/attachment.pgp
More information about the Kexi-devel
mailing list