summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2011-10-26 22:34:01 +0200
committerMurray Cumming <murrayc@murrayc.com>2011-10-26 22:34:01 +0200
commit3e0fbb22c0d4814de4174d32e12a45cbad79980e (patch)
treec1c60b6b2900c9ef61146cd2a7ebec6c1d0219d7
parentacf84955b9a86597e4675a0edc0848851ecafba7 (diff)
downloadglibmm-3e0fbb22c0d4814de4174d32e12a45cbad79980e.tar.gz
Avoid use of deprecated API in tests and examples.
* tests/Makefile.am: * examples/Makefile.am: Disable deprecated API. * examples/network/socket-client.cc: * examples/network/socket-server.cc: * examples/thread/dispatcher.cc: * examples/thread/dispatcher2.cc: * examples/thread/thread.cc: Remove calls to Glib::thread_init(), instead calling Glib::init() where that side-effect was also intended.
-rw-r--r--ChangeLog13
-rw-r--r--examples/Makefile.am3
-rw-r--r--examples/network/socket-client.cc2
-rw-r--r--examples/network/socket-server.cc2
-rw-r--r--examples/thread/dispatcher.cc2
-rw-r--r--examples/thread/dispatcher2.cc2
-rw-r--r--examples/thread/thread.cc4
-rw-r--r--tests/Makefile.am3
8 files changed, 21 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index ab3ff144..69ac18fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2011-10-26 Murray Cumming <murrayc@murrayc.com>
+ Avoid use of deprecated API in tests and examples.
+
+ * tests/Makefile.am:
+ * examples/Makefile.am: Disable deprecated API.
+ * examples/network/socket-client.cc:
+ * examples/network/socket-server.cc:
+ * examples/thread/dispatcher.cc:
+ * examples/thread/dispatcher2.cc:
+ * examples/thread/thread.cc: Remove calls to Glib::thread_init(), instead
+ calling Glib::init() where that side-effect was also intended.
+
+2011-10-26 Murray Cumming <murrayc@murrayc.com>
+
threadpool example: Use Mutex instead of StaticMutex.
* examples/thread/threadpool.cc: The advantage of StaticMutex was that
diff --git a/examples/Makefile.am b/examples/Makefile.am
index e905b25a..0de871a7 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -43,7 +43,8 @@ giomm_includes = -I$(top_builddir)/gio $(if $(srcdir:.=),-I$(top_srcdir)/gio)
local_cppflags = -I$(top_builddir) $(glibmm_includes) $(giomm_includes)
AM_CPPFLAGS = $(local_cppflags)
-AM_CXXFLAGS = $(GIOMM_CFLAGS) $(GLIBMM_WXXFLAGS)
+AM_CXXFLAGS = $(GIOMM_CFLAGS) $(GLIBMM_WXXFLAGS) -DGLIBMM_DISABLE_DEPRECATED -DGIOMM_DISABLE_DEPRECATED
+
local_libglibmm = $(top_builddir)/glib/glibmm/libglibmm-$(GLIBMM_API_VERSION).la
local_libgiomm = $(top_builddir)/gio/giomm/libgiomm-$(GIOMM_API_VERSION).la
diff --git a/examples/network/socket-client.cc b/examples/network/socket-client.cc
index 33428b22..e6c5ae15 100644
--- a/examples/network/socket-client.cc
+++ b/examples/network/socket-client.cc
@@ -108,8 +108,6 @@ main (int argc,
Glib::RefPtr<Gio::SocketAddressEnumerator> enumerator;
Glib::RefPtr<Gio::SocketConnectable> connectable;
- Glib::thread_init (NULL);
-
Gio::init ();
context = g_option_context_new (" <hostname>[:port] - Test GSocket client stuff");
diff --git a/examples/network/socket-server.cc b/examples/network/socket-server.cc
index d2dc3151..bc2822b1 100644
--- a/examples/network/socket-server.cc
+++ b/examples/network/socket-server.cc
@@ -111,8 +111,6 @@ main (int argc,
GOptionContext *context;
Glib::RefPtr<Gio::Cancellable> cancellable;
- Glib::thread_init (NULL);
-
Gio::init ();
context = g_option_context_new (" - Test GSocket server stuff");
diff --git a/examples/thread/dispatcher.cc b/examples/thread/dispatcher.cc
index d5d7d8b0..01906ab9 100644
--- a/examples/thread/dispatcher.cc
+++ b/examples/thread/dispatcher.cc
@@ -213,7 +213,7 @@ void Application::on_progress_finished(ThreadProgress* thread_progress)
int main(int, char**)
{
- Glib::thread_init();
+ Glib::init();
Application application;
application.run();
diff --git a/examples/thread/dispatcher2.cc b/examples/thread/dispatcher2.cc
index fd7379e3..2f837b31 100644
--- a/examples/thread/dispatcher2.cc
+++ b/examples/thread/dispatcher2.cc
@@ -216,7 +216,7 @@ void Dispatcher::end()
int main(int, char**)
{
- Glib::thread_init();
+ Glib::init();
main_loop = Glib::MainLoop::create();
Dispatcher dispatcher;
diff --git a/examples/thread/thread.cc b/examples/thread/thread.cc
index 1e26430e..06c25f8c 100644
--- a/examples/thread/thread.cc
+++ b/examples/thread/thread.cc
@@ -4,7 +4,7 @@
#include <glibmm/thread.h>
#include <glibmm/random.h>
#include <glibmm/timer.h>
-
+#include <glibmm/init.h>
namespace
{
@@ -93,7 +93,7 @@ void MessageQueue::consumer()
int main(int, char**)
{
- Glib::thread_init();
+ Glib::init();
MessageQueue queue;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 10bc1ac4..f58e18c7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,7 +45,8 @@ giomm_includes = -I$(top_builddir)/gio $(if $(srcdir:.=),-I$(top_srcdir)/gio)
local_cppflags = -I$(top_builddir) $(glibmm_includes) $(giomm_includes)
AM_CPPFLAGS = $(local_cppflags) $(GIOMM_CFLAGS)
-AM_CXXFLAGS = $(GLIBMM_WXXFLAGS)
+AM_CXXFLAGS = $(GLIBMM_WXXFLAGS) -DGLIBMM_DISABLE_DEPRECATED -DGIOMM_DISABLE_DEPRECATED
+
local_libglibmm = $(top_builddir)/glib/glibmm/libglibmm-$(GLIBMM_API_VERSION).la
local_libgiomm = $(top_builddir)/gio/giomm/libgiomm-$(GIOMM_API_VERSION).la