Commit 8a2ae13a authored by Korantin Auguste's avatar Korantin Auguste Committed by Sven Brauch
Browse files

Add a debug message when the ark kpart can't be loaded

REVIEW:117694
parent b3498941
......@@ -125,12 +125,14 @@ void MainWindow::dragMoveEvent(QDragMoveEvent * event)
bool MainWindow::loadPart()
{
KPluginFactory *factory = KPluginLoader(QLatin1String( "arkpart" )).factory();
KPluginLoader loader(QLatin1String( "arkpart" ));
KPluginFactory *factory = loader.factory();
if (factory) {
m_part = static_cast<KParts::ReadWritePart*>(factory->create<KParts::ReadWritePart>(this));
}
if (!factory || !m_part) {
KMessageBox::error(this, i18n("Unable to find Ark's KPart component, please check your installation."));
kWarning() << "Error loading Ark KPart: " << loader.errorString();
return false;
}
......
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