Commit df70de9c authored by Luigi Toscano's avatar Luigi Toscano

Fix part loading under kpartloader

Really use the KAboutData instance; use it to set the component name
which matches the installation directory of the rc file.
Now the part can be loaded by kpartloader.
parent 41072cbb
...@@ -58,6 +58,9 @@ namespace Gwenview ...@@ -58,6 +58,9 @@ namespace Gwenview
GVPart::GVPart(QWidget* parentWidget, QObject* parent, const QVariantList& /*args*/) GVPart::GVPart(QWidget* parentWidget, QObject* parent, const QVariantList& /*args*/)
: KParts::ReadOnlyPart(parent) : KParts::ReadOnlyPart(parent)
{ {
QScopedPointer<KAboutData> aboutData(createAboutData());
setComponentData(*aboutData, false);
DocumentViewContainer* container = new DocumentViewContainer(parentWidget); DocumentViewContainer* container = new DocumentViewContainer(parentWidget);
setWidget(container); setWidget(container);
mDocumentView = container->createView(); mDocumentView = container->createView();
...@@ -85,7 +88,7 @@ GVPart::GVPart(QWidget* parentWidget, QObject* parent, const QVariantList& /*arg ...@@ -85,7 +88,7 @@ GVPart::GVPart(QWidget* parentWidget, QObject* parent, const QVariantList& /*arg
//Gwenview::ImageFormats::registerPlugins(); //Gwenview::ImageFormats::registerPlugins();
new GVBrowserExtension(this); new GVBrowserExtension(this);
setXMLFile("gvpart/gvpart.rc"); setXMLFile(QStringLiteral("gvpart.rc"), true);
} }
void GVPart::showProperties() void GVPart::showProperties()
......
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