1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-07 10:51:45 +00:00

avoid need for activities lib

use KRecentFilesAction like Kate and others to signal used
files/dirs

could later be used to plug-in a recently used menu, too,
if ever wanted

avoids that this dependency could be missed and the functionality
is not there, too
This commit is contained in:
Christoph Cullmann 2024-07-03 18:56:16 +02:00
parent 76c0795458
commit 638a0663a1
6 changed files with 9 additions and 25 deletions

View File

@ -91,12 +91,6 @@ endif()
find_package(KF6 ${KF6_MIN_VERSION} OPTIONAL_COMPONENTS
DocTools
)
find_package(PlasmaActivities)
set_package_properties(PlasmaActivities PROPERTIES DESCRIPTION "PlasmaActivities libraries"
URL "https://www.kde.org"
TYPE OPTIONAL
PURPOSE "For tracking which folders are frequently accessed on a Plasma desktop"
)
find_package(Phonon4Qt6 CONFIG REQUIRED)
@ -130,10 +124,6 @@ set_package_properties(KF6FileMetaData PROPERTIES
PURPOSE "For accessing file metadata labels"
)
if (PlasmaActivities_FOUND)
set(HAVE_PLASMA_ACTIVITIES TRUE)
endif()
if (KF6Baloo_FOUND AND KF6BalooWidgets_FOUND AND KF6FileMetaData_FOUND)
message(STATUS "Baloo packages are found")
set(HAVE_BALOO TRUE)

View File

@ -455,13 +455,6 @@ target_link_libraries(dolphinstatic
Phonon::phonon4qt6
)
if (HAVE_PLASMA_ACTIVITIES)
target_link_libraries(
dolphinstatic
Plasma::Activities
)
endif()
if(HAVE_PACKAGEKIT)
target_link_libraries(
dolphinstatic

View File

@ -1,6 +1,5 @@
/** Set whether to build Dolphin with support for these technologies or not. */
#cmakedefine01 HAVE_BALOO
#cmakedefine01 HAVE_PLASMA_ACTIVITIES
#cmakedefine01 HAVE_KUSERFEEDBACK
#cmakedefine01 HAVE_PACKAGEKIT
#cmakedefine01 HAVE_TERMINAL

View File

@ -53,6 +53,7 @@
#include <KMessageBox>
#include <KProtocolInfo>
#include <KProtocolManager>
#include <KRecentFilesAction>
#include <KShell>
#include <KShortcutsDialog>
#include <KStandardAction>
@ -365,6 +366,9 @@ void DolphinMainWindow::changeUrl(const QUrl &url)
updateViewActions();
updateGoActions();
// will signal used urls to activities manager, too
m_recentFiles->addUrl(url);
Q_EMIT urlChanged(url);
}
@ -2157,6 +2161,8 @@ void DolphinMainWindow::setupActions()
connect(openInSplitViewAction, &QAction::triggered, this, [this]() {
openInSplitView(QUrl());
});
m_recentFiles = new KRecentFilesAction(this);
}
void DolphinMainWindow::setupDockWidgets()

View File

@ -42,6 +42,7 @@ class KFileItem;
class KFileItemList;
class KJob;
class KNewFileMenu;
class KRecentFilesAction;
class KToolBarPopupAction;
class QToolButton;
class PlacesPanel;
@ -759,6 +760,8 @@ private:
KIO::CommandLauncherJob *m_job;
KRecentFilesAction *m_recentFiles = nullptr;
friend class DolphinMainWindowTest;
};

View File

@ -21,9 +21,6 @@
#include "statusbar/dolphinstatusbar.h"
#include <KActionCollection>
#if HAVE_PLASMA_ACTIVITIES
#include <PlasmaActivities/ResourceInstance>
#endif
#include <KApplicationTrader>
#include <KFileItemActions>
#include <KFilePlacesModel>
@ -570,10 +567,6 @@ void DolphinViewContainer::setUrl(const QUrl &newUrl)
if (newUrl != m_urlNavigator->locationUrl()) {
m_urlNavigator->setLocationUrl(newUrl);
}
#if HAVE_PLASMA_ACTIVITIES
KActivities::ResourceInstance::notifyAccessed(newUrl);
#endif
}
void DolphinViewContainer::setFilterBarVisible(bool visible)