Message info
 
To:kde-commits@kde.org From:Bernhard Beschow Subject:[marble] src/lib: move newInstance() from RenderPluginInterface down to RenderPlugin and const\'ify it Date:Sun, 18 Mar 2012 16:09:09 +0100 (CET)
 

Git commit 0a209cdf023f96e58232577628c134ccac9ec582 by Bernhard Beschow.
Committed on 18/03/2012 at 14:26.
Pushed by beschow into branch 'master'.

move newInstance() from RenderPluginInterface down to RenderPlugin and const'ify it

M +6 -1 src/lib/RenderPlugin.h
M +0 -5 src/lib/RenderPluginInterface.h

http://commits.kde.org/marble/0a209cdf023f96e58232577628c134ccac9ec582

diff --git a/src/lib/RenderPlugin.h b/src/lib/RenderPlugin.h
index 2e967b7..f48d736 100644
--- a/src/lib/RenderPlugin.h
+++ b/src/lib/RenderPlugin.h
@@ -60,6 +60,11 @@ class MARBLE_EXPORT RenderPlugin : public QObject, public RenderPluginInterface
RenderPlugin();
virtual ~RenderPlugin();

+ /**
+ * @brief Returns a new object of the plugin
+ */
+ virtual RenderPlugin *newInstance() const = 0;
+
const MarbleModel* marbleModel() const;
void setMarbleModel( const MarbleModel* );

@@ -164,7 +169,7 @@ class MARBLE_EXPORT RenderPlugin : public QObject, public RenderPluginInterface
};

#define MARBLE_PLUGIN(T) public:\
- virtual RenderPlugin* newInstance() { return new T(); }
+ virtual RenderPlugin* newInstance() const { return new T(); }
}

#endif
diff --git a/src/lib/RenderPluginInterface.h b/src/lib/RenderPluginInterface.h
index a305ed2..53eb079 100644
--- a/src/lib/RenderPluginInterface.h
+++ b/src/lib/RenderPluginInterface.h
@@ -31,11 +31,6 @@ class RenderPluginInterface: public PluginInterface, public LayerInterface
{
public:
virtual ~RenderPluginInterface();
-
- /**
- * @brief Returns a new object of the plugin
- */
- virtual RenderPlugin * newInstance() = 0;

/**
* @brief Returns the name(s) of the backend that the plugin can render