Helge Hafting <[EMAIL PROTECTED]> writes:

| This is not something I really expected to work, with gcc 4.1 being
| a work in progress.  Still, if someone is interested,
| here is what happened:

This might be a fix, but I am not sure how nice this is, or why we get
these errors in the first place...

Index: src/graphics/GraphicsCacheItem.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsCacheItem.C,v
retrieving revision 1.66
diff -u -p -r1.66 GraphicsCacheItem.C
--- src/graphics/GraphicsCacheItem.C	2 Nov 2005 20:11:36 -0000	1.66
+++ src/graphics/GraphicsCacheItem.C	3 Jan 2006 11:55:24 -0000
@@ -294,8 +294,9 @@ void CacheItem::Impl::loadImage()
 	image_ = Image::newImage();
 
 	cl_.disconnect();
-	cl_ = image_->finishedLoading.connect(
-		boost::bind(&Impl::imageLoaded, this, _1));
+	boost::function<void(bool)> f = boost::bind(&Impl::imageLoaded, this, _1);
+	
+	cl_ = image_->finishedLoading.connect(f);
 	image_->load(file_to_load_);
 }
 
@@ -439,7 +440,8 @@ void CacheItem::Impl::convertToDisplayFo
 	// the graphics converter so that we can load the modified file
 	// on completion of the conversion process.
 	converter_.reset(new Converter(filename, to_file_base, from, to));
-	converter_->connect(boost::bind(&Impl::imageConverted, this, _1));
+	boost::function<void(bool)> f = boost::bind(&Impl::imageConverted, this, _1);
+	converter_->connect(f);
 	converter_->startConversion();
 }
 
Index: src/graphics/GraphicsCacheItem.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsCacheItem.h,v
retrieving revision 1.43
diff -u -p -r1.43 GraphicsCacheItem.h
--- src/graphics/GraphicsCacheItem.h	26 Sep 2004 14:19:47 -0000	1.43
+++ src/graphics/GraphicsCacheItem.h	3 Jan 2006 11:55:24 -0000
@@ -84,8 +84,7 @@ public:
 	/** Connect and you'll be informed when the loading status of the image
 	 *  changes.
 	 */
-	typedef boost::signal<void()> sig_type;
-	typedef sig_type::slot_type slot_type;
+	typedef boost::function<void()> slot_type;
 	///
 	boost::signals::connection connect(slot_type const &) const;
 
Index: src/graphics/GraphicsLoader.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsLoader.h,v
retrieving revision 1.24
diff -u -p -r1.24 GraphicsLoader.h
--- src/graphics/GraphicsLoader.h	25 Nov 2004 19:13:02 -0000	1.24
+++ src/graphics/GraphicsLoader.h	3 Jan 2006 11:55:24 -0000
@@ -88,8 +88,7 @@ public:
 	/** Connect and you'll be informed when the loading status of the image
 	 *  changes.
 	 */
-	typedef boost::signal<void()> sig_type;
-	typedef sig_type::slot_type slot_type;
+	typedef boost::function<void()> slot_type;
 	///
 	boost::signals::connection connect(slot_type const &) const;
 
Index: src/support/FileMonitor.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/FileMonitor.C,v
retrieving revision 1.10
diff -u -p -r1.10 FileMonitor.C
--- src/support/FileMonitor.C	31 Jan 2005 10:42:23 -0000	1.10
+++ src/support/FileMonitor.C	3 Jan 2006 11:55:24 -0000
@@ -44,7 +44,7 @@ public:
 	Timeout timer_;
 
 	/// This signal is emitted if the file is modified (has a new checksum).
-	FileMonitor::FileChangedSig fileChanged_;
+	boost::signal<void()> fileChanged_;
 
 	/** We use these to ascertain whether a file (once loaded successfully)
 	 *  has changed.
Index: src/support/FileMonitor.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/FileMonitor.h,v
retrieving revision 1.8
diff -u -p -r1.8 FileMonitor.h
--- src/support/FileMonitor.h	26 Sep 2004 14:19:47 -0000	1.8
+++ src/support/FileMonitor.h	3 Jan 2006 11:55:24 -0000
@@ -52,8 +52,7 @@ public:
 	unsigned long checksum() const;
 
 	/// Connect and you'll be informed when the file has changed.
-	typedef boost::signal<void()> FileChangedSig;
-	typedef FileChangedSig::slot_type slot_type;
+	typedef boost::function<void()> slot_type;
 	///
 	boost::signals::connection connect(slot_type const &) const;
 
-- 
        Lgb

Reply via email to