summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2016-03-31 12:15:53 +0200
committerMurray Cumming <murrayc@murrayc.com>2016-03-31 12:16:32 +0200
commita1740f7fe821c0a376005aa512fc8bbca4a6b1c3 (patch)
treebdb0c8efd6e16c27f44737308ddd7e28f32fba91 /examples
parentbd184b3d2204b5a3790046f090f427da12c2e793 (diff)
downloadglibmm-a1740f7fe821c0a376005aa512fc8bbca4a6b1c3.tar.gz
Examples: Use libsigc++ 2.9/10 and its slot/signal<R(Args...)> syntax.
The older libsigc++ syntax is deprecated.
Diffstat (limited to 'examples')
-rw-r--r--examples/iochannel_stream/fdstream.cc4
-rw-r--r--examples/iochannel_stream/fdstream.h4
-rw-r--r--examples/thread/dispatcher.cc6
-rw-r--r--examples/thread/dispatcher2.cc4
4 files changed, 9 insertions, 9 deletions
diff --git a/examples/iochannel_stream/fdstream.cc b/examples/iochannel_stream/fdstream.cc
index 1c4ff95c..51b6c3e8 100644
--- a/examples/iochannel_stream/fdstream.cc
+++ b/examples/iochannel_stream/fdstream.cc
@@ -66,7 +66,7 @@ fdstreambuf::detach_fd()
void
fdstreambuf::connect(
- const sigc::slot<bool, Glib::IOCondition>& callback, Glib::IOCondition condition)
+ const sigc::slot<bool(Glib::IOCondition)>& callback, Glib::IOCondition condition)
{
Glib::signal_io().connect(callback, iochannel_, condition);
}
@@ -315,7 +315,7 @@ fdstream::close()
}
void
-fdstream::connect(const sigc::slot<bool, Glib::IOCondition>& callback, Glib::IOCondition condition)
+fdstream::connect(const sigc::slot<bool(Glib::IOCondition)>& callback, Glib::IOCondition condition)
{
buf.connect(callback, condition);
}
diff --git a/examples/iochannel_stream/fdstream.h b/examples/iochannel_stream/fdstream.h
index 824f96ec..19283441 100644
--- a/examples/iochannel_stream/fdstream.h
+++ b/examples/iochannel_stream/fdstream.h
@@ -72,7 +72,7 @@ public:
void create_iochannel(int fd, bool manage);
void detach_fd();
void close_iochannel();
- void connect(const sigc::slot<bool, Glib::IOCondition>& callback, Glib::IOCondition condition);
+ void connect(const sigc::slot<bool(Glib::IOCondition)>& callback, Glib::IOCondition condition);
fdstream_error get_error() const;
protected:
@@ -106,7 +106,7 @@ public:
void detach();
void close();
- void connect(const sigc::slot<bool, Glib::IOCondition>& callback, Glib::IOCondition condition);
+ void connect(const sigc::slot<bool(Glib::IOCondition)>& callback, Glib::IOCondition condition);
fdstream_error get_error() const;
private:
diff --git a/examples/thread/dispatcher.cc b/examples/thread/dispatcher.cc
index ae9e084a..ecd18a7d 100644
--- a/examples/thread/dispatcher.cc
+++ b/examples/thread/dispatcher.cc
@@ -38,7 +38,7 @@ public:
void join();
bool unfinished() const;
- sigc::signal<void>& signal_finished();
+ sigc::signal<void()>& signal_finished();
private:
enum
@@ -53,7 +53,7 @@ private:
int id_;
unsigned int progress_;
Glib::Dispatcher signal_increment_;
- sigc::signal<void> signal_finished_;
+ sigc::signal<void()> signal_finished_;
void progress_increment();
void thread_function();
@@ -121,7 +121,7 @@ ThreadProgress::unfinished() const
return (progress_ < ITERATIONS);
}
-sigc::signal<void>&
+sigc::signal<void()>&
ThreadProgress::signal_finished()
{
return signal_finished_;
diff --git a/examples/thread/dispatcher2.cc b/examples/thread/dispatcher2.cc
index dbe176c7..d56c5e72 100644
--- a/examples/thread/dispatcher2.cc
+++ b/examples/thread/dispatcher2.cc
@@ -41,7 +41,7 @@ public:
void signal_finished_emit();
void print() const;
- using type_signal_end = sigc::signal<void>;
+ using type_signal_end = sigc::signal<void()>;
static type_signal_end& signal_end();
private:
@@ -128,7 +128,7 @@ ThreadTimer::print() const
std::cout << time_ << " seconds since start" << std::endl;
}
-sigc::signal<void>&
+sigc::signal<void()>&
ThreadTimer::signal_end()
{
return signal_end_;