Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit bcc1ca6c authored by Elvis Angelaccio's avatar Elvis Angelaccio

Port to KStandardAction::Find

Less code, no need to use the custom `find_in_archive` action name.
parent 678c95e2
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="ark_part" version="22" translationDomain="ark">
<gui name="ark_part" version="23" translationDomain="ark">
<MenuBar>
<Menu name="archive">
<text>&amp;Archive</text>
......@@ -7,7 +7,7 @@
<Action name="add" group="archive_edit"/>
<Action name="edit_comment" group="archive_edit"/>
<Action name="extract_all" group="archive_extract"/>
<Action name="find_in_archive" group="archive_props"/>
<Action name="edit_find" group="archive_props"/>
<Action name="test_archive" group="archive_props"/>
<Action name="properties" group="archive_props"/>
</Menu>
......@@ -35,7 +35,7 @@
<Action name="extract"/>
<Action name="preview"/>
<Action name="openfile"/>
<Action name="find_in_archive"/>
<Action name="edit_find"/>
<Separator/>
<Action name="add"/>
<Action name="deletefile"/>
......
......@@ -436,12 +436,7 @@ void Part::setupActions()
m_testArchiveAction->setToolTip(i18nc("@info:tooltip", "Click to test the archive for integrity"));
connect(m_testArchiveAction, &QAction::triggered, this, &Part::slotTestArchive);
m_searchAction = actionCollection()->addAction(QStringLiteral("find_in_archive"));
m_searchAction->setIcon(QIcon::fromTheme(QStringLiteral("search")));
m_searchAction->setText(i18nc("@action:inmenu", "&Find Files"));
actionCollection()->setDefaultShortcut(m_searchAction, Qt::CTRL + Qt::Key_F);
m_searchAction->setToolTip(i18nc("@info:tooltip", "Click to search in archive"));
connect(m_searchAction, &QAction::triggered, this, &Part::slotShowFind);
m_searchAction = KStandardAction::find(this, &Part::slotShowFind, actionCollection());
connect(m_signalMapper, QOverload<int>::of(&QSignalMapper::mapped),
this, &Part::slotOpenEntry);
......
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