[glom] Use std::ref() instead of sigc::ref().



commit 85f28cf96676ab672ff748b55bac57bb699c8fcd
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 8 12:17:52 2016 +0100

    Use std::ref() instead of sigc::ref().

 glom/import_csv/dialog_import_csv.cc               |    2 +-
 glom/libglom/connectionpool_backends/mysql_self.cc |    2 +-
 .../connectionpool_backends/postgres_self.cc       |    2 +-
 glom/libglom/spawn_with_feedback.cc                |   14 +++++++-------
 4 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/glom/import_csv/dialog_import_csv.cc b/glom/import_csv/dialog_import_csv.cc
index 1964fba..ad9c434 100644
--- a/glom/import_csv/dialog_import_csv.cc
+++ b/glom/import_csv/dialog_import_csv.cc
@@ -117,7 +117,7 @@ Dialog_Import_CSV::Dialog_Import_CSV(BaseObjectType* cobject, const Glib::RefPtr
   auto renderer = Gtk::manage(new Gtk::CellRendererText);
   m_encoding_combo->set_model(m_encoding_model);
   m_encoding_combo->pack_start(*renderer);
-  m_encoding_combo->set_cell_data_func(*renderer, sigc::bind(sigc::mem_fun(*this, 
&Dialog_Import_CSV::encoding_data_func), sigc::ref(*renderer)));
+  m_encoding_combo->set_cell_data_func(*renderer, sigc::bind(sigc::mem_fun(*this, 
&Dialog_Import_CSV::encoding_data_func), std::ref(*renderer)));
   m_encoding_combo->set_row_separator_func(sigc::mem_fun(*this, &Dialog_Import_CSV::row_separator_func));
   m_encoding_combo->set_active(0);
 
diff --git a/glom/libglom/connectionpool_backends/mysql_self.cc 
b/glom/libglom/connectionpool_backends/mysql_self.cc
index f468953..f2e36e9 100644
--- a/glom/libglom/connectionpool_backends/mysql_self.cc
+++ b/glom/libglom/connectionpool_backends/mysql_self.cc
@@ -644,7 +644,7 @@ Glib::RefPtr<Gnome::Gda::Connection> MySQLSelfHosted::connect(const Glib::ustrin
         //Wait:
         auto mainloop = Glib::MainLoop::create(false);
           auto connection_timeout = Glib::signal_timeout().connect(
-          sigc::bind(sigc::ptr_fun(&on_timeout_delay), sigc::ref(mainloop)),
+          sigc::bind(sigc::ptr_fun(&on_timeout_delay), std::ref(mainloop)),
           1000 /* 1 second */);
         mainloop->run();
         connection_timeout.disconnect();
diff --git a/glom/libglom/connectionpool_backends/postgres_self.cc 
b/glom/libglom/connectionpool_backends/postgres_self.cc
index f22eda6..0f87720 100644
--- a/glom/libglom/connectionpool_backends/postgres_self.cc
+++ b/glom/libglom/connectionpool_backends/postgres_self.cc
@@ -550,7 +550,7 @@ Glib::RefPtr<Gnome::Gda::Connection> PostgresSelfHosted::connect(const Glib::ust
         //Wait:
         auto mainloop = Glib::MainLoop::create(false);
           sigc::connection connection_timeout = Glib::signal_timeout().connect(
-          sigc::bind(sigc::ptr_fun(&on_timeout_delay), sigc::ref(mainloop)),
+          sigc::bind(sigc::ptr_fun(&on_timeout_delay), std::ref(mainloop)),
           1000 /* 1 second */);
         mainloop->run();
         connection_timeout.disconnect();
diff --git a/glom/libglom/spawn_with_feedback.cc b/glom/libglom/spawn_with_feedback.cc
index 394cab8..7ec4783 100644
--- a/glom/libglom/spawn_with_feedback.cc
+++ b/glom/libglom/spawn_with_feedback.cc
@@ -144,7 +144,7 @@ private:
     channel->set_encoding("");
     channel->set_buffered(false);
 
-    Glib::signal_io().connect(sigc::bind(sigc::mem_fun(*this, &SpawnInfo::on_io), channel, 
sigc::ref(string)), channel, Glib::IO_IN);
+    Glib::signal_io().connect(sigc::bind(sigc::mem_fun(*this, &SpawnInfo::on_io), channel, 
std::ref(string)), channel, Glib::IO_IN);
   }
 #endif // !G_OS_WIN32
 
@@ -327,7 +327,7 @@ static int spawn_sync(const Glib::ustring& command_line, std::string* stdout_tex
 
   auto info = spawn_async(command_line, redirect_flags); //This could throw
   info->signal_finished().connect(
-    sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), sigc::ref(mainloop) ) );
+    sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), std::ref(mainloop) ) );
 
   // Block until signal_finished is emitted:
   mainloop->run();
@@ -358,7 +358,7 @@ bool execute_command_line_and_wait(const std::string& command, const SlotProgres
 
   auto mainloop = Glib::MainLoop::create(false);
   info->signal_finished().connect(
-    sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), sigc::ref(mainloop) ) );
+    sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), std::ref(mainloop) ) );
 
   // Pulse two times a second:
   sigc::connection timeout_connection = Glib::signal_timeout().connect(
@@ -403,7 +403,7 @@ bool execute_command_line_and_wait(const std::string& command, const SlotProgres
 
   auto mainloop = Glib::MainLoop::create(false);
   info->signal_finished().connect(
-    sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), sigc::ref(mainloop) ) );
+    sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), std::ref(mainloop) ) );
 
   // Pulse two times a second:
   sigc::connection timeout_connection = Glib::signal_timeout().connect(
@@ -573,10 +573,10 @@ bool execute_command_line_and_wait_until_second_command_returns_success(const st
 
   auto mainloop = Glib::MainLoop::create(false);
   sigc::connection watch_conn = info->signal_finished().connect(
-    sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), sigc::ref(mainloop) ) );
+    sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), std::ref(mainloop) ) );
 
   // Call the second command once every second
-  sigc::connection timeout_conn = 
Glib::signal_timeout().connect(sigc::bind(sigc::ptr_fun(&second_command_on_timeout), 
sigc::ref(second_command), sigc::ref(success_text), slot_progress, sigc::ref(mainloop)), 1000);
+  sigc::connection timeout_conn = 
Glib::signal_timeout().connect(sigc::bind(sigc::ptr_fun(&second_command_on_timeout), 
std::ref(second_command), std::ref(success_text), slot_progress, std::ref(mainloop)), 1000);
   if(slot_progress)
     slot_progress(); //Make sure it is called at least once.
 
@@ -599,7 +599,7 @@ bool execute_command_line_and_wait_until_second_command_returns_success(const st
     //Sleep for a bit more, because I think that pg_ctl sometimes reports success too early.
     auto mainloop = Glib::MainLoop::create(false);
     sigc::connection connection_timeout = Glib::signal_timeout().connect(
-     sigc::bind(sigc::ptr_fun(&on_timeout_delay), sigc::ref(mainloop)),
+     sigc::bind(sigc::ptr_fun(&on_timeout_delay), std::ref(mainloop)),
      8000);
     mainloop->run();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]