summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Toscano <[email protected]>2017-04-12 23:58:46 +0200
committerLuigi Toscano <[email protected]>2017-04-21 02:03:00 +0200
commitdf70de9c08535e846974375912ffc5f4782b1d48 (patch)
tree7384dbb089dec972073b13d6c24ac30198d5a05f
parent41072cbb49488a1f2a10fe958766913ef88e0cdd (diff)
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.
-rw-r--r--part/gvpart.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/part/gvpart.cpp b/part/gvpart.cpp
index 90f7a8b..a739191 100644
--- a/part/gvpart.cpp
+++ b/part/gvpart.cpp
@@ -58,6 +58,9 @@ namespace Gwenview
GVPart::GVPart(QWidget* parentWidget, QObject* parent, const QVariantList& /*args*/)
: KParts::ReadOnlyPart(parent)
{
+ QScopedPointer<KAboutData> aboutData(createAboutData());
+ setComponentData(*aboutData, false);
+
DocumentViewContainer* container = new DocumentViewContainer(parentWidget);
setWidget(container);
mDocumentView = container->createView();
@@ -85,7 +88,7 @@ GVPart::GVPart(QWidget* parentWidget, QObject* parent, const QVariantList& /*arg
//Gwenview::ImageFormats::registerPlugins();
new GVBrowserExtension(this);
- setXMLFile("gvpart/gvpart.rc");
+ setXMLFile(QStringLiteral("gvpart.rc"), true);
}
void GVPart::showProperties()