X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/521f4937d55ff611ebe46fcbbe162eb2d9d175ad..6e752f507a1dd82a40d4bd140457203842fc0c80:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index a3856de6a..bb27e0a5e 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -339,11 +338,7 @@ void DolphinPart::slotItemActivated(const KFileItem &item) args.setMimeType(item.mimetype()); } - // Ideally, konqueror should be changed to not require trustedSource for directory views, - // since the idea was not to need BrowserArguments for non-browser stuff... - KParts::BrowserArguments browserArgs; - browserArgs.trustedSource = true; - Q_EMIT m_extension->openUrlRequest(item.targetUrl(), args, browserArgs); + Q_EMIT m_extension->openUrlRequest(item.targetUrl(), args); } void DolphinPart::slotItemsActivated(const KFileItemList &items) @@ -392,7 +387,8 @@ void DolphinPart::slotOpenContextMenu(const QPoint &pos, const KFileItem &_item, const bool supportsMoving = capabilities.supportsMoving(); if (capabilities.supportsDeleting()) { - const bool showDeleteAction = (KSharedConfig::openConfig()->group("KDE").readEntry("ShowDeleteCommand", false) || !item.isLocalFile()); + const bool showDeleteAction = + (KSharedConfig::openConfig()->group(QStringLiteral("KDE")).readEntry("ShowDeleteCommand", false) || !item.isLocalFile()); const bool showMoveToTrashAction = capabilities.isLocal() && supportsMoving; if (showDeleteAction && showMoveToTrashAction) { @@ -425,7 +421,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint &pos, const KFileItem &_item, actionGroups.insert(QStringLiteral("editactions"), editActions); - Q_EMIT m_extension->popupMenu(pos, items, KParts::OpenUrlArguments(), KParts::BrowserArguments(), popupFlags, actionGroups); + Q_EMIT m_extension->popupMenu(pos, items, KParts::OpenUrlArguments(), popupFlags, actionGroups); } void DolphinPart::slotDirectoryRedirection(const QUrl &oldUrl, const QUrl &newUrl) @@ -464,7 +460,7 @@ void DolphinPart::openSelectionDialog(const QString &title, const QString &text, dialog->setWindowTitle(title); dialog->setLabelText(text); - const KConfigGroup group = KSharedConfig::openConfig("dolphinpartrc")->group("Select Dialog"); + const KConfigGroup group = KSharedConfig::openConfig("dolphinpartrc")->group(QStringLiteral("Select Dialog")); dialog->setComboBoxEditable(true); dialog->setComboBoxItems(group.readEntry("History", QStringList())); @@ -479,7 +475,7 @@ void DolphinPart::openSelectionDialog(const QString &title, const QString &text, // Need to evaluate this again here, because the captured value is const // (even if the const were removed from 'const KConfigGroup group =' above). - KConfigGroup group = KSharedConfig::openConfig("dolphinpartrc")->group("Select Dialog"); + KConfigGroup group = KSharedConfig::openConfig("dolphinpartrc")->group(QStringLiteral("Select Dialog")); // Limit the size of the saved history. group.writeEntry("History", items.mid(0, 10)); group.sync(); @@ -530,17 +526,10 @@ void DolphinPart::slotOpenTerminal() void DolphinPart::slotFindFile() { - QMenu searchTools; - KMoreToolsMenuFactory("dolphin/search-tools").fillMenuFromGroupingNames(&searchTools, {"files-find"}, QUrl::fromLocalFile(localFilePathOrHome())); - QList actions = searchTools.actions(); - if (!(actions.isEmpty())) { - actions.first()->trigger(); - } else { - KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(QStringLiteral("kfind"), {url().toString()}, this); - job->setDesktopName(QStringLiteral("org.kde.kfind")); - job->setUiDelegate(new KDialogJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, widget())); - job->start(); - } + KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(QStringLiteral("kfind"), {url().toString()}, this); + job->setDesktopName(QStringLiteral("org.kde.kfind")); + job->setUiDelegate(new KDialogJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, widget())); + job->start(); } void DolphinPart::updateNewMenu()