[glom] libglom: Avoid client-only build changes: partial recommit of revert.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom] libglom: Avoid client-only build changes: partial recommit of revert.
- Date: Thu, 3 Sep 2009 19:26:08 +0000 (UTC)
commit 93d758929927fc75c815cfd6e49b222eed7d2637
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Sep 3 14:11:35 2009 +0200
libglom: Avoid client-only build changes: partial recommit of revert.
* glom/libglom/appstate.cc:
* glom/libglom/connectionpool.h:
* glom/libglom/connectionpool_backends/backend.h:
* glom/libglom/connectionpool_backends/postgres.h:
* glom/libglom/connectionpool_backends/postgres_central.h:
* glom/libglom/connectionpool_backends/postgres_self.h:
* glom/libglom/connectionpool_backends/sqlite.h:
* glom/libglom/document/document.h: Remove mention of
GLOM_ENABLE_CLIENT_ONLY from comments because we no longer use it in
libglom.
* glom/libglom/connectionpool_backends/postgres.cc: attempt_connect():
Do not use Gda::CONNECTION_OPTIONS_READ_ONLY just because exceptions
are disabled in the build. Please stop using vaguely-related ifdefs
to hack changes in. In this case it would be GLOM_ENABLE_CLIENT_ONLY,
but we don't want that option in libglom anymore.
ChangeLog | 20 ++++++++++++++++++++
glom/libglom/appstate.cc | 2 +-
glom/libglom/connectionpool.h | 2 +-
glom/libglom/connectionpool_backends/backend.h | 2 +-
glom/libglom/connectionpool_backends/postgres.cc | 11 ++++++-----
glom/libglom/connectionpool_backends/postgres.h | 2 +-
.../connectionpool_backends/postgres_central.h | 2 +-
.../connectionpool_backends/postgres_self.h | 2 +-
glom/libglom/connectionpool_backends/sqlite.h | 2 +-
glom/libglom/document/document.h | 2 +-
10 files changed, 34 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 647a376..ba7b2e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2009-09-03 Murray Cumming <murrayc murrayc com>
+
+ libglom: Avoid client-only build changes: partial recommit of revert.
+
+ * glom/libglom/appstate.cc:
+ * glom/libglom/connectionpool.h:
+ * glom/libglom/connectionpool_backends/backend.h:
+ * glom/libglom/connectionpool_backends/postgres.h:
+ * glom/libglom/connectionpool_backends/postgres_central.h:
+ * glom/libglom/connectionpool_backends/postgres_self.h:
+ * glom/libglom/connectionpool_backends/sqlite.h:
+ * glom/libglom/document/document.h: Remove mention of
+ GLOM_ENABLE_CLIENT_ONLY from comments because we no longer use it in
+ libglom.
+ * glom/libglom/connectionpool_backends/postgres.cc: attempt_connect():
+ Do not use Gda::CONNECTION_OPTIONS_READ_ONLY just because exceptions
+ are disabled in the build. Please stop using vaguely-related ifdefs
+ to hack changes in. In this case it would be GLOM_ENABLE_CLIENT_ONLY,
+ but we don't want that option in libglom anymore.
+
2009-09-01 David King <davidk openismus com>
* glom/glom.glade: Fix an interesting warning, where the quickfind
diff --git a/glom/libglom/appstate.cc b/glom/libglom/appstate.cc
index f0e4c0b..d3ffa52 100644
--- a/glom/libglom/appstate.cc
+++ b/glom/libglom/appstate.cc
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include <libglom/libglom_config.h> // GLOM_ENABLE_CLIENT_ONLY
+#include <libglom/libglom_config.h>
#include "appstate.h"
diff --git a/glom/libglom/connectionpool.h b/glom/libglom/connectionpool.h
index 4af3563..a7baf11 100644
--- a/glom/libglom/connectionpool.h
+++ b/glom/libglom/connectionpool.h
@@ -21,7 +21,7 @@
#ifndef GLOM_CONNECTIONPOOL_H
#define GLOM_CONNECTIONPOOL_H
-#include <libglom/libglom_config.h> // For GLOM_ENABLE_CLIENT_ONLY
+#include <libglom/libglom_config.h>
#include <libgdamm.h>
#include <libglom/sharedptr.h>
diff --git a/glom/libglom/connectionpool_backends/backend.h b/glom/libglom/connectionpool_backends/backend.h
index f731139..241d97a 100644
--- a/glom/libglom/connectionpool_backends/backend.h
+++ b/glom/libglom/connectionpool_backends/backend.h
@@ -21,7 +21,7 @@
#ifndef GLOM_BACKEND_BACKEND_H
#define GLOM_BACKEND_BACKEND_H
-#include <libglom/libglom_config.h> // For GLOM_ENABLE_CLIENT_ONLY
+#include <libglom/libglom_config.h>
#include <libglom/sharedptr.h>
#include <libglom/data_structure/field.h>
diff --git a/glom/libglom/connectionpool_backends/postgres.cc b/glom/libglom/connectionpool_backends/postgres.cc
index a0ceeff..cce44b3 100644
--- a/glom/libglom/connectionpool_backends/postgres.cc
+++ b/glom/libglom/connectionpool_backends/postgres.cc
@@ -81,15 +81,16 @@ Glib::RefPtr<Gnome::Gda::Connection> Postgres::attempt_connect(const Glib::ustri
std::cout << " DEBUG: auth_string=" << auth_string << std::endl;
#endif
+//TODO: Allow the client-only build to specify a read-only connection,
+//so we can use Gnome::Gda::CONNECTION_OPTIONS_READ_ONLY?
+//But this must be a runtime thing - it can't be a build-time change,
+//because libglom has no client-only build. It always offers everything.
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
connection = Gnome::Gda::Connection::open_from_string("PostgreSQL",
cnc_string, auth_string,
Gnome::Gda::CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE
-#ifndef GLOM_ENABLE_CLIENT_ONLY
- | Gnome::Gda::CONNECTION_OPTIONS_READ_ONLY
-#endif
);
connection->statement_execute_non_select("SET DATESTYLE = 'ISO'");
data_model = connection->statement_execute_select("SELECT version()");
@@ -100,7 +101,7 @@ Glib::RefPtr<Gnome::Gda::Connection> Postgres::attempt_connect(const Glib::ustri
std::auto_ptr<Glib::Error> ex;
connection = Gnome::Gda::Connection::open_from_string("PostgreSQL",
cnc_string, auth_string,
- Gnome::Gda::CONNECTION_OPTIONS_READ_ONLY | Gnome::Gda::CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE,
+ Gnome::Gda::CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE,
ex);
if(!ex.get())
@@ -133,7 +134,7 @@ Glib::RefPtr<Gnome::Gda::Connection> Postgres::attempt_connect(const Glib::ustri
#else
temp_conn = Gnome::Gda::Connection::open_from_string("PostgreSQL",
cnc_string, auth_string,
- Gnome::Gda::CONNECTION_OPTIONS_READ_ONLY | Gnome::Gda::CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE, ex);
+ Gnome::Gda::CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE, ex);
#endif
#ifdef GLOM_CONNECTION_DEBUG
diff --git a/glom/libglom/connectionpool_backends/postgres.h b/glom/libglom/connectionpool_backends/postgres.h
index 5165454..763825a 100644
--- a/glom/libglom/connectionpool_backends/postgres.h
+++ b/glom/libglom/connectionpool_backends/postgres.h
@@ -24,7 +24,7 @@
#include <libgdamm.h>
#include <libglom/connectionpool_backends/backend.h>
-#include <libglom/libglom_config.h> // For GLOM_ENABLE_CLIENT_ONLY
+#include <libglom/libglom_config.h>
namespace Glom
{
diff --git a/glom/libglom/connectionpool_backends/postgres_central.h b/glom/libglom/connectionpool_backends/postgres_central.h
index 7858786..d40d9b4 100644
--- a/glom/libglom/connectionpool_backends/postgres_central.h
+++ b/glom/libglom/connectionpool_backends/postgres_central.h
@@ -23,7 +23,7 @@
#include <libglom/connectionpool_backends/postgres.h>
-#include <libglom/libglom_config.h> // For GLOM_ENABLE_CLIENT_ONLY
+#include <libglom/libglom_config.h>
namespace Glom
{
diff --git a/glom/libglom/connectionpool_backends/postgres_self.h b/glom/libglom/connectionpool_backends/postgres_self.h
index 027b1d8..1b52d1a 100644
--- a/glom/libglom/connectionpool_backends/postgres_self.h
+++ b/glom/libglom/connectionpool_backends/postgres_self.h
@@ -21,7 +21,7 @@
#ifndef GLOM_BACKEND_POSTGRES_SELF_H
#define GLOM_BACKEND_POSTGRES_SELF_H
-#include <libglom/libglom_config.h> // For GLOM_ENABLE_CLIENT_ONLY
+#include <libglom/libglom_config.h>
#include <libglom/connectionpool_backends/postgres.h>
diff --git a/glom/libglom/connectionpool_backends/sqlite.h b/glom/libglom/connectionpool_backends/sqlite.h
index 0b33931..bde1a29 100644
--- a/glom/libglom/connectionpool_backends/sqlite.h
+++ b/glom/libglom/connectionpool_backends/sqlite.h
@@ -24,7 +24,7 @@
#include <libgdamm.h>
#include <libglom/connectionpool_backends/backend.h>
-#include <libglom/libglom_config.h> // For GLOM_ENABLE_CLIENT_ONLY
+#include <libglom/libglom_config.h>
namespace Glom
{
diff --git a/glom/libglom/document/document.h b/glom/libglom/document/document.h
index d3169eb..c77028f 100644
--- a/glom/libglom/document/document.h
+++ b/glom/libglom/document/document.h
@@ -21,7 +21,7 @@
#ifndef DOCUMENT_GLOM_H
#define DOCUMENT_GLOM_H
-#include <libglom/libglom_config.h> // For GLOM_ENABLE_CLIENT_ONLY
+#include <libglom/libglom_config.h>
#include <libglom/document/bakery/document_xml.h>
#include <libglom/data_structure/relationship.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]