Commit 772fc8cf authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix plugin loading

parent edfafd86
......@@ -42,7 +42,7 @@ Palapeli::SlicerSelector::SlicerSelector(QWidget* parent)
continue;
#else
Pala::Slicer* slicer = nullptr;
if (auto plugin = KPluginFactory::instantiatePlugin<Pala::Slicer>({}, nullptr).plugin) {
if (auto plugin = KPluginFactory::instantiatePlugin<Pala::Slicer>(offer, nullptr).plugin) {
slicer = plugin;
} else {
continue;
......
......@@ -60,7 +60,7 @@ Palapeli::PuzzleComponent* Palapeli::CreationContextComponent::cast(Type type) c
}
#else
QScopedPointer<Pala::Slicer> slicer;
if (auto plugin = KPluginFactory::instantiatePlugin<Pala::Slicer>({}, nullptr).plugin) {
if (auto plugin = KPluginFactory::instantiatePlugin<Pala::Slicer>(offers.first(), nullptr).plugin) {
slicer.reset(plugin);
} else {
return nullptr;
......
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