Port activities

This commit is contained in:
Sune Vuorela 2023-12-15 17:12:31 +01:00 committed by Carl Schwan
parent d65c09d0a5
commit d8274fa466
2 changed files with 1 additions and 18 deletions

View File

@ -169,9 +169,6 @@ Shell::Shell(const QString &serializedOptions)
: KParts::MainWindow()
, m_menuBarWasShown(true)
, m_toolBarWasShown(true)
#ifndef Q_OS_WIN
, m_activityResource(nullptr)
#endif
, m_isValid(true)
{
setObjectName(QStringLiteral("okular::Shell#"));
@ -447,11 +444,7 @@ void Shell::openUrl(const QUrl &url, const QString &serializedOptions)
if (!isstdin) {
if (openOk) {
#ifdef WITH_KACTIVITIES
if (!m_activityResource) {
m_activityResource = new KActivities::ResourceInstance(window()->winId(), this);
}
m_activityResource->setUri(url);
KActivities::ResourceInstance::notifyAccessed(url);
#endif
m_recent->addUrl(url);
} else {

View File

@ -35,13 +35,6 @@ class KToggleAction;
class QTabWidget;
class KPluginFactory;
#ifndef Q_OS_WIN
namespace KActivities
{
class ResourceInstance;
}
#endif
/**
* This is the application "Shell". It has a menubar and a toolbar
* but relies on the "Part" to do all the real work.
@ -204,9 +197,6 @@ private:
QAction *m_showSidebarAction = nullptr;
QAction *m_lockSidebarAction = nullptr;
#ifndef Q_OS_WIN
KActivities::ResourceInstance *m_activityResource;
#endif
bool m_isValid;
};