summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <gladhorn@kde.org>2014-08-10 20:01:13 (GMT)
committerFrederik Gladhorn <gladhorn@kde.org>2014-08-10 20:01:13 (GMT)
commit9398df0a06953ba889f59b42970da0e0315a865b (patch)
treee4a3fb83f9cdbf3ab96c995d96656ccc33ee50f4
parentac15a7075e9d10710f6edc1937c397e0a361c016 (diff)
Welcome back Okular::Part
-rw-r--r--part.cpp6
-rw-r--r--shell/shell.cpp5
2 files changed, 6 insertions, 5 deletions
diff --git a/part.cpp b/part.cpp
index 3ce96d4..60b7b52 100644
--- a/part.cpp
+++ b/part.cpp
@@ -156,6 +156,8 @@ class FileKeeper
std::FILE * m_handle;
};
+K_PLUGIN_FACTORY(OkularPartFactory, registerPlugin<Okular::Part>();)
+
Okular::PartFactory::PartFactory()
{
}
@@ -173,8 +175,6 @@ QObject *Okular::PartFactory::create(const char *iface, QWidget *parentWidget, Q
return object;
}
-K_EXPORT_PLUGIN( Okular::PartFactory() )
-
static QAction* actionForExportFormat( const Okular::ExportFormat& format, QObject *parent = 0 )
{
QAction *act = new QAction( format.description(), parent );
@@ -2967,6 +2967,6 @@ void Part::setReadWrite(bool readwrite)
} // namespace Okular
-#include "moc_part.cpp"
+#include "part.moc"
/* kate: replace-tabs on; indent-width 4; */
diff --git a/shell/shell.cpp b/shell/shell.cpp
index ecf23a4..006366b 100644
--- a/shell/shell.cpp
+++ b/shell/shell.cpp
@@ -89,12 +89,13 @@ void Shell::init()
// this routine will find and load our Part. it finds the Part by
// name which is a bad idea usually.. but it's alright in this
// case since our Part is made for this Shell
- m_partFactory = KPluginLoader("okularpart").factory();
+ KPluginLoader loader("okularpart");
+ m_partFactory = loader.factory();
if (!m_partFactory)
{
// if we couldn't find our Part, we exit since the Shell by
// itself can't do anything useful
- KMessageBox::error(this, i18n("Unable to find the Okular component."));
+ KMessageBox::error(this, i18n("Unable to find the Okular component: %1", loader.errorString()));
return;
}