Verified Commit 9629826a authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Use getter & setter instead of friend class declaration

parent 79a48334
......@@ -118,6 +118,11 @@ public:
return loaded;
}
void setIsLoaded(bool isLoaded)
{
loaded = isLoaded;
}
/// Returns the name of the parent part the GUI of the plugin should be created in
virtual QString parentPart() const
{
......@@ -128,8 +133,6 @@ private:
CoreInterface *core;
GUIInterface *gui;
bool loaded;
friend class PluginManager;
};
}
......
......@@ -88,7 +88,7 @@ void PluginManager::load(const KPluginMetaData &data, int idx)
plugin->setGUI(gui);
plugin->load();
gui->mergePluginGui(plugin);
plugin->loaded = true;
plugin->setIsLoaded(true);
loaded.insert(idx, plugin, true);
}
......@@ -114,7 +114,7 @@ void PluginManager::unload(const KPluginMetaData &data, int idx)
gui->removePluginGui(p);
p->unload();
p->loaded = false;
p->setIsLoaded(false);
loaded.erase(idx);
}
......@@ -143,7 +143,7 @@ void PluginManager::unloadAll()
Plugin *p = i->second;
gui->removePluginGui(p);
p->unload();
p->loaded = false;
p->setIsLoaded(false);
i++;
}
loaded.clear();
......
Supports Markdown
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