From 4c3e5463752eb90fe5e69716fcbd7ea2ccc92bcd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 22 Nov 2007 00:03:18 +0000 Subject: [PATCH] remove one git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21707 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/graphics/GraphicsCacheItem.cpp | 2 +- src/graphics/GraphicsImage.cpp | 2 +- src/graphics/GraphicsImage.h | 5 +---- src/graphics/GraphicsLoader.cpp | 4 +++- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/graphics/GraphicsCacheItem.cpp b/src/graphics/GraphicsCacheItem.cpp index a1310385bb..83bf09d289 100644 --- a/src/graphics/GraphicsCacheItem.cpp +++ b/src/graphics/GraphicsCacheItem.cpp @@ -295,7 +295,7 @@ void CacheItem::Impl::loadImage() setStatus(Loading); LYXERR(Debug::GRAPHICS, "Loading image."); - image_ = Image::newImage(); + image_.reset(Image::newImage()); cl_.disconnect(); cl_ = image_->finishedLoading.connect( diff --git a/src/graphics/GraphicsImage.cpp b/src/graphics/GraphicsImage.cpp index ccb96206e3..b1abf942db 100644 --- a/src/graphics/GraphicsImage.cpp +++ b/src/graphics/GraphicsImage.cpp @@ -22,7 +22,7 @@ namespace graphics { // This is to be connected to a function that will return a new // instance of a viable derived class. -boost::function Image::newImage; +boost::function Image::newImage; /// Return the list of loadable formats. boost::function Image::loadableFormats; diff --git a/src/graphics/GraphicsImage.h b/src/graphics/GraphicsImage.h index f85bc8925b..6b25f65052 100644 --- a/src/graphics/GraphicsImage.h +++ b/src/graphics/GraphicsImage.h @@ -25,7 +25,6 @@ #define GRAPHICSIMAGE_H #include -#include #include #include @@ -44,9 +43,7 @@ public: /** This is to be connected to a function that will return a new * instance of a viable derived class. */ - typedef boost::shared_ptr ImagePtr; - /// - static boost::function newImage; + static boost::function newImage; /// typedef std::vector FormatList; diff --git a/src/graphics/GraphicsLoader.cpp b/src/graphics/GraphicsLoader.cpp index 062dc6fc13..a7ac094cd2 100644 --- a/src/graphics/GraphicsLoader.cpp +++ b/src/graphics/GraphicsLoader.cpp @@ -29,6 +29,8 @@ using support::FileName; namespace graphics { +typedef boost::shared_ptr ImagePtr; + class Loader::Impl : public boost::signals::trackable { public: /// @@ -53,7 +55,7 @@ public: */ Cache::ItemPtr cached_item_; /// We modify a local copy of the image once it is loaded. - Image::ImagePtr image_; + ImagePtr image_; /// This signal is emitted when the image loading status changes. boost::signal signal_; /// The connection of the signal StatusChanged -- 2.39.2