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