Commit 786c659b authored by Bernd Schmidt's avatar Bernd Schmidt
Browse files

Remove unused setMainComponent

parent f1164fbf
...@@ -131,17 +131,6 @@ void Palapeli::Puzzle::setLocation(const QString& location) ...@@ -131,17 +131,6 @@ void Palapeli::Puzzle::setLocation(const QString& location)
d->m_location = location; d->m_location = location;
} }
void Palapeli::Puzzle::setMainComponent(Palapeli::PuzzleComponent* component)
{
if (!component)
return;
//add component
Component*& c = d->m_components[component->type()];
delete c;
c = new Component(component);
d->m_mainComponent = component;
}
void Palapeli::Puzzle::dropComponent(Palapeli::PuzzleComponent::Type type) void Palapeli::Puzzle::dropComponent(Palapeli::PuzzleComponent::Type type)
{ {
//DO NEVER EVER USE THIS FUNCTION! THIS FUNCTION IS PURELY DANGEROUS. STUFF WILL BREAK. //DO NEVER EVER USE THIS FUNCTION! THIS FUNCTION IS PURELY DANGEROUS. STUFF WILL BREAK.
......
...@@ -95,11 +95,6 @@ namespace Palapeli ...@@ -95,11 +95,6 @@ namespace Palapeli
QString identifier() const; QString identifier() const;
QString location() const; QString location() const;
void setLocation(const QString& location); void setLocation(const QString& location);
///Resets the main component, which is used for casting. Components
///which were created before the setMainComponent() call are not
///affected. Other components of the same type will be overwritten
///by the given @a component.
void setMainComponent(Palapeli::PuzzleComponent* component);
///Deletes the component with the given @a type from this puzzle. ///Deletes the component with the given @a type from this puzzle.
///Because the component might be in use elsewhere in the program, ///Because the component might be in use elsewhere in the program,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment