Commit 63be3163 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Fix loading of searchbar plugin

parent f23ed146
......@@ -160,7 +160,7 @@ void Plugin::setMetaData(const KPluginMetaData &metaData)
void Plugin::loadPlugins(QObject *parent, KXMLGUIClient *parentGUIClient, const QString &componentName)
{
KConfigGroup cfgGroup(KSharedConfig::openConfig(componentName + QLatin1String("rc")), "KParts Plugins");
const QList<PluginInfo> plugins = pluginInfos(componentName);
const QList<PluginInfo> plugins = pluginInfos(componentName) << pluginInfos("konqueror");
for (const auto &pluginInfo : plugins) {
QDomElement docElem = pluginInfo.m_document.documentElement();
......
......@@ -23,4 +23,4 @@ kcoreaddons_desktop_to_json(searchbarplugin searchbar.desktop)
target_link_libraries(searchbarplugin KF5::I18n KF5::TextWidgets KF5::Parts Qt5::Script KF5Konq)
install(TARGETS searchbarplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/konqueror/kpartplugins)
install(FILES searchbar.rc DESTINATION ${KDE_INSTALL_DATADIR}/konqueror/partsrccfiles)
install(FILES searchbarplugin.rc DESTINATION ${KDE_INSTALL_DATADIR}/konqueror/partsrcfiles)
......@@ -112,7 +112,7 @@ SearchBarPlugin::~SearchBarPlugin()
bool SearchBarPlugin::eventFilter(QObject *o, QEvent *e)
{
if (qobject_cast<KMainWindow *>(o) && KParts::PartActivateEvent::test(e)) {
if (KParts::PartActivateEvent::test(e)) {
KParts::PartActivateEvent *partEvent = static_cast<KParts::PartActivateEvent *>(e);
KParts::ReadOnlyPart *part = qobject_cast<KParts::ReadOnlyPart *>(partEvent->part());
//qCDebug(SEARCHBAR_LOG) << "Embedded part changed to " << part;
......
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