mirror of
https://invent.kde.org/system/dolphin
synced 2024-07-04 17:30:55 +00:00
Merge remote-tracking branch 'origin/Applications/19.04'
This commit is contained in:
commit
b2b1f76031
|
@ -68,6 +68,11 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
|
|||
find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS
|
||||
Activities
|
||||
)
|
||||
set_package_properties(KF5Activities PROPERTIES DESCRIPTION "KActivities libraries"
|
||||
URL "http://www.kde.org"
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "For tracking which folders are frequently accessed on a Plasma desktop"
|
||||
)
|
||||
|
||||
find_package(Phonon4Qt5 CONFIG REQUIRED)
|
||||
|
||||
|
@ -91,6 +96,10 @@ set_package_properties(KF5FileMetaData PROPERTIES
|
|||
PURPOSE "For accessing file metadata labels"
|
||||
)
|
||||
|
||||
if (KF5Activities_FOUND)
|
||||
set(HAVE_KACTIVITIES TRUE)
|
||||
endif()
|
||||
|
||||
if (KF5Baloo_FOUND AND KF5BalooWidgets_FOUND AND KF5FileMetaData_FOUND)
|
||||
message(STATUS "Baloo packages are found")
|
||||
set(HAVE_BALOO TRUE)
|
||||
|
|
|
@ -2,7 +2,7 @@ include(ECMAddAppIcon)
|
|||
|
||||
configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h)
|
||||
|
||||
configure_file(config-dolphin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-dolphin.h)
|
||||
configure_file(config-kactivities.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kactivities.h)
|
||||
|
||||
configure_file(config-terminal.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-terminal.h)
|
||||
|
||||
|
@ -279,7 +279,7 @@ target_link_libraries(dolphinstatic
|
|||
Phonon::phonon4qt5
|
||||
)
|
||||
|
||||
if (KF5Activities_FOUND)
|
||||
if (HAVE_KACTIVITIES)
|
||||
target_link_libraries(
|
||||
dolphinstatic
|
||||
KF5::Activities
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
/* Define to 1 if you have the KActivities library. */
|
||||
#cmakedefine KF5Activities_FOUND 1
|
||||
|
1
src/config-kactivities.h.cmake
Normal file
1
src/config-kactivities.h.cmake
Normal file
|
@ -0,0 +1 @@
|
|||
#cmakedefine HAVE_KACTIVITIES
|
|
@ -30,6 +30,9 @@
|
|||
#include "views/viewmodecontroller.h"
|
||||
#include "views/viewproperties.h"
|
||||
|
||||
#ifdef HAVE_KACTIVITIES
|
||||
#include <KActivities/ResourceInstance>
|
||||
#endif
|
||||
#include <KFileItemActions>
|
||||
#include <KFilePlacesModel>
|
||||
#include <KIO/PreviewJob>
|
||||
|
@ -63,8 +66,8 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
|
|||
m_statusBarTimer(nullptr),
|
||||
m_statusBarTimestamp(),
|
||||
m_autoGrabFocus(true)
|
||||
#ifdef KActivities_FOUND
|
||||
, m_activityResourceInstance(0)
|
||||
#ifdef HAVE_KACTIVITIES
|
||||
, m_activityResourceInstance(nullptr)
|
||||
#endif
|
||||
{
|
||||
hide();
|
||||
|
@ -221,11 +224,10 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
|
|||
|
||||
// Initialize kactivities resource instance
|
||||
|
||||
#ifdef KActivities_FOUND
|
||||
m_activityResourceInstance = new KActivities::ResourceInstance(
|
||||
window()->winId(), url);
|
||||
#ifdef HAVE_KACTIVITIES
|
||||
m_activityResourceInstance = new KActivities::ResourceInstance(window()->winId(), url);
|
||||
m_activityResourceInstance->setParent(this);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
DolphinViewContainer::~DolphinViewContainer()
|
||||
|
@ -243,13 +245,13 @@ void DolphinViewContainer::setActive(bool active)
|
|||
m_urlNavigator->setActive(active);
|
||||
m_view->setActive(active);
|
||||
|
||||
#ifdef KActivities_FOUND
|
||||
#ifdef HAVE_KACTIVITIES
|
||||
if (active) {
|
||||
m_activityResourceInstance->notifyFocusedIn();
|
||||
} else {
|
||||
m_activityResourceInstance->notifyFocusedOut();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
bool DolphinViewContainer::isActive() const
|
||||
|
@ -469,9 +471,9 @@ void DolphinViewContainer::setUrl(const QUrl& newUrl)
|
|||
m_urlNavigator->setLocationUrl(newUrl);
|
||||
}
|
||||
|
||||
#ifdef KActivities_FOUND
|
||||
#ifdef HAVE_KACTIVITIES
|
||||
m_activityResourceInstance->setUri(newUrl);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void DolphinViewContainer::setFilterBarVisible(bool visible)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef DOLPHINVIEWCONTAINER_H
|
||||
#define DOLPHINVIEWCONTAINER_H
|
||||
|
||||
#include "config-dolphin.h"
|
||||
#include "config-kactivities.h"
|
||||
#include "views/dolphinview.h"
|
||||
|
||||
#include <KCompletion>
|
||||
|
@ -32,7 +32,7 @@
|
|||
#include <QPushButton>
|
||||
#include <QWidget>
|
||||
|
||||
#ifdef KF5Activities_FOUND
|
||||
#ifdef HAVE_KACTIVITIES
|
||||
namespace KActivities {
|
||||
class ResourceInstance;
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ private:
|
|||
QElapsedTimer m_statusBarTimestamp; // Time in ms since last update
|
||||
bool m_autoGrabFocus;
|
||||
|
||||
#ifdef KF5Activities_FOUND
|
||||
#ifdef HAVE_KACTIVITIES
|
||||
private:
|
||||
KActivities::ResourceInstance * m_activityResourceInstance;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user