SVN commit 657127 by staniek:

KexiDB, Project Migration
- remove usage of older API functi (from Debian, thanks)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420477

CCMAIL:[EMAIL PROTECTED]
CCMAIL:[EMAIL PROTECTED]



 M  +1 -1      kexidb/drivers/pqxx/pqxxconnection.cpp  
 M  +1 -1      kexidb/drivers/pqxx/pqxxconnection_p.h  
 M  +1 -1      kexidb/drivers/pqxx/pqxxcursor.cpp  
 M  +2 -2      kexidb/drivers/pqxx/pqxxdriver.cpp  
 M  +1 -1      migration/keximigrate.cpp  
 M  +7 -3      migration/keximigrate.h  
 M  +1 -1      migration/pqxx/pqxxmigrate.h  


--- branches/koffice/1.6/koffice/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp 
#657126:657127
@@ -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(std::string(statement.utf8())));
 //             KexiDBDrvDbg << "Executed" << endl;
                //Commit the transaction
                if (implicityStarted) {
--- branches/koffice/1.6/koffice/kexi/kexidb/drivers/pqxx/pqxxconnection_p.h 
#657126:657127
@@ -31,7 +31,7 @@
 #define PQXXSQLCONNECTIONINTERNAL_H
 
 #include <kexidb/connection_p.h>
-#include <pqxx/all.h>
+#include <pqxx/pqxx>
 
 namespace KexiDB
 {
--- branches/koffice/1.6/koffice/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp 
#657126:657127
@@ -99,7 +99,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(std::string(m_sql.utf8())));
                ((pqxxSqlConnection*)connection())
                        
->drv_commitTransaction(((pqxxSqlConnection*)connection())->m_trans);
 //             my_conn->m_trans->commit();
--- branches/koffice/1.6/koffice/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp 
#657126:657127
@@ -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());
 }
 
 
//==================================================================================
--- branches/koffice/1.6/koffice/kexi/migration/keximigrate.cpp #657126:657127
@@ -185,7 +185,7 @@
                }
        }
 
-       uint i=0;
+//     uint i=0;
        // -- read table schemas and create them in memory (only for 
non-KexiDB-compat tables)
        foreach (QStringList::ConstIterator, it, tables) {
                if (destDriver->isSystemObjectName( *it ) //"kexi__objects", 
etc.
--- branches/koffice/1.6/koffice/kexi/migration/keximigrate.h #657126:657127
@@ -179,8 +179,11 @@
                  (so e.g. keximdb driver does not need this). */
 //! @todo SQL-dependent!
                virtual tristate drv_queryStringListFromSQL(
-                       const QString& sqlStatement, uint columnNumber, 
QStringList& stringList, int numRecords = -1)
-                { return cancelled; }
+                       const QString& sqlStatement, uint columnNumber, 
QStringList& stringList, 
+                       int numRecords = -1)
+                { Q_UNUSED(sqlStatement); Q_UNUSED(columnNumber); 
Q_UNUSED(stringList);
+                  Q_UNUSED(numRecords); 
+                  return cancelled; }
 
                /*! Fetches single string at column \a columnNumber from result 
obtained 
                 by running \a sqlStatement.
@@ -201,7 +204,8 @@
 //! @todo SQL-dependent!
                virtual tristate drv_fetchRecordFromSQL(const QString& 
sqlStatement, 
                        KexiDB::RowData& data, bool &firstRecord)
-                { return cancelled; }
+                { Q_UNUSED(sqlStatement); Q_UNUSED(data); 
Q_UNUSED(firstRecord);
+                  return cancelled; }
 
                //! Copy a table from source DB to target DB (driver specific)
                //! - create copies of KexiDB tables
--- branches/koffice/1.6/koffice/kexi/migration/pqxx/pqxxmigrate.h 
#657126:657127
@@ -27,7 +27,7 @@
 #include <kexidb/field.h>
 #include <kexidb/connection.h>
 
-#include <pqxx/all.h>
+#include <pqxx/pqxx>
 
 namespace KexiMigration
 {

Reply via email to